commit 165e95a880d572cd83f35b5330787137246aa589
Author: n8fr8 <[email protected]>
Date:   Wed Oct 25 10:53:30 2017 -0400

    update layout to present "Apps..." option on the main screen
---
 .../org/torproject/android/OrbotMainActivity.java  |  6 ++
 app/src/main/res/layout-land/layout_main.xml       | 10 +++
 app/src/main/res/layout/layout_main.xml            | 81 +++++++++++++---------
 app/src/main/res/values/strings.xml                |  2 +-
 4 files changed, 67 insertions(+), 32 deletions(-)

diff --git a/app/src/main/java/org/torproject/android/OrbotMainActivity.java 
b/app/src/main/java/org/torproject/android/OrbotMainActivity.java
index b1e010a4..499fb25c 100644
--- a/app/src/main/java/org/torproject/android/OrbotMainActivity.java
+++ b/app/src/main/java/org/torproject/android/OrbotMainActivity.java
@@ -355,6 +355,12 @@ public class OrbotMainActivity extends AppCompatActivity
             });
 
 
+            findViewById(R.id.btnApps).setOnClickListener(new 
View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    enableVPN(true);
+                }
+            });
                }
                
                
diff --git a/app/src/main/res/layout-land/layout_main.xml 
b/app/src/main/res/layout-land/layout_main.xml
index 3ca1c5a4..fc8b2447 100644
--- a/app/src/main/res/layout-land/layout_main.xml
+++ b/app/src/main/res/layout-land/layout_main.xml
@@ -71,6 +71,16 @@
                         android:background="@drawable/rounded_button"
                         android:layout_marginLeft="10dp"
                         />
+                    <Button
+                        android:id="@+id/btnApps"
+                        android:layout_width="wrap_content"
+                        android:layout_height="40dp"
+                        android:text="@string/menu_apps"
+                        android:ellipsize="end"
+                        android:singleLine="true"
+                        android:background="@drawable/rounded_button"
+                        android:layout_marginLeft="10dp"
+                        />
                 </LinearLayout>
 
             </LinearLayout>
diff --git a/app/src/main/res/layout/layout_main.xml 
b/app/src/main/res/layout/layout_main.xml
index 5edfc32b..f854db5d 100644
--- a/app/src/main/res/layout/layout_main.xml
+++ b/app/src/main/res/layout/layout_main.xml
@@ -36,7 +36,8 @@
                 android:orientation="vertical"
         android:layout_centerVertical="true"
         android:layout_alignParentLeft="true"
-        android:layout_alignParentStart="true">
+        android:layout_alignParentStart="true"
+               android:weightSum="1">
                       <org.torproject.android.ui.ImageProgressView
                                android:id="@+id/imgStatus"
                                android:layout_width="match_parent"
@@ -48,33 +49,6 @@
 
 
 
-               <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>
 
 
@@ -84,16 +58,61 @@
                android:layout_height="wrap_content"
                android:textSize="14sp"
                android:fontFamily="sans-serif-light"
-               android:text=""
+               android:text="asdasd"
                android:lines="1"
                android:maxLines="1"
                android:layout_margin="12dp"
-               android:layout_alignParentBottom="true"
+               android:layout_above="@+id/button_row"
                android:gravity="center"
                android:ellipsize="end"
                />
 
-           </RelativeLayout>
+
+    <LinearLayout
+        android:id="@+id/button_row"
+        android:gravity="center_horizontal|bottom"
+        android:layout_gravity="bottom"
+        android:orientation="horizontal"
+        android:layout_width="match_parent"
+        android:layout_alignParentBottom="true"
+        android:layout_margin="6dp"
+        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:maxLines="1"
+            android:background="@drawable/rounded_button"
+            android:layout_marginLeft="10dp"
+            />
+        <Button
+            android:id="@+id/btnApps"
+            android:layout_width="wrap_content"
+            android:layout_height="40dp"
+            android:text="@string/menu_apps"
+            android:ellipsize="end"
+            android:maxLines="1"
+            android:background="@drawable/rounded_button"
+            android:layout_marginLeft="10dp"
+            />
+    </LinearLayout>
+
+
+</RelativeLayout>
 
 
         <LinearLayout
diff --git a/app/src/main/res/values/strings.xml 
b/app/src/main/res/values/strings.xml
index d4636eda..90fc3e4c 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -21,7 +21,7 @@
   <string name="menu_settings">Settings</string>
   <string name="menu_log">Log</string>
   <string name="menu_info">Help</string>
-  <string name="menu_apps">VPN</string>
+  <string name="menu_apps">Apps...</string>
   <string name="menu_start">Start</string>
   <string name="menu_stop">Stop</string>
   <string name="menu_about">About</string>



_______________________________________________
tor-commits mailing list
[email protected]
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits

Reply via email to