summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjrizzoli <joey@cyanogenmoditalia.it>2015-10-27 22:12:54 +0100
committerjrizzoli <joey@cyanogenmoditalia.it>2015-11-05 14:48:35 +0100
commitf3f50e2fb146e1d30f290ae82ccf19e903e0a377 (patch)
treeac2eda346d41370f489f5854a51ea0a33fe23271
parentdd494bf73c2a36922a5dc0b7f93756afd4a0cec8 (diff)
downloadandroid_packages_apps_Gello-f3f50e2fb146e1d30f290ae82ccf19e903e0a377.tar.gz
android_packages_apps_Gello-f3f50e2fb146e1d30f290ae82ccf19e903e0a377.tar.bz2
android_packages_apps_Gello-f3f50e2fb146e1d30f290ae82ccf19e903e0a377.zip
gello: revamp edge setup ui
CYAN-7103 Change-Id: I40c05c82858298fd11ef598d7e3971bdc0ba5081 Signed-off-by: jrizzoli <joey@cyanogenmoditalia.it>
-rw-r--r--res/drawable-nodpi/edge_header.pngbin0 -> 42056 bytes
-rwxr-xr-xres/layout/tab.xml131
-rw-r--r--res/values/strings.xml7
3 files changed, 79 insertions, 59 deletions
diff --git a/res/drawable-nodpi/edge_header.png b/res/drawable-nodpi/edge_header.png
new file mode 100644
index 00000000..981fd60e
--- /dev/null
+++ b/res/drawable-nodpi/edge_header.png
Binary files differ
diff --git a/res/layout/tab.xml b/res/layout/tab.xml
index 003c814a..68eeaf61 100755
--- a/res/layout/tab.xml
+++ b/res/layout/tab.xml
@@ -28,7 +28,7 @@
<ImageView android:id="@+id/navview_opacity"
android:layout_gravity="top"
android:scaleType="fitStart"
- android:background="@android:color/black"
+ android:background="@color/black"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent" />
@@ -61,78 +61,95 @@
android:layout_width="10dp"
android:layout_height="match_parent" />
+ <!-- Edge setup screen -->
+
<LinearLayout android:id="@+id/edge_sliding_settings"
android:layout_width="match_parent"
- android:layout_height="match_parent"
+ android:layout_height="fill_parent"
android:visibility="gone"
- android:background="#00838f"
- android:alpha="0.92"
+ android:background="@color/mynav_primary"
+ android:layout_gravity="top"
android:orientation="vertical">
- <TextView
- android:layout_width="wrap_content"
+ <ImageView
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:gravity="center_horizontal|center_vertical"
- android:layout_weight=".25"
- android:textSize="32sp"
- android:textColor="@color/white"
- android:text="@string/pref_edge_swipe_title"/>
-
- <TextView
- android:layout_width="wrap_content"
+ android:paddingTop="32dp"
+ android:layout_alignParentTop="true"
+ android:layout_centerHorizontal="true"
+ android:adjustViewBounds="true"
+ android:src="@drawable/edge_header"/>
+
+ <FrameLayout android:id="@+id/edge_title_layout"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:textSize="21sp"
- android:textColor="@color/white"
- android:text="@string/pref_edge_swipe_option_msg"/>
-
- <RadioGroup
- android:id="@+id/edge_sliding_settings_options"
+ android:paddingTop="16dp">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textSize="32sp"
+ android:textColor="@color/white"
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp"
+ android:layout_gravity="top"
+ android:text="@string/pref_edge_swipe_title"/>
+ </FrameLayout>
+ <LinearLayout android:id="@+id/edge_content_layout"
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp"
+ android:paddingTop="16dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_weight=".25"
- android:layout_gravity="center_horizontal"
- android:padding="10dp"
- android:orientation="vertical">
- <RadioButton
- android:id="@+id/edge_sliding_settings_options_temporal"
+ android:orientation="vertical"
+ android:layout_gravity="top">
+ <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/pref_temporal_edge_swipe"
android:textColor="@color/white"
- android:drawableEnd="@drawable/deco_swipe_temporal"
android:textSize="18sp"
- android:padding="10dp"/>
- <RadioButton
- android:id="@+id/edge_sliding_settings_options_spatial"
+ android:text="@string/pref_edge_swipe_setup_desc"/>
+ <RadioGroup
+ android:id="@+id/edge_sliding_settings_options"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/pref_spatial_edge_swipe"
- android:textColor="@color/white"
- android:drawableEnd="@drawable/deco_swipe_spatial"
- android:textSize="18sp"
- android:visibility="gone"
- android:padding="10dp"/>
- <RadioButton
- android:id="@+id/edge_sliding_settings_options_disabled"
+ android:orientation="horizontal"
+ android:paddingTop="16dp"
+ android:paddingBottom="24dp">
+ <RadioButton
+ android:id="@+id/edge_sliding_settings_options_temporal"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/pref_edge_enable"
+ android:textColor="@color/white"
+ android:paddingEnd="48dp"
+ android:textSize="18sp"/>
+ <RadioButton
+ android:id="@+id/edge_sliding_settings_options_spatial"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/pref_edge_enable"
+ android:textColor="@color/white"
+ android:textSize="18sp"
+ android:visibility="gone"/>
+ <RadioButton
+ android:id="@+id/edge_sliding_settings_options_disabled"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/pref_edge_disable"
+ android:textColor="@color/white"
+ android:textSize="18sp"/>
+ </RadioGroup>
+ <Button
+ android:id="@+id/edge_sliding_settings_close_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/pref_disable_edge_swipe"
- android:textColor="@color/white"
- android:textSize="18sp"
- android:padding="10dp"/>
- </RadioGroup>
-
- <Button
- android:id="@+id/edge_sliding_settings_close_btn"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/pref_edge_swipe_option_close"
- android:padding="10dp"
- android:gravity="center_horizontal|center_vertical"
- android:layout_gravity="center"
- style="@android:style/Widget.Holo.Button.Borderless"/>
-
+ android:paddingEnd="16dp"
+ android:text="@string/pref_edge_swipe_option_close"
+ android:textColor="@color/mynav_accent"
+ android:textSize="16dp"
+ android:layout_alignParentEnd="true"
+ android:gravity="end"
+ style="@android:style/Widget.Material.Button.Borderless"/>
+ </LinearLayout>
</LinearLayout>
</com.android.browser.DraggableFrameLayout>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 90b8962b..c78cdb9c 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -484,12 +484,12 @@
<string name="pref_default_text_encoding">Text encoding</string>
<!-- Do not translate. Actual encoding values. Must be valid text encodings understandable from WebKit. -->
<string name="pref_default_text_encoding_default">UTF-8</string>
- <string name="pref_edge_swipe_title">Edge swipe</string>
+ <string name="pref_edge_swipe_title">Edge navigation</string>
<string name="pref_edge_swipe_option_msg">When swiping, would you like:</string>
<string name="pref_temporal_edge_swipe">Previous/Next Web Site</string>
<string name="pref_spatial_edge_swipe">Change Tab</string>
<string name="pref_disable_edge_swipe">Do nothing</string>
- <string name="pref_edge_swipe_option_close">Close</string>
+ <string name="pref_edge_swipe_option_close">Choose later</string>
<string name="pref_temporal_edge_swipe_enabled_toast">Swipe from edge to navigate</string>
<string name="pref_spatial_edge_swipe_enabled_toast">Swipe from edge to change tabs</string>
<string name="pref_edge_swipe_disabled_toast">Swiping from edge disabled</string>
@@ -501,6 +501,9 @@
-->
<item>@string/pref_disable_edge_swipe</item>
</string-array>
+ <string name="pref_edge_swipe_setup_desc">Swipe from the edge to navigate across history.\nThis feature may conflict with websites using edge-based actions</string>
+ <string name="pref_edge_enable">Enable</string>
+ <string name="pref_edge_disable">Disable</string>
<string name="pref_coloredsb_title">Colored statusbar</string>
<string name="pref_coloredsb_summary">Statusbar will change color basing on the visited page</string>
<!-- Title for accessibility settings [CHAR LIMIT=25] -->