Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
R.id をグループ化する可能性はありますか?
android:id="@+id/button1" R.id.button1
私はこのようなものが欲しい:
android:id="@+id/main/button1" R.id.main.button1
しかし、それはうまくいきません。
実際のところ、できます。これは文書化されておらず、IntelliJ はうまく動作しません (Eclipse は動作します) が、このようなことはできます...
レイアウト.xml
android:id="@+id_group1/button1"
アクティビティ.java
Button myButton = (Button)findViewById(R.id_group1.button1);