Is it possible to receive the resource-ids being kept by a as an int[] programmatically without referring to the resource-class R?
<declare-styleable name="com_facebook_login_view">
<attr name="confirm_logout" format="boolean"/>
<attr name="fetch_user_info" format="boolean"/>
<attr name="login_text" format="string"/>
<attr name="logout_text" format="string"/>
</declare-styleable>
The problem is that I cannot resolve the ID of the defined 'declare-styleable' attribute - 0x00 is always returned:
int id = context.getResources().getIdentifier( "com_facebook_login_view", "declare-styleable", context.getPackageName() );
int[] resourceIDs = context.getResources().getIntArray( id );
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…