tags:

views:

64

answers:

1

I am quite new to Java, let alone Android. I am stuck with a problem that I encountered while instrumenting (using the instrumentation framework of android) the code of a Android project. I have a ListView and using the getTouchables() API I have store the view in a ArrayList. When in debug session, I saw that each view has children (mChildren) when expanded I could see that there is a "ImageView" and "TextView" present. when the "TextView" is expanded, I could access the mText variable which contains the text value I am looking for. In brief, the value I am looking for, when looking at the "variables" window of the debug perspective of Eclipse, is present at 'myview->mChildren->[1] (TextView)->mText->value'

Here "myview" is the name of the object of View class.

how do I access/ read the content of the "value" variable?

Please let me know if you need any info in this regard?

Thank you -BA

A: 

You could access via the findViewByID method of the mView object;

For example

TextEdit mText = (TextView)myView.findViewById(R.id.mText);
mText.setText("Hello!");

Hope that's what you're after or helps.

Damon

Damon Skelhorn
Unfortunately no. I am trying to read the value present in the variable and not set it. The value of variable that I am trying to read is not in "R".
black adder