[tor-commits] [orbot/master] update resources for new design
n8fr8 at torproject.org
n8fr8 at torproject.org
Fri Apr 3 17:04:04 UTC 2015
commit 48f40b34946f8f6d6b8ced47a47319b8a737f8b6
Author: Nathan Freitas <nathan at freitas.net>
Date: Mon Feb 2 11:26:43 2015 -0500
update resources for new design
---
res/layout/layout_main.xml | 128 ++++++++++++++++++++++++++++++++------------
res/menu/orbot_main.xml | 69 ++++++++++++++++++++++++
res/raw/pluto.properties | 3 ++
res/values/colors.xml | 6 +++
res/xml/preferences.xml | 38 +++----------
5 files changed, 180 insertions(+), 64 deletions(-)
diff --git a/res/layout/layout_main.xml b/res/layout/layout_main.xml
index ecf32fe..31ac710 100644
--- a/res/layout/layout_main.xml
+++ b/res/layout/layout_main.xml
@@ -4,14 +4,43 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"
- android:backgroundTint="@color/panel_background"
>
-
+
+ <android.support.v7.widget.Toolbar
+ android:id="@+id/toolbar"
+ android:layout_width="match_parent"
+ android:background="@color/panel_background"
+ android:layout_height="?attr/actionBarSize"
+
+ />
+
+ <android.support.v4.widget.DrawerLayout
+ android:id="@+id/drawer_layout"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ >
+
+<LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:id="@+id/content_frame"
+ >
+
<LinearLayout android:gravity="center_vertical|center_horizontal"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@color/panel_background"
+
>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:background="@color/panel_background_dark"
+
+ >
+
<!--
<TextView android:id="@+id/lblStatus"
@@ -80,6 +109,7 @@
android:gravity="center_vertical"
android:fontFamily="sans-serif-light"
/>
+
<TextView
android:id="@+id/trafficUp"
android:textColor="#ccff2a"
@@ -93,44 +123,76 @@
</RelativeLayout>
</LinearLayout>
-
- <org.torproject.android.ImageProgressView
+ <FrameLayout
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ >
+ <org.torproject.android.ui.ImageProgressView
android:id="@+id/imgStatus"
android:layout_width="match_parent"
- android:layout_height="0dp"
+ android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:padding="0dp"
- android:layout_weight="1"
+
android:src="@drawable/toroff"
- android:layout_gravity="center_horizontal" />
+ android:layout_gravity="center_horizontal|center_vertical" />
+
+ <TextView
+ android:id="@+id/lblStatus"
+ android:textColor="@android:color/white"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textSize="20sp"
+ android:gravity="center_vertical"
+ android:fontFamily="sans-serif-light"
+ android:text=" "
+ android:background="#aa333333"
+ android:layout_gravity="center_horizontal|center_vertical"
+ android:layout_marginBottom="30dp"
+ />
+ </FrameLayout>
- <LinearLayout android:gravity="center_horizontal"
- android:orientation="horizontal" android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:padding="5dp"
- android:background="@color/panel_background"
-
- >
-
- <Button
- android:id="@+id/btnBrowser"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Open Browser"
- android:enabled="false"
- />
-
- <Button
- android:id="@+id/btnVPN"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Start VPN"
- android:enabled="false"
-
- />
-
+ <LinearLayout android:gravity="center_horizontal"
+ android:orientation="horizontal" android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="5dp"
+ android:background="@color/panel_background_dark"
+
+ >
+
+ <Button
+ android:id="@+id/btnBrowser"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Open Browser"
+ android:enabled="false"
+ />
+
+ <Button
+ android:id="@+id/btnVPN"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Start VPN"
+ android:enabled="false"
+
+ />
+
+ </LinearLayout>
+ </LinearLayout>
</LinearLayout>
+ <LinearLayout
+ android:layout_width="240dp"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:id="@+id/left_drawer"
+ android:layout_gravity="start"
+ android:background="@color/panel_background"
+ >
+ </LinearLayout>
+
+ </android.support.v4.widget.DrawerLayout>
</LinearLayout>
diff --git a/res/menu/orbot_main.xml b/res/menu/orbot_main.xml
new file mode 100644
index 0000000..915aa3e
--- /dev/null
+++ b/res/menu/orbot_main.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright (C) 2008 Esmertec AG.
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+<menu xmlns:yourapp="http://schemas.android.com/apk/res-auto"
+ xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:id="@+id/menu_start"
+ android:title="@string/menu_start"
+ android:icon="@drawable/ic_action_start"
+ yourapp:showAsAction="never"
+ />
+
+ <item android:id="@+id/menu_settings"
+ android:title="@string/menu_settings"
+ android:icon="@drawable/ic_action_settings"
+ yourapp:showAsAction="always"
+ />
+
+<!--
+ <item android:id="@+id/menu_verify"
+ android:title="@string/menu_verify_browser"
+ android:icon="@drawable/ic_action_browse"
+ yourapp:showAsAction="never"
+
+ />
+
+ <item android:id="@+id/menu_vpn"
+ android:title="@string/menu_vpn"
+ yourapp:showAsAction="never"/>
+ -->
+
+ <item android:id="@+id/menu_about"
+ android:title="@string/menu_about"
+ android:icon="@drawable/ic_menu_about"
+ yourapp:showAsAction="never"
+
+ />
+
+ <item android:id="@+id/menu_wizard"
+ android:title="@string/menu_wizard"
+ android:icon="@drawable/ic_menu_goto"
+ yourapp:showAsAction="never"
+
+ />
+
+ <item android:id="@+id/menu_exit"
+ android:title="@string/menu_exit"
+ android:icon="@drawable/ic_menu_exit"
+ yourapp:showAsAction="never"
+
+ />
+
+</menu>
diff --git a/res/raw/pluto.properties b/res/raw/pluto.properties
new file mode 100644
index 0000000..74c0307
--- /dev/null
+++ b/res/raw/pluto.properties
@@ -0,0 +1,3 @@
+obfs2=obfsclient
+obfs3=obfsclient
+scramblesuit=obfsclient
diff --git a/res/values/colors.xml b/res/values/colors.xml
new file mode 100644
index 0000000..3454a7b
--- /dev/null
+++ b/res/values/colors.xml
@@ -0,0 +1,6 @@
+
+ <resources>
+ <color name="panel_background">#460072</color>
+ <color name="panel_background_dark">#240020</color>
+
+ </resources>
diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml
index 15f1c32..b84fe76 100644
--- a/res/xml/preferences.xml
+++ b/res/xml/preferences.xml
@@ -8,14 +8,6 @@ android:title="@string/pref_start_boot_title"
android:summary="@string/pref_start_boot_summary"
android:enabled="true"/>
-<CheckBoxPreference
-android:defaultValue="false"
-android:key="has_root"
-android:title="@string/pref_has_root"
-android:summary="@string/pref_has_root_summary"
-android:enabled="true"/>
-
-
<CheckBoxPreference
android:defaultValue="true"
android:key="pref_persistent_notifications"
@@ -39,20 +31,19 @@ android:title="@string/pref_use_expanded_notifications_title"/>
android:defaultValue="en">
</ListPreference>
-<!--
-<CheckBoxPreference
-android:defaultValue="false"
-android:key="use_whispercore"
-android:title="@string/pref_use_whispercore"
-android:summary="@string/pref_use_whispercore_summary"
-android:enabled="true"/>
- -->
</PreferenceCategory>
<PreferenceCategory android:title="@string/pref_trans_proxy_group">
<CheckBoxPreference
android:defaultValue="false"
+android:key="has_root"
+android:title="@string/pref_has_root"
+android:summary="@string/pref_has_root_summary"
+android:enabled="true"/>
+
+<CheckBoxPreference
+android:defaultValue="false"
android:key="pref_transparent"
android:title="@string/pref_trans_proxy_title"
android:summary="@string/pref_trans_proxy_summary"
@@ -269,20 +260,5 @@ android:summary="@string/pref_transproxy_flush_summary"
android:enabled="true"
android:title="@string/pref_transproxy_flush_title"/>
-<!--
-<CheckBoxPreference
-android:defaultValue="false"
-android:key="pref_transparent_port_fallback"
-android:summary="@string/pref_transparent_port_fallback_summary"
-android:enabled="true"
-android:title="@string/pref_transparent_port_fallback_title"/>
-
-<EditTextPreference android:key="pref_port_list"
-android:defaultValue="80,443,8080,8888,8443"
-android:title="@string/pref_transparent_port_title"
-android:summary="@string/pref_transparent_port_summary"
-android:dialogTitle="@string/pref_transparent_port_dialog"
-/>
- -->
</PreferenceCategory>
</PreferenceScreen>
More information about the tor-commits
mailing list