Monday, May 7, 2012

[android-developers] How can I get the number of constantsincluded in each API ?

> You could use reflection, I suppose.


Hi Mark, thank you for the advice

I tried it.
I checked resource number by throwing integers from 0 to 10 like this ....

--------------------------------------------------------------
int k;
for(k=0; k<=10; k++){
int numTp3 = ContactsContract.CommonDataKinds.Email.getTypeLabelResource(k); //recource number
Resources res = activity.getResources();
CharSequence CharSeq = res.getText(numTp3); // <<=== checked
}
--------------------------------------------------------------
In case of Email, the CharSeq returned the same value of TYPE_CUSTOM after k >5.
Thank you.


** From :Blue Pencil

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate