Syntax error on token "QUOTE", VariableDeclaratorId expected after this token
- by user356812
I've posted a bigger chunk of the code below. You can see that initially QUOTE was procedural- coded in place. I'm trying to learn how to use declarative design so I want to do the same thing but by using resources. It seems like I need to access the string.xml thru the @R.id tag and identify QUOTE with that string value. But I don't know enough to negotiate this. Any tips? Thanks!
public class circle extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(new GraphicsView(this));
}
static public class GraphicsView extends View {
//private static final String QUOTE = "Happy Birthday to David.";
private final String QUOTE = getString(R.string.quote);
.....
@Override
protected void onDraw(Canvas canvas) {
// Drawing commands go here
canvas.drawPath(circle, cPaint);
canvas.drawTextOnPath(QUOTE, circle, 0, 20, tPaint);