I recently discovered the Display View (akin to Immediate View in
Visual Studio).  I have my code breakpointed at a certain point and I
want to examine a value.  My problem is that it cannot resolve a
reference to my object.  Here's the line of code I'm stopped at:

if(myTextView.getCurrentTextColor() == R.color.Red)

In Display View, R.color.Red returns (int) 2130968576, so that is
working fine.

I want to know the value of myTextView.getCurrentTextColor() and I get
this error:

        Evaluation failed. Reason(s):
                myTextView cannot be resolved

I've tried fully qualifying it, like this:

((TextView)findViewById(R.id.TextView01)).getCurrentTextColor()

and then I get

TextView cannot be resolved to a type

I've tried a number of other things, including fully qualifying the
TextView type, and cannot get it to resolve this reference and give me
the value.  What am I missing?

Incidentally, the reason I'm doing this is because I have set the
color of the text at design time to be R.color.Red, yet this if
statement is failing, and I don't know why.  So I must be missing more
than just how to use Display View.

Thanks in advance for your help.

  Roger

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to