これが私のタブレットアプリケーションのスクリーンショットです(今のところフラグメントを使用していません):
ご覧のとおり、左側に私のアクティビティごとにアイコンが付いた小さなメニューがあります。
現在、これらのアイコンは新しいアクティビティを起動しますが、右側のフレームでfragmentactivityを起動して、すべてが同じパネルに表示されるようにします。
しかし、フラグメントに関する投稿とドキュメントを注意深く読んだ後、フラグメントが同時に表示されていることがわかります。
ここから:http://android-developers.blogspot.com/2011/02/android-30-fragments-api.html
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<fragment class="com.example.android.apis.app.TitlesFragment"
android:id="@+id/titles" android:layout_weight="1"
android:layout_width="0px"
android:layout_height="match_parent" />
<FrameLayout android:id="@+id/details" android:layout_weight="1"
android:layout_width="0px"
android:layout_height="match_parent" />
</LinearLayout>
それで、同じ場所に異なるフラグメントを表示するには、どうすればよいですか?View = goingでプレイするのは、私が考えている最悪のアイデアだと思いますね。
助けてくれてありがとう。