[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [orbot/master] Fix TextView overlap issues in app selection ui



commit ebc06ca3fe029edc01976b38b776c613f680198e
Author: lexi <bird.s.lex@xxxxxxxxx>
Date:   Mon Feb 26 14:18:25 2018 -0500

    Fix TextView overlap issues in app selection ui
---
 .../torproject/android/ui/AppManagerActivity.java  |  1 +
 app/src/main/res/layout/layout_apps.xml            |  4 ++-
 app/src/main/res/layout/layout_apps_item.xml       | 34 +++++++++++++++++-----
 3 files changed, 30 insertions(+), 9 deletions(-)

diff --git a/app/src/main/java/org/torproject/android/ui/AppManagerActivity.java b/app/src/main/java/org/torproject/android/ui/AppManagerActivity.java
index 6d29a85f..c3cdc5eb 100644
--- a/app/src/main/java/org/torproject/android/ui/AppManagerActivity.java
+++ b/app/src/main/java/org/torproject/android/ui/AppManagerActivity.java
@@ -23,6 +23,7 @@ import android.content.SharedPreferences.Editor;
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
+import android.graphics.Color;
 import android.os.AsyncTask;
 import android.os.Bundle;
 import android.support.v7.app.AppCompatActivity;
diff --git a/app/src/main/res/layout/layout_apps.xml b/app/src/main/res/layout/layout_apps.xml
index e597163f..1be50435 100644
--- a/app/src/main/res/layout/layout_apps.xml
+++ b/app/src/main/res/layout/layout_apps.xml
@@ -17,7 +17,9 @@
         android:layout_height="match_parent"
         android:layout_alignParentTop="true"
         android:gravity="center"
-        android:numColumns="4">
+        android:horizontalSpacing="5dp"
+        android:numColumns="4"
+        android:verticalSpacing="5dp">
 
     </GridView>
 
diff --git a/app/src/main/res/layout/layout_apps_item.xml b/app/src/main/res/layout/layout_apps_item.xml
index 83549121..ef188b3e 100644
--- a/app/src/main/res/layout/layout_apps_item.xml
+++ b/app/src/main/res/layout/layout_apps_item.xml
@@ -1,15 +1,33 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android";
-    android:layout_width="120dp"
-    android:layout_height="120dp"
-    android:orientation="vertical"
+    android:layout_width="90dp"
+    android:layout_height="90dp"
     android:gravity="center_horizontal"
-    >
-    <ImageView android:id="@+id/itemicon" android:layout_width="50dp" android:layout_height="50dp"  android:padding="3dp" ></ImageView>
-    <TextView android:layout_height="20dp" android:layout_width="120dp" android:lines="1" android:id="@+id/itemtext"
-        android:text="uid:packages"  android:textSize="12sp" android:gravity="center_horizontal"  android:padding="3dip"></TextView>
-    <CheckBox  android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/itemcheck" ></CheckBox>
+    android:orientation="vertical">
+
+    <ImageView
+        android:id="@+id/itemicon"
+        android:layout_width="40dp"
+        android:layout_height="40dp" />
+
+    <TextView
+        android:id="@+id/itemtext"
+        android:layout_width="80dp"
+        android:layout_height="wrap_content"
+        android:ellipsize="end"
+        android:gravity="center_horizontal"
+        android:maxLines="2"
+        android:minLines="2"
+        android:scrollHorizontally="false"
+        android:text="uid:packages"
+        android:textAlignment="center"
+        android:textSize="12sp" />
+
+    <CheckBox
+        android:id="@+id/itemcheck"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content" />
 
 </LinearLayout>
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits