[tor-commits] [snowflake-mobile/master] Added scrolling to MainFragment

cohosh at torproject.org cohosh at torproject.org
Mon Aug 10 16:49:27 UTC 2020


commit cb1e2a72392644c54d474c39c09a746e1c735b14
Author: Hashik Donthineni <HashikDonthineni at gmail.com>
Date:   Fri Aug 7 01:19:59 2020 +0530

    Added scrolling to MainFragment
---
 app/src/main/res/layout/fragment_main.xml | 81 ++++++++++++++++---------------
 1 file changed, 43 insertions(+), 38 deletions(-)

diff --git a/app/src/main/res/layout/fragment_main.xml b/app/src/main/res/layout/fragment_main.xml
index 28c927f..0dcaf86 100644
--- a/app/src/main/res/layout/fragment_main.xml
+++ b/app/src/main/res/layout/fragment_main.xml
@@ -1,47 +1,52 @@
 <?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    tools:context=".fragments.MainFragment">
+    android:layout_height="match_parent">
 
-    <Switch
-        android:id="@+id/snowflake_switch"
+    <RelativeLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_alignParentStart="true"
-        android:layout_marginStart="20dp"
-        android:layout_marginTop="20dp"
-        android:layout_marginEnd="20dp"
-        android:layout_marginBottom="20dp"
-        android:fontFamily="@font/source_code_pro"
-        android:text="@string/Snowflake_Off"
-        android:textAlignment="textStart"
-        android:textColor="@color/colorText"
-        android:textSize="20sp" />
+        tools:context=".fragments.MainFragment">
 
-    <ImageView
-        android:id="@+id/snowflake_logo"
-        android:layout_width="200dp"
-        android:layout_height="200dp"
-        android:tint="@color/snowflakeOff"
-        android:layout_centerHorizontal="true"
-        android:layout_marginTop="150dp"
-        android:src="@drawable/ic_status_on" />
+        <Switch
+            android:id="@+id/snowflake_switch"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_alignParentStart="true"
+            android:layout_marginStart="20dp"
+            android:layout_marginTop="20dp"
+            android:layout_marginEnd="20dp"
+            android:layout_marginBottom="20dp"
+            android:fontFamily="@font/source_code_pro"
+            android:text="@string/Snowflake_Off"
+            android:textAlignment="textStart"
+            android:textColor="@color/colorText"
+            android:textSize="20sp" />
 
-    <TextView
-        android:id="@+id/users_served"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_below="@id/snowflake_logo"
-        android:layout_centerHorizontal="true"
-        android:layout_marginTop="10dp"
-        android:fontFamily="@font/source_code_pro"
-        android:gravity="center"
-        android:paddingLeft="50dp"
-        android:paddingTop="10dp"
-        android:paddingRight="50dp"
-        android:textSize="16sp"
-        android:visibility="gone" />
+        <ImageView
+            android:id="@+id/snowflake_logo"
+            android:layout_width="200dp"
+            android:layout_height="200dp"
+            android:layout_centerHorizontal="true"
+            android:layout_marginTop="150dp"
+            android:src="@drawable/ic_status_on"
+            android:tint="@color/snowflakeOff" />
+
+        <TextView
+            android:id="@+id/users_served"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@id/snowflake_logo"
+            android:layout_centerHorizontal="true"
+            android:layout_marginTop="10dp"
+            android:fontFamily="@font/source_code_pro"
+            android:gravity="center"
+            android:paddingLeft="50dp"
+            android:paddingTop="10dp"
+            android:paddingRight="50dp"
+            android:textSize="16sp"
+            android:visibility="gone" />
 
-</RelativeLayout>
\ No newline at end of file
+    </RelativeLayout>
+</ScrollView>





More information about the tor-commits mailing list