レイアウト (ナビゲーションなど) を定義する抽象アクティビティと、アクティビティのコンテンツを定義するサブクラスを持つことは可能ですか? xml レイアウト ファイルはどうですか?
私はxmlを持っていることを意味します
<xxx.DefaultNavigationDrawer xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/navigation_drawer"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<!-- Fragment contents go in here -->
</FrameLayout>
<ListView
android:id="@+id/navigation_drawer_list"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:layout_weight="1"
android:background="@drawable/calendar"
android:choiceMode="singleChoice"
android:divider="@color/calendar_divider"
android:dividerHeight="1dp" />
</xxx.DefaultNavigationDrawer>
私はすべての活動にそのようなレイアウトを持たせたいと思っています。変更される唯一のものはマークされています。