0

I'm trying to add a string property in Android View.java and make ViewServer could dump view and get it.

Here is what I wrote, but it doesn't work.

protected String mTestinfo = "myTestInfo";
/** {@hide} */
@ViewDebug.ExportedProperty
public String getTestinfo(){
    return mTestinfo;
}

Could anyone help on this?

ead
  • 32,758
  • 6
  • 90
  • 153
YiFan Li
  • 1
  • 1
  • What is the problem, what does not work? – ead Feb 01 '16 at 12:52
  • I used String, here the 'string' is a typo, sorry. What I want is to set this property and ViewServer could get this when dump a view, but it doesn't work. – YiFan Li Feb 01 '16 at 13:04

1 Answers1

1

Have you tried changing it to:

public String getTestinfo(){
    return mTestinfo;
}

with a capital 'S'?

andMarkus
  • 960
  • 1
  • 8
  • 16