[tor-commits] [orbot/master] improve landscape view on smaller screens

n8fr8 at torproject.org n8fr8 at torproject.org
Thu Mar 2 04:10:22 UTC 2017


commit 673e6c8af7ef3d78fa138fb5228e829d50d992c4
Author: Nathan Freitas <nathan at freitas.net>
Date:   Wed Mar 1 23:08:31 2017 -0500

    improve landscape view on smaller screens
---
 app/src/main/AndroidManifest.xml             |   5 +-
 app/src/main/res/layout-land/layout_main.xml | 216 +++++++++++++--------------
 2 files changed, 109 insertions(+), 112 deletions(-)

diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index f40b715..950632c 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -2,8 +2,8 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="org.torproject.android"
     android:installLocation="auto"
-    android:versionCode="15208000"
-    android:versionName="15.3.0-beta-1-multi">
+    android:versionCode="15401000"
+    android:versionName="15.4.0-beta-1-multi">
 
     <uses-sdk
         android:minSdkVersion="16"
@@ -38,7 +38,6 @@
         android:theme="@style/DefaultTheme">
         <activity
             android:name=".OrbotMainActivity"
-            android:configChanges="orientation|screenSize"
             android:excludeFromRecents="true"
             android:launchMode="singleTop">
             <intent-filter>
diff --git a/app/src/main/res/layout-land/layout_main.xml b/app/src/main/res/layout-land/layout_main.xml
index 3a47868..3ca1c5a 100644
--- a/app/src/main/res/layout-land/layout_main.xml
+++ b/app/src/main/res/layout-land/layout_main.xml
@@ -1,99 +1,97 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <LinearLayout android:gravity="center_vertical|center_horizontal"
-     xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
 
     android:orientation="vertical" android:layout_width="match_parent"
-      android:layout_height="match_parent"
+    android:layout_height="match_parent"
+
+    android:background="@color/dark_purple"
+    >
 
-	android:background="@color/dark_purple"
-      >
-    
-     <android.support.v7.widget.Toolbar
+    <android.support.v7.widget.Toolbar
         android:id="@+id/toolbar"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:minHeight="?attr/actionBarSize" />
     <android.support.v4.widget.DrawerLayout
-    android:id="@+id/drawer_layout"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    >
-    
-<RelativeLayout
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:id="@+id/content_frame"
+        android:id="@+id/drawer_layout"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        >
 
-    >
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:id="@+id/content_frame"
 
-	<LinearLayout
-	    	android:layout_width="match_parent"
-		android:layout_height="400dp"
-		android:id="@+id/frameMain"
-		android:visibility="visible"	
-		 android:orientation="vertical"
-        android:layout_centerVertical="true"
-        android:layout_alignParentLeft="true"
-        android:layout_alignParentStart="true">
-		       <org.torproject.android.ui.ImageProgressView
-				android:id="@+id/imgStatus"
-				android:layout_width="match_parent"
-				android:layout_height="209dp"
-
-				   android:padding="0dp"
-				android:layout_margin="0dp"
-				android:src="@drawable/toroff" />
-
-
-
-		<LinearLayout android:gravity="center_horizontal"
-			android:orientation="horizontal" android:layout_width="match_parent"
-			android:layout_height="wrap_content"
-
-			>
-			<Button
-				android:layout_width="wrap_content"
-				android:layout_height="40dp"
-				android:text="@string/menu_start"
-                android:id="@+id/btnStart"
-				android:background="@drawable/rounded_button"
+            >
 
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="400dp"
+                android:id="@+id/frameMain"
+                android:visibility="visible"
+                android:orientation="vertical"
+                android:layout_centerVertical="true"
+                android:layout_alignParentLeft="true"
+                android:layout_alignParentStart="true">
+                <org.torproject.android.ui.ImageProgressView
+                    android:id="@+id/imgStatus"
+                    android:layout_width="match_parent"
+                    android:layout_height="180dp"
+                    android:padding="0dp"
+                    android:layout_margin="0dp"
+                    android:src="@drawable/toroff" />
+
+
+                <LinearLayout android:gravity="center_horizontal"
+                    android:orientation="horizontal" android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+
+                    >
+                    <Button
+                        android:layout_width="wrap_content"
+                        android:layout_height="40dp"
+                        android:text="@string/menu_start"
+                        android:id="@+id/btnStart"
+                        android:background="@drawable/rounded_button"
+
+                        />
+
+
+                    <Button
+                        android:id="@+id/btnBrowser"
+                        android:layout_width="wrap_content"
+                        android:layout_height="40dp"
+                        android:text="@string/menu_browse"
+                        android:ellipsize="end"
+                        android:singleLine="true"
+                        android:background="@drawable/rounded_button"
+                        android:layout_marginLeft="10dp"
+                        />
+                </LinearLayout>
+
+            </LinearLayout>
+
+
+            <TextView
+                android:id="@+id/lblStatus"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:textSize="14sp"
+                android:fontFamily="sans-serif-light"
+                android:text=""
+                android:lines="1"
+                android:maxLines="1"
+                android:layout_margin="12dp"
+                android:layout_alignParentBottom="true"
+                android:gravity="center"
+                android:ellipsize="end"
                 />
 
-
-			<Button
-			    android:id="@+id/btnBrowser"
-			    android:layout_width="wrap_content"
-				android:layout_height="40dp"
-			    android:text="@string/menu_browse"
-          		 android:ellipsize="end"
-          android:singleLine="true"
-				android:background="@drawable/rounded_button"
-				android:layout_marginLeft="10dp"
-				/>
-			</LinearLayout>
-
-    </LinearLayout>
-
-
-	<TextView
-		android:id="@+id/lblStatus"
-		android:layout_width="match_parent"
-		android:layout_height="wrap_content"
-		android:textSize="14sp"
-		android:fontFamily="sans-serif-light"
-		android:text=""
-		android:lines="1"
-		android:maxLines="1"
-		android:layout_margin="12dp"
-		android:layout_alignParentBottom="true"
-		android:gravity="center"
-		android:ellipsize="end"
-		/>
-
-	    </RelativeLayout>
+        </RelativeLayout>
 
 
         <LinearLayout
@@ -109,36 +107,36 @@
 
 
         </LinearLayout>
-	    
-	 <LinearLayout
-    android:layout_width="320dp"
-    android:layout_height="match_parent"
-    android:orientation="vertical"
-    android:id="@+id/right_drawer"
-    android:layout_gravity="end"
-    android:background="#333333"
-         android:padding="6dp"
-     >
-         <TextView
-             android:layout_width="wrap_content"
-             android:layout_height="wrap_content"
-             android:text="@string/menu_log"
-             android:textAppearance="?android:attr/textAppearanceMedium"
-             />
-    	<TextView
-			android:id="@+id/orbotLog"
-			android:textSize="12sp"
-			android:gravity="start"
-			android:layout_width="fill_parent"
-			android:layout_height="wrap_content"
-			android:layout_alignParentLeft="true"
-			android:layout_marginTop="10dp"
-			android:textIsSelectable="true"
-			android:fontFamily="monospace"
-			 />
-    </LinearLayout>
-	
-	</android.support.v4.widget.DrawerLayout>
+
+        <LinearLayout
+            android:layout_width="320dp"
+            android:layout_height="match_parent"
+            android:orientation="vertical"
+            android:id="@+id/right_drawer"
+            android:layout_gravity="end"
+            android:background="#333333"
+            android:padding="6dp"
+            >
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/menu_log"
+                android:textAppearance="?android:attr/textAppearanceMedium"
+                />
+            <TextView
+                android:id="@+id/orbotLog"
+                android:textSize="12sp"
+                android:gravity="start"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:layout_alignParentLeft="true"
+                android:layout_marginTop="10dp"
+                android:textIsSelectable="true"
+                android:fontFamily="monospace"
+                />
+        </LinearLayout>
+
+    </android.support.v4.widget.DrawerLayout>
 
 </LinearLayout>
 





More information about the tor-commits mailing list