Ich bin neu in Android-Entwicklung und ich möchte ein Menü als Floating-Aktion-Taste machen. Ich werde 10 Tasten im Menü und alle im Framelayout haben. Das Problem ist, wenn ich das Gerät rotiere, verschwand die Hälfte der Tasten. Wie kann ich durch die Menütasten blättern?So blättern Floating-Action-Menü im framelayout
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true">
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<com.github.clans.fab.FloatingActionMenu
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/menu_red"
android:layout_gravity="right|bottom"
android:layout_marginEnd="@dimen/fab_margin_right"
android:elevation="@dimen/button_elevation"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginRight="10dp"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
fab:menu_labels_ellipsize="end"
fab:menu_labels_singleLine="false"
fab:menu_backgroundColor="#ccffffff"
android:layout_marginTop="100dp">
<com.github.clans.fab.FloatingActionButton
android:id="@+id/fab1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_star"
fab:fab_size="mini"
fab:fab_label="B1"
fab:paddingEnd="@dimen/activity_horizontal_margin"
/>
<com.github.clans.fab.FloatingActionButton
android:id="@+id/fab2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_star"
fab:paddingEnd="@dimen/activity_horizontal_margin"
fab:fab_size="mini"
fab:fab_label="B2" />
<com.github.clans.fab.FloatingActionButton
android:id="@+id/fab3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_star"
fab:fab_size="mini"
fab:fab_label="B3" />
</com.github.clans.fab.FloatingActionMenu>
</FrameLayout>
</ScrollView>
Setzen Sie den framelayout innerhalb eines Scrollview verwenden können. [bearbeiten] Sie Ihren Post, um den Layout-XML-Code aufzunehmen. – FishStix