0

나는 안드로이드 개발에서 새로 왔고 부동 작업 버튼으로 메뉴를 만들고 싶습니다. 나는 메뉴에 10 개의 버튼과 모든 프레임 아웃을 가질 것이다. 문제는 내가 장치를 돌릴 때 버튼의 절반이 사라 졌다는 것입니다. 메뉴 버튼을 스크롤하려면 어떻게해야합니까?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> 
+1

에 사용할 수있는

<ScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent"> <!--whatever you want in a scroll--> </LinearLayout> </ScrollView> 

대신 선형 레이아웃이있는 ScrollView의 내부 FrameLayout이를 넣습니다. 레이아웃 xml 코드를 포함하도록 게시물을 편집하십시오. – FishStix

답변

1

scrollview를 사용해 보셨습니까? 프레임 레이아웃을 스크롤로 감 쌉니다. 당신은 예를 들어 상대

+0

예 스크롤보기를 시도했지만 framelayout과 함께 작동하지 않았습니다. – kareem

+0

프레임 레이아웃이어야합니다? 어쩌면 선형 또는 상대로 변경할 수 있습니다. 스크롤보기에는 자식이 하나만 있어야한다는 것을 기억하십시오. – kkkkk

+0

한 자녀와 무슨 뜻입니까? 제 생각에 이것은 오류라고 생각합니다 – kareem

관련 문제