2017-03-02 3 views
0

Ich versuche, eine BottomSheetDialogFragment in meiner Multi-Panel-Anwendung zu implementieren. Dies ist, was es sieht aus wie jetzt:BottomSheetDialogFragment in nur einem Fenster

---------------------------------------- 
|      |    | 
|      |    | 
|  Fragment   | Fragment | 
|      |    | 
|      |    | 
---------------------------------------- 
|  BottomSheetDialogFragment  | 
---------------------------------------- 

Aber was würde Ich mag es, erreichen:

---------------------------------------- 
|      |    | 
|      |    | 
|  Fragment   | Fragment | 
|      |    | 
|      |    | 
|------------------------|    | 
|      |    | 
| BottomSheetDialog |    | 
---------------------------------------- 

Meine Frage ist: möglich, dass mit einem BottomSheetDialogFragment zu erreichen tun? Oder müsste ich einen anderen Ansatz haben? Wenn es möglich ist, können Sie auf die Richtung zeigen, wie ich das erreichen kann. Vielen Dank!

Antwort

0

können Sie versuchen, eine RelativeLayout mit zu erreichen, was Sie wollen:

<RelativeLayout 
    android:layout_width="match_parent" 
    android:layout_height="match_parent"> 

    <FrameLayout 
     android:id="@+id/fragment_container_1" 
     android:layout_width="200dp" 
     android:layout_height="match_parent" 
     android:layout_above="@+id/bottom_dialog"/> 

    <FrameLayout 
     android:id="@+id/bottom_dialog" 
     android:layout_width="0dp" 
     android:layout_height="50dp" 
     android:layout_alignLeft="@+id/fragment_container_1" 
     android:layout_alignRight="@+id/fragment_container_1" 
     android:layout_alignParentBottom="true"/> 

    <FrameLayout 
     android:id="@+id/fragment_container_2" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:layout_toRightOf="@+id/fragment_container_1"/> 

</RelativeLayout> 
Verwandte Themen