瀏覽代碼

fix FAB position

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 5 年之前
父節點
當前提交
1977267826
共有 1 個文件被更改,包括 40 次插入33 次删除
  1. 40 33
      src/main/res/layout/text_file_preview.xml

+ 40 - 33
src/main/res/layout/text_file_preview.xml

@@ -16,47 +16,54 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 -->
 -->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-            android:layout_width="match_parent"
+<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
     android:layout_height="match_parent">
     android:layout_height="match_parent">
 
 
-    <androidx.coordinatorlayout.widget.CoordinatorLayout
+    <ScrollView
         android:layout_width="match_parent"
         android:layout_width="match_parent"
         android:layout_height="match_parent">
         android:layout_height="match_parent">
 
 
-        <TextView
-            android:id="@+id/text_preview"
+        <androidx.coordinatorlayout.widget.CoordinatorLayout
             android:layout_width="match_parent"
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:padding="@dimen/standard_padding"
-            android:textIsSelectable="true"
-            android:visibility="gone"/>
+            android:layout_height="wrap_content">
 
 
-        <RelativeLayout
-            android:id="@+id/multi_view"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent">
+            <TextView
+                android:id="@+id/text_preview"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:padding="@dimen/standard_padding"
+                android:textIsSelectable="true"
+                android:visibility="gone" />
 
 
-            <ScrollView
+            <RelativeLayout
+                android:id="@+id/multi_view"
                 android:layout_width="match_parent"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent">
                 android:layout_height="match_parent">
 
 
-                <include layout="@layout/empty_list"/>
-
-            </ScrollView>
-        </RelativeLayout>
-
-        <com.google.android.material.floatingactionbutton.FloatingActionButton
-            android:id="@+id/text_preview_fab"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="end|bottom"
-            android:layout_alignParentEnd="true"
-            android:layout_alignParentRight="true"
-            android:layout_marginBottom="@dimen/standard_margin"
-            android:layout_marginEnd="@dimen/standard_margin"
-            android:layout_marginRight="@dimen/standard_margin"
-            android:contentDescription="@string/edit_rich_workspace"
-            android:visibility="gone" />
-    </androidx.coordinatorlayout.widget.CoordinatorLayout>
-</RelativeLayout>
+                <ScrollView
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent">
+
+                    <include layout="@layout/empty_list" />
+
+                </ScrollView>
+            </RelativeLayout>
+
+        </androidx.coordinatorlayout.widget.CoordinatorLayout>
+    </ScrollView>
+
+    <com.google.android.material.floatingactionbutton.FloatingActionButton
+        android:id="@+id/text_preview_fab"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentEnd="true"
+        android:layout_alignParentRight="true"
+        android:layout_gravity="end|bottom"
+        android:layout_marginEnd="@dimen/standard_margin"
+        android:layout_marginRight="@dimen/standard_margin"
+        android:layout_marginBottom="@dimen/standard_margin"
+        android:contentDescription="@string/edit_rich_workspace"
+        android:visibility="gone" />
+
+</androidx.coordinatorlayout.widget.CoordinatorLayout>