2
在某些android类中,您可以设置自定义布局。据我了解,这些自定义布局需要某些android:id
才能工作。如何知道Android所期望的android:id?
例如,对于ListActivity
a ListView
与@android:id/list
必须提供,这是在文档中指定的。
其他意见呢?例如,我正在检查API演示并遇到了
<CheckBoxPreference
android:key="child_checkbox_preference"
android:dependency="parent_checkbox_preference"
android:layout="?android:attr/preferenceLayoutChild"
android:title="@string/title_child_preference"
android:summary="@string/summary_child_preference" />
有一个为首选项指定的布局。该布局似乎是preference_child.xml
,其中有@+android:id/title
和@+android:id/summary
,我认为该视图将用于提供标题和摘要,但这是否记录在任何地方?
我如何知道需要使用哪些资源ID才能使所有内容自动运行?
感谢您的回答。我知道这是一个属性,但它是指布局。我的观点是,我可以接受这一点,并将其引用到@ layout/my_checkbox_layout,但是,我怎么知道我必须准确放入该布局,以便获得所有“默认优点”? – Pin 2013-02-10 22:34:53