[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [orbot/master] improvements to app selection UI for better layout and error handling
commit fd92359ccd2c709333e8a2470e28bf885eeae51d
Author: Nathan Freitas <nathan@xxxxxxxxxxx>
Date: Mon Nov 7 00:19:06 2016 -0500
improvements to app selection UI for better layout and error handling
---
.../java/org/torproject/android/ui/AppManager.java | 8 ++++----
.../res/drawable-hdpi/ic_autorenew_black_36dp.png | Bin 0 -> 546 bytes
.../drawable-hdpi/ic_filter_none_black_36dp.png | Bin 0 -> 232 bytes
.../ic_playlist_add_check_black_36dp.png | Bin 0 -> 221 bytes
.../res/drawable-mdpi/ic_autorenew_black_36dp.png | Bin 0 -> 369 bytes
.../drawable-mdpi/ic_filter_none_black_36dp.png | Bin 0 -> 198 bytes
.../ic_playlist_add_check_black_36dp.png | Bin 0 -> 163 bytes
.../res/drawable-xhdpi/ic_autorenew_black_36dp.png | Bin 0 -> 682 bytes
.../drawable-xhdpi/ic_filter_none_black_36dp.png | Bin 0 -> 252 bytes
.../ic_playlist_add_check_black_36dp.png | Bin 0 -> 236 bytes
.../drawable-xxhdpi/ic_autorenew_black_36dp.png | Bin 0 -> 1000 bytes
.../drawable-xxhdpi/ic_filter_none_black_36dp.png | Bin 0 -> 415 bytes
.../ic_playlist_add_check_black_36dp.png | Bin 0 -> 325 bytes
.../drawable-xxxhdpi/ic_autorenew_black_36dp.png | Bin 0 -> 1362 bytes
.../drawable-xxxhdpi/ic_filter_none_black_36dp.png | Bin 0 -> 505 bytes
.../ic_playlist_add_check_black_36dp.png | Bin 0 -> 379 bytes
app/src/main/res/layout/layout_apps.xml | 22 ++++++++++++---------
app/src/main/res/values/strings.xml | 2 +-
18 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/app/src/main/java/org/torproject/android/ui/AppManager.java b/app/src/main/java/org/torproject/android/ui/AppManager.java
index 8ba26f2..d59eeac 100644
--- a/app/src/main/java/org/torproject/android/ui/AppManager.java
+++ b/app/src/main/java/org/torproject/android/ui/AppManager.java
@@ -53,11 +53,11 @@ public class AppManager extends AppCompatActivity implements OnCheckedChangeList
setTitle(R.string.apps_mode);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
- Button buttonSelectAll, buttonSelectNone, buttonInvert;
+ View buttonSelectAll, buttonSelectNone, buttonInvert;
- buttonSelectAll = (Button) findViewById(R.id.button_proxy_all);
- buttonSelectNone = (Button) findViewById(R.id.button_proxy_none);
- buttonInvert = (Button) findViewById(R.id.button_invert_selection);
+ buttonSelectAll = findViewById(R.id.button_proxy_all);
+ buttonSelectNone = findViewById(R.id.button_proxy_none);
+ buttonInvert = findViewById(R.id.button_invert_selection);
buttonSelectAll.setOnClickListener(new OnAutoClickListener(0));
buttonSelectNone.setOnClickListener(new OnAutoClickListener(1));
diff --git a/app/src/main/res/drawable-hdpi/ic_autorenew_black_36dp.png b/app/src/main/res/drawable-hdpi/ic_autorenew_black_36dp.png
new file mode 100644
index 0000000..6ae7ac8
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_autorenew_black_36dp.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_filter_none_black_36dp.png b/app/src/main/res/drawable-hdpi/ic_filter_none_black_36dp.png
new file mode 100644
index 0000000..7543f32
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_filter_none_black_36dp.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_playlist_add_check_black_36dp.png b/app/src/main/res/drawable-hdpi/ic_playlist_add_check_black_36dp.png
new file mode 100644
index 0000000..7835899
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_playlist_add_check_black_36dp.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_autorenew_black_36dp.png b/app/src/main/res/drawable-mdpi/ic_autorenew_black_36dp.png
new file mode 100644
index 0000000..39be19e
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_autorenew_black_36dp.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_filter_none_black_36dp.png b/app/src/main/res/drawable-mdpi/ic_filter_none_black_36dp.png
new file mode 100644
index 0000000..ebe663d
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_filter_none_black_36dp.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_playlist_add_check_black_36dp.png b/app/src/main/res/drawable-mdpi/ic_playlist_add_check_black_36dp.png
new file mode 100644
index 0000000..9244884
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_playlist_add_check_black_36dp.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_autorenew_black_36dp.png b/app/src/main/res/drawable-xhdpi/ic_autorenew_black_36dp.png
new file mode 100644
index 0000000..910746e
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_autorenew_black_36dp.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_filter_none_black_36dp.png b/app/src/main/res/drawable-xhdpi/ic_filter_none_black_36dp.png
new file mode 100644
index 0000000..4c6e500
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_filter_none_black_36dp.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_playlist_add_check_black_36dp.png b/app/src/main/res/drawable-xhdpi/ic_playlist_add_check_black_36dp.png
new file mode 100644
index 0000000..ac03e19
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_playlist_add_check_black_36dp.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_autorenew_black_36dp.png b/app/src/main/res/drawable-xxhdpi/ic_autorenew_black_36dp.png
new file mode 100644
index 0000000..2b9fd98
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_autorenew_black_36dp.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_filter_none_black_36dp.png b/app/src/main/res/drawable-xxhdpi/ic_filter_none_black_36dp.png
new file mode 100644
index 0000000..d6e77c7
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_filter_none_black_36dp.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_playlist_add_check_black_36dp.png b/app/src/main/res/drawable-xxhdpi/ic_playlist_add_check_black_36dp.png
new file mode 100644
index 0000000..38b8b27
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_playlist_add_check_black_36dp.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_autorenew_black_36dp.png b/app/src/main/res/drawable-xxxhdpi/ic_autorenew_black_36dp.png
new file mode 100644
index 0000000..5f614e4
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_autorenew_black_36dp.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_filter_none_black_36dp.png b/app/src/main/res/drawable-xxxhdpi/ic_filter_none_black_36dp.png
new file mode 100644
index 0000000..d88cd35
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_filter_none_black_36dp.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_playlist_add_check_black_36dp.png b/app/src/main/res/drawable-xxxhdpi/ic_playlist_add_check_black_36dp.png
new file mode 100644
index 0000000..2542690
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_playlist_add_check_black_36dp.png differ
diff --git a/app/src/main/res/layout/layout_apps.xml b/app/src/main/res/layout/layout_apps.xml
index 00d46d6..33e0748 100644
--- a/app/src/main/res/layout/layout_apps.xml
+++ b/app/src/main/res/layout/layout_apps.xml
@@ -3,7 +3,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
android:duplicateParentState="true">
<!--
@@ -25,14 +24,14 @@
</ListView>
- <RelativeLayout
+ <LinearLayout
android:id="@+id/layout_button_filters"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="horizontal" >
- <Button
+ <android.support.v7.widget.AppCompatImageButton
android:id="@+id/button_proxy_all"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -40,26 +39,31 @@
android:layout_alignParentStart="true"
android:layout_toLeftOf="@+id/button_proxy_none"
android:layout_toStartOf="@+id/button_proxy_none"
- android:text="@string/button_proxy_all" />
- <Button
+ android:layout_weight="1"
+ android:src="@drawable/ic_playlist_add_check_black_36dp"/>
+
+ <android.support.v7.widget.AppCompatImageButton
android:id="@+id/button_invert_selection"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true"
- android:text="@string/button_invert_selection" />
- <Button
+ android:layout_weight="1"
+ android:src="@drawable/ic_autorenew_black_36dp"/>
+
+ <android.support.v7.widget.AppCompatImageButton
android:id="@+id/button_proxy_none"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
+ android:layout_weight="1"
android:layout_toLeftOf="@+id/button_invert_selection"
android:layout_toStartOf="@+id/button_invert_selection"
- android:text="@string/button_proxy_none" />
+ android:src='@drawable/ic_filter_none_black_36dp' />
- </RelativeLayout>
+ </LinearLayout>
</RelativeLayout>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index f3aa4a8..26a7aeb 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -218,7 +218,7 @@
<string name="polipo_version">Polipo v1.1.9: https://github.com/jech/polipo</string>
<string name="iptables_version">IPtables v1.4.21: http://www.netfilter.org</string>
<string name="openssl_version">OpenSSL v1.0.2j: http://www.openssl.org</string>
- <string name="hidden_service_request">An app wants to open hidden server port %S to the Tor network. This is safe if you trust the app.</string>
+ <string name="hidden_service_request">An app wants to open hidden server port %1$s to the Tor network. This is safe if you trust the app.</string>
<string name="found_existing_tor_process">found existing Tor process…</string>
<string name="something_bad_happened">Something bad happened. Check the log</string>
<string name="hidden_service_on">hidden service on:</string>
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits