У меня есть два формата xml-файлов, в Main.xml есть кнопка с именем android: id = "@ + id/btnClose", а в About.xml есть кнопка с именем android: id = "@ + id/btnClose ", Это нормально? Благодаря!Идентификатор в разных макетах xml должен быть другим?
main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="3dip"
android:layout_marginTop="3dip"
android:background="#DCDCDC" >
<Button
android:id="@+id/btnClose"
style="@style/myTextAppearance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="@string/exit" />
</RelativeLayout>
About.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingTop="3dip"
android:paddingLeft="7dip"
android:background="@drawable/border_ui"
android:orientation="vertical" >
<Button
android:id="@+id/btnClose"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
style="@style/myTextAppearance"
android:text="@string/myreturn" />
</LinearLayout>
Да, он должен работать нормально ... – Noman