는 자원 ID를하지 않고, 프로그램의 int []로 보관되고받을 수, 가능 리소스 클래스 R?
int id = context.getResources().getIdentifier("com_facebook_login_view", "declare-styleable", context.getPackageName());
int[] resourceIDs = context.getResources().getIntArray(id);
어떤 생각이 크게 감상 할 수있다 : × 00은 항상 반환 -
<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>
문제는 내가 정의 '선언 - styleable'속성의 ID를 확인할 수 있다는 것입니다! :)
미리 감사드립니다. 여기에 크리스토퍼
. R.styleable 클래스에 대한 반성을 시도 했습니까? – njzk2
아니요이 말은하지 않았습니다 - 힌트를 주셔서 감사합니다 - 리플렉션을 사용하여 시도해 보겠습니다 :) declare-styleable에 동적으로 액세스 할 수있는 방법이 없습니까? getContext() 메서드를 사용하면 입니다. obtainStyledAttributes (AttributeSet set, int [] attrs); 도움 주셔서 감사합니다. –
해결되었습니다. 그러나 나의 명성은 내 자신의 질문에 대답하기에는 너무 낮습니다. ( 망각에 빠지지 않으면 8 시간 후에 게시 할 것입니다.) –