how to add a string property in view for viewserver to dump

76 views Asked by At

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?

1

There are 1 answers

1
andMarkus On

Have you tried changing it to:

public String getTestinfo(){
    return mTestinfo;
}

with a capital 'S'?