summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjrizzoli <joey@cyanogenmoditalia.it>2015-10-25 18:22:38 +0100
committerjrizzoli <joey@cyanogenmoditalia.it>2015-11-05 14:50:58 +0100
commit38a81f6e201a0a4c01756e741352cb36af0ced58 (patch)
tree1237146c1f1cc6bd8b7000d0b10dabb99d36a78d
parent700a8679941a856b609928776097a6784605d8df (diff)
downloadandroid_packages_apps_Gello-38a81f6e201a0a4c01756e741352cb36af0ced58.tar.gz
android_packages_apps_Gello-38a81f6e201a0a4c01756e741352cb36af0ced58.tar.bz2
android_packages_apps_Gello-38a81f6e201a0a4c01756e741352cb36af0ced58.zip
gello: revamp add/edit bookmark UI
Change-Id: I24f3fc03a4c9c3b07b7d1a983927b31eab74a8f4 Signed-off-by: jrizzoli <joey@cyanogenmoditalia.it>
-rw-r--r--AndroidManifest.xml.jinja22
-rw-r--r--res/drawable/fab_accent_mynav.xml19
-rw-r--r--res/drawable/floating_action_button_mynav.xml24
-rw-r--r--res/drawable/ic_download_address.xml13
-rw-r--r--res/drawable/ic_download_ok.xml13
-rw-r--r--res/layout/browser_add_bookmark_content.xml385
-rw-r--r--res/layout/download_settings.xml36
-rw-r--r--res/values-v21/styles.xml6
-rw-r--r--res/values/colors.xml6
-rwxr-xr-xres/values/dimensions.xml2
-rw-r--r--src/com/android/browser/AddBookmarkFolder.java25
-rw-r--r--src/com/android/browser/AddBookmarkPage.java40
12 files changed, 325 insertions, 246 deletions
diff --git a/AndroidManifest.xml.jinja2 b/AndroidManifest.xml.jinja2
index 6be8755d..feca4024 100644
--- a/AndroidManifest.xml.jinja2
+++ b/AndroidManifest.xml.jinja2
@@ -240,7 +240,7 @@
<activity android:name="com.android.browser.AddBookmarkPage"
android:label="@string/bookmarks_add_page"
- android:theme="@style/DialogWhenLarge"
+ android:theme="@style/MyNavAddStyle"
android:configChanges="orientation|keyboardHidden|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
diff --git a/res/drawable/fab_accent_mynav.xml b/res/drawable/fab_accent_mynav.xml
new file mode 100644
index 00000000..31910acb
--- /dev/null
+++ b/res/drawable/fab_accent_mynav.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 The CyanogenMod 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.
+-->
+<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
+ <solid android:color="@color/mynav_accent" />
+</shape>
diff --git a/res/drawable/floating_action_button_mynav.xml b/res/drawable/floating_action_button_mynav.xml
new file mode 100644
index 00000000..e2add231
--- /dev/null
+++ b/res/drawable/floating_action_button_mynav.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 The CyanogenMod 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.
+-->
+<ripple xmlns:android="http://schemas.android.com/apk/res/android"
+ android:color="@color/floating_action_button_touch_tint_mynav">
+<item android:id="@android:id/mask">
+ <shape android:shape="oval">
+ <solid android:color="@color/mynav_accent" />
+ </shape>
+ </item>
+</ripple>
diff --git a/res/drawable/ic_download_address.xml b/res/drawable/ic_download_address.xml
new file mode 100644
index 00000000..eeab69bb
--- /dev/null
+++ b/res/drawable/ic_download_address.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <path
+ android:fillColor="@color/icon_black"
+ android:pathData="M12 10.9c-.61 0-1.1 .49 -1.1 1.1s.49 1.1 1.1 1.1c.61 0 1.1-.49
+1.1-1.1s-.49-1.1-1.1-1.1zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48
+10-10S17.52 2 12 2zm2.19 12.19L6 18l3.81-8.19L18 6l-3.81 8.19z" />
+</vector>
diff --git a/res/drawable/ic_download_ok.xml b/res/drawable/ic_download_ok.xml
new file mode 100644
index 00000000..3f2b47e4
--- /dev/null
+++ b/res/drawable/ic_download_ok.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <path
+ android:pathData="M0 0h24v24h-24z" />
+ <path
+ android:fillColor="@color/white"
+ android:pathData="M9 16.17l-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41z" />
+</vector>
diff --git a/res/layout/browser_add_bookmark_content.xml b/res/layout/browser_add_bookmark_content.xml
index 61706e7b..2f774cf8 100644
--- a/res/layout/browser_add_bookmark_content.xml
+++ b/res/layout/browser_add_bookmark_content.xml
@@ -1,20 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
+<!--
+ Copyright (C) 2015 The CyanogenMod 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
+ 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
+ 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.
+ 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.
-->
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical" >
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
+<!-- BS -->
<LinearLayout android:id="@+id/crumb_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -46,182 +51,216 @@
android:layout_gravity="center_vertical"
android:paddingEnd="8dip" />
</LinearLayout>
- <LinearLayout android:id="@+id/title_holder"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:paddingStart="5dip"
- android:paddingEnd="5dip"
- android:minHeight="?android:attr/listPreferredItemHeightSmall"
- >
- <TextView android:id="@+id/fake_title"
- android:layout_width="0dip"
- android:layout_weight="1"
- android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- android:gravity="center_vertical"
- android:drawableStart="@drawable/ic_action_bookmark"
- android:text="@string/bookmark_this_page"
- android:textAppearance="?android:attr/textAppearanceMedium" />
- <View android:id="@+id/remove_divider"
- android:layout_width="1dip"
- android:layout_height="match_parent"
- android:background="?android:attr/dividerVertical"
- android:visibility="gone"
- />
- <TextView android:id="@+id/remove"
- android:layout_width="wrap_content"
+<!-- /BS -->
+
+ <LinearLayout android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:background="@color/white"
+ android:elevation="0dp" >
+
+ <LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- android:gravity="center_vertical"
- android:text="@string/remove"
- android:drawableStart="@drawable/ic_action_trash_normal"
- android:visibility="gone"
- android:textAppearance="?android:attr/textAppearanceMedium" />
- </LinearLayout>
+ android:background="@color/mynav_primary" >
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="0dip"
- android:layout_weight="1">
- <ScrollView
- android:layout_width="match_parent"
- android:layout_height="match_parent">
- <TableLayout android:id="@+id/default_view"
+ <LinearLayout android:id="@+id/actions_download_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:stretchColumns="1"
- android:shrinkColumns="1"
- android:paddingTop="10dip"
- android:paddingStart="20dip"
- android:paddingEnd="20dip" >
- <TableRow android:layout_marginBottom="10dip">
- <TextView
- android:id="@+id/titleText"
+ android:orientation="vertical"
+ android:paddingStart="16dp"
+ android:paddingTop="16dp" >
+ <LinearLayout
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:layout_gravity="center_vertical"
- android:text="@string/name"
- android:textAppearance="?android:attr/textAppearanceMedium" />
+ android:orientation="horizontal" >
+ <ImageButton
+ android:id="@+id/book_cancel"
+ style="?android:attr/buttonBarButtonStyle"
+ android:layout_width="32dp"
+ android:layout_height="32dp"
+ android:src="@drawable/ic_action_back"/>
+ <ImageButton
+ android:id="@+id/remove"
+ style="?android:attr/buttonBarButtonStyle"
+ android:layout_width="32dp"
+ android:layout_height="32dp"
+ android:gravity="end"
+ android:visibility="gone"
+ android:src="@drawable/ic_action_close"/>
+ </LinearLayout>
+ <ImageView
+ android:layout_width="match_parent"
+ android:layout_height="56dp"
+ android:src="@color/mynav_primary"/>
+ <LinearLayout android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingStart="26dp"
+ android:paddingEnd="16dp"
+ android:paddingBottom="32dp">
+ <EditText
+ android:id="@+id/title"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:inputType="textCapSentences|textNoSuggestions"
+ android:selectAllOnFocus="true"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textSize="32dp"
+ android:textColor="@color/white"
+ android:hint="@string/download_name_hint"
+ android:textColorHint="@color/icon_white" />
+ </LinearLayout>
- <EditText
- android:id="@+id/title"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:layout_marginStart="20dip"
- android:inputType="textCapSentences|textNoSuggestions"
- android:ellipsize="end"
- android:textAppearance="?android:attr/textAppearanceMedium" />
- </TableRow>
-
- <TableRow
- android:layout_marginBottom="10dip"
- android:id="@+id/row_address">
- <TextView
- android:id="@+id/addressText"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:layout_gravity="center_vertical"
- android:text="@string/location"
- android:textAppearance="?android:attr/textAppearanceMedium" />
+ </LinearLayout>
- <EditText
- android:id="@+id/address"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:layout_marginStart="20dip"
- android:hint="@string/http"
- android:inputType="textUri"
- android:ellipsize="end"
- android:textAppearance="?android:attr/textAppearanceMedium" />
- </TableRow>
- <TableRow android:layout_marginBottom="10dip"
- android:id="@+id/row_account">
- <TextView
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:layout_gravity="center_vertical"
- android:text="@string/account"
- android:textAppearance="?android:attr/textAppearanceMedium" />
-
- <Spinner
- android:id="@+id/accounts"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:layout_marginStart="20dip"
- android:spinnerMode="dropdown"
- />
- </TableRow>
- <TableRow android:layout_marginBottom="10dip">
- <TextView
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:layout_gravity="center_vertical"
- android:text="@string/containing_folder"
- android:textAppearance="?android:attr/textAppearanceMedium" />
+ </LinearLayout>
- <view class="com.android.browser.addbookmark.FolderSpinner"
- android:id="@+id/folder"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:layout_marginStart="20dip"
- android:spinnerMode="dropdown"
- />
- </TableRow>
- </TableLayout>
- </ScrollView>
-
- <LinearLayout android:id="@+id/folder_selector"
+ <FrameLayout
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
- android:visibility="gone"
- >
+ android:layout_height="0dip"
+ android:layout_weight="1"
+ android:paddingTop="32dp">
- <view class="com.android.browser.AddBookmarkPage$CustomListView"
- android:id="@+id/list"
- android:layout_marginStart="16dip"
- android:layout_marginEnd="16dip"
+ <ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
- />
- <TextView
- android:id="@+id/empty"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:visibility="gone"
- android:layout_marginStart="16dip"
- android:layout_marginTop="16dip"
- android:text="@string/no_subfolders"
- android:contentDescription="@string/no_subfolders"
- android:textStyle="italic"
- android:textAppearance="?android:attr/textAppearanceMedium" />
- </LinearLayout>
+ android:elevation="5dp" >
- </FrameLayout>
+ <LinearLayout
+ android:id="@+id/default_view"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp"
+ android:paddingTop="8dp"
+ android:orientation="vertical" >
- <LinearLayout
- android:layout_width="match_parent"
+ <LinearLayout android:layout_width="match_parent"
+ android:layout_height="72dp"
+ android:orientation="horizontal"
+ android:layout_marginBottom="8dp"
+ android:layout_gravity="center">
+ <ImageView
+ android:layout_height="@dimen/download_icon_size"
+ android:layout_width="@dimen/download_icon_size"
+ android:src="@drawable/ic_download_address"
+ android:layout_gravity="center"/>
+ <EditText
+ android:id="@+id/address"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:layout_gravity="center"
+ android:layout_alignParentEnd="true"
+ android:hint="@string/http"
+ android:inputType="textUri"
+ android:textColor="@color/black"
+ android:paddingStart="16dp"
+ android:paddingBottom="16dp"
+ android:textSize="18sp" />
+ </LinearLayout>
+
+ <LinearLayout android:layout_width="match_parent"
+ android:layout_height="72dp"
+ android:orientation="horizontal"
+ android:layout_marginBottom="8dp"
+ android:layout_gravity="center"
+ android:visibility="gone">
+ <ImageView
+ android:layout_height="@dimen/download_icon_size"
+ android:layout_width="@dimen/download_icon_size"
+ android:src="@android:color/transparent"/>
+ <LinearLayout android:id="@+id/row_account"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:paddingStart="16dp"
+ android:paddingBottom="16dp">
+ <Spinner
+ android:id="@+id/accounts"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:spinnerMode="dropdown"/>
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textColor="@color/download_text_hint"
+ android:text="@string/account"
+ android:textSize="@dimen/download_text_hint" />
+ </LinearLayout>
+ </LinearLayout>
+
+ <LinearLayout android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:layout_marginBottom="8dp"
+ android:layout_gravity="center">
+ <ImageView
+ android:layout_height="@dimen/download_icon_size"
+ android:layout_width="@dimen/download_icon_size"
+ android:src="@drawable/ic_download_path"/>
+ <view class="com.android.browser.addbookmark.FolderSpinner"
+ android:id="@+id/folder"
+ android:textSize="24dp"
+ android:paddingTop="8dp"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:spinnerMode="dropdown"/>
+ </LinearLayout>
+
+ <LinearLayout android:layout_width="match_parent"
+ android:layout_height="72dp"
+ android:orientation="horizontal"
+ android:layout_marginBottom="8dp"
+ android:layout_gravity="center"
+ android:visibility="gone">
+ <ImageView
+ android:layout_height="@dimen/download_icon_size"
+ android:layout_width="@dimen/download_icon_size"
+ android:src="@android:color/transparent"/>
+ <LinearLayout android:id="@+id/folder_selector"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:paddingStart="16dp"
+ android:paddingBottom="16dp">
+ <view class="com.android.browser.AddBookmarkPage$CustomListView"
+ android:id="@+id/list"
+ android:layout_marginStart="16dip"
+ android:layout_marginEnd="16dip"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"/>
+ <TextView
+ android:id="@+id/empty"
+ android:visibility="gone"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textColor="@color/download_text_hint"
+ android:text="@string/no_subfolders"
+ android:contentDescription="@string/no_subfolders"
+ android:textSize="@dimen/download_text_hint" />
+ </LinearLayout>
+ </LinearLayout>
+ </LinearLayout>
+ </ScrollView>
+ </FrameLayout>
+ </LinearLayout>
+
+ <!-- Download FAB -->
+ <LinearLayout style="?android:attr/buttonBarStyle"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
- android:gravity="end"
- style="?android:attr/buttonBarStyle">
- <Button android:id="@+id/delete"
- android:visibility="gone"
- android:text="@string/remove_bookmark"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- style="?android:attr/buttonBarButtonStyle" />
- <Button android:id="@+id/cancel"
- android:text="@string/cancel"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- style="?android:attr/buttonBarButtonStyle" />
- <Button android:id="@+id/OK"
- android:text="@string/ok"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- style="?android:attr/buttonBarButtonStyle" />
+ android:layout_gravity="top|end"
+ android:paddingTop="152dp"
+ android:paddingEnd="16dp">
+ <FrameLayout android:id="@+id/floating_action_button_container"
+ style="@style/floating_action_button"
+ android:background="@drawable/fab_accent_mynav">
+ <ImageButton
+ android:id="@+id/OK"
+ style="@style/floating_action_button_image"
+ android:background="@drawable/floating_action_button_mynav"
+ android:src="@drawable/ic_download_ok" />
+ </FrameLayout>
</LinearLayout>
-
-</merge>
+</FrameLayout>
diff --git a/res/layout/download_settings.xml b/res/layout/download_settings.xml
index 8a453752..374f51c6 100644
--- a/res/layout/download_settings.xml
+++ b/res/layout/download_settings.xml
@@ -89,7 +89,7 @@
android:orientation="vertical" >
<LinearLayout android:layout_width="match_parent"
- android:layout_height="72dp"
+ android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="8dp"
android:layout_gravity="center">
@@ -114,63 +114,65 @@
</LinearLayout>
<LinearLayout android:layout_width="match_parent"
- android:layout_height="72dp"
+ android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="8dp"
android:layout_gravity="center">
<ImageView
android:layout_height="@dimen/download_icon_size"
android:layout_width="@dimen/download_icon_size"
- android:src="@drawable/ic_download_size"/>
+ android:src="@drawable/ic_download_size"
+ android:gravity="center"/>
<LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingStart="16dp"
android:paddingBottom="16dp">
<TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textColor="@color/black"
+ android:text="@string/download_size_hint"
+ android:textSize="18sp" />
+ <TextView
android:id="@+id/download_estimate_size_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="@string/download_filesize"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="@color/black"
- android:textSize="18sp" />
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
android:textColor="@color/download_text_hint"
- android:text="@string/download_size_hint"
android:textSize="@dimen/download_text_hint" />
</LinearLayout>
</LinearLayout>
<LinearLayout android:layout_width="match_parent"
- android:layout_height="72dp"
+ android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="center">
<ImageView
android:layout_height="@dimen/download_icon_size"
android:layout_width="@dimen/download_icon_size"
- android:src="@drawable/ic_download_eta"/>
+ android:src="@drawable/ic_download_eta"
+ android:gravity="center"/>
<LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="16dp"
android:paddingStart="16dp">
<TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/download_eta_hint"
+ android:textColor="@color/black"
+ android:textSize="18sp" />
+ <TextView
android:id="@+id/download_estimate_time_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="@string/download_timeneeded"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="@color/black"
- android:textSize="18sp" />
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/download_eta_hint"
android:textColor="@color/download_text_hint"
android:textSize="@dimen/download_text_hint" />
</LinearLayout>
diff --git a/res/values-v21/styles.xml b/res/values-v21/styles.xml
index d1a37d57..3c888734 100644
--- a/res/values-v21/styles.xml
+++ b/res/values-v21/styles.xml
@@ -60,6 +60,12 @@
<item name="android:colorPrimaryDark">@color/accent_dark</item>
<item name="android:colorAccent">@color/icon_white</item>
</style>
+ <style name="MyNavAddStyle" parent="@style/DialogWhenLarge">
+ <item name="android:colorPrimary">@color/mynav_primary</item>
+ <item name="android:colorPrimaryDark">@color/mynav_primary_dark</item>
+ <item name="android:colorAccent">@color/mynav_accent</item>
+ </style>
+
<style name="PopupMenuStyle" parent="@android:style/Widget.Material.Light.PopupMenu">
</style>
<style name="Suggestions" parent="@android:style/Widget.Material.AutoCompleteTextView">
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 0f7fd2dd..86359ece 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -44,6 +44,12 @@
<color name="floating_action_button_touch_tint">#DBA000</color>
<color name="download_text_hint">#b3b3b3</color>
+ <color name="mynav_primary">#37474F</color>
+ <color name="mynav_primary_dark">#263238</color>
+ <color name="mynav_accent">#009688</color>
+ <color name="floating_action_button_touch_tint_mynav">#00796B</color>
+
+
<!-- derived colors -->
<color name="NavigationBarBackground">@color/primary</color>
<color name="NavigationBarBackgroundIncognito">@color/black</color>
diff --git a/res/values/dimensions.xml b/res/values/dimensions.xml
index 4d045051..4853179c 100755
--- a/res/values/dimensions.xml
+++ b/res/values/dimensions.xml
@@ -88,7 +88,7 @@
<dimen name="SiteTileOverlineWidth">1dp</dimen>
- <dimen name="download_icon_size">46dp</dimen>
+ <dimen name="download_icon_size">36dp</dimen>
<dimen name="download_text_hint">18sp</dimen>
<!-- FAB Dimensions -->
diff --git a/src/com/android/browser/AddBookmarkFolder.java b/src/com/android/browser/AddBookmarkFolder.java
index a396ee83..78686d17 100644
--- a/src/com/android/browser/AddBookmarkFolder.java
+++ b/src/com/android/browser/AddBookmarkFolder.java
@@ -124,8 +124,6 @@ public class AddBookmarkFolder extends Activity implements View.OnClickListener,
private BreadCrumbView mCrumbs;
- private TextView mFakeTitle;
-
private View mCrumbHolder;
private AddBookmarkPage.CustomListView mListView;
@@ -138,8 +136,6 @@ public class AddBookmarkFolder extends Activity implements View.OnClickListener,
private View mRemoveLink;
- private View mFakeTitleHolder;
-
private FolderSpinnerAdapter mFolderAdapter;
private Spinner mAccountSpinner;
@@ -229,8 +225,7 @@ public class AddBookmarkFolder extends Activity implements View.OnClickListener,
private void switchToDefaultView(boolean changedFolder) {
mFolderSelector.setVisibility(View.GONE);
mDefaultView.setVisibility(View.VISIBLE);
- mCrumbHolder.setVisibility(View.GONE);
- mFakeTitleHolder.setVisibility(View.VISIBLE);
+ //mCrumbHolder.setVisibility(View.GONE);
if (changedFolder) {
Object data = mCrumbs.getTopData();
if (data != null) {
@@ -386,11 +381,9 @@ public class AddBookmarkFolder extends Activity implements View.OnClickListener,
private void switchToFolderSelector() {
// Set the list to the top in case it is scrolled.
mListView.setSelection(0);
- mFakeTitleHolder.setVisibility(View.GONE);
- // mFakeTitle.setVisibility(View.GONE);
mDefaultView.setVisibility(View.GONE);
mFolderSelector.setVisibility(View.VISIBLE);
- mCrumbHolder.setVisibility(View.VISIBLE);
+ //mCrumbHolder.setVisibility(View.VISIBLE);
getInputMethodManager().hideSoftInputFromWindow(mListView.getWindowToken(), 0);
}
@@ -603,9 +596,6 @@ public class AddBookmarkFolder extends Activity implements View.OnClickListener,
Window window = getWindow();
String title = this.getString(R.string.new_folder);
- mFakeTitle = (TextView) findViewById(R.id.fake_title);
- mFakeTitleHolder = findViewById(R.id.title_holder);
- mFakeTitle.setText(this.getString(R.string.new_folder));
mTitle = (EditText) findViewById(R.id.title);
BrowserUtils.maxLengthFilter(AddBookmarkFolder.this, mTitle, BrowserUtils.FILENAME_MAX_LENGTH);
@@ -637,8 +627,8 @@ public class AddBookmarkFolder extends Activity implements View.OnClickListener,
mAddNewFolder = findViewById(R.id.add_new_folder);
mAddNewFolder.setVisibility(View.GONE);
- mAddSeparator = findViewById(R.id.add_divider);
- mAddSeparator.setVisibility(View.GONE);
+ //mAddSeparator = findViewById(R.id.add_divider);
+ //mAddSeparator.setVisibility(View.GONE);
mCrumbs = (BreadCrumbView) findViewById(R.id.crumbs);
//mCrumbs.setUseBackButton(true);
@@ -747,13 +737,6 @@ public class AddBookmarkFolder extends Activity implements View.OnClickListener,
return Long.parseLong(titleIdString);
}
- private void showRemoveButton() {
- findViewById(R.id.remove_divider).setVisibility(View.VISIBLE);
- mRemoveLink = findViewById(R.id.remove);
- mRemoveLink.setVisibility(View.VISIBLE);
- mRemoveLink.setOnClickListener(this);
- }
-
// Called once we have determined which folder is the root folder
private void onRootFolderFound(long root) {
mRootFolder = root;
diff --git a/src/com/android/browser/AddBookmarkPage.java b/src/com/android/browser/AddBookmarkPage.java
index 0ddcc768..25cde080 100644
--- a/src/com/android/browser/AddBookmarkPage.java
+++ b/src/com/android/browser/AddBookmarkPage.java
@@ -53,6 +53,7 @@ import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.ArrayAdapter;
import android.widget.CursorAdapter;
import android.widget.EditText;
+import android.widget.ImageButton;
import android.widget.ListView;
import android.widget.Spinner;
import android.widget.TextView;
@@ -103,9 +104,8 @@ public class AddBookmarkPage extends Activity
private EditText mTitle;
private EditText mAddress;
- private TextView mButton;
- private View mCancelButton;
- private View mDeleteButton;
+ private ImageButton mButton;
+ private ImageButton mCancelButton;
private boolean mEditingExisting;
private boolean mEditingFolder;
private Bundle mMap;
@@ -123,15 +123,13 @@ public class AddBookmarkPage extends Activity
private long mCurrentFolder;
private FolderAdapter mAdapter;
private BreadCrumbView mCrumbs;
- private TextView mFakeTitle;
private View mCrumbHolder;
private CustomListView mListView;
private boolean mSaveToHomeScreen;
private long mRootFolder;
private TextView mTopLevelLabel;
private Drawable mHeaderIcon;
- private View mRemoveLink;
- private View mFakeTitleHolder;
+ private ImageButton mRemoveLink;
private FolderSpinnerAdapter mFolderAdapter;
private Spinner mAccountSpinner;
private ArrayAdapter<BookmarkAccount> mAccountAdapter;
@@ -243,7 +241,6 @@ public class AddBookmarkPage extends Activity
mFolderSelector.setVisibility(View.GONE);
mDefaultView.setVisibility(View.VISIBLE);
mCrumbHolder.setVisibility(View.GONE);
- mFakeTitleHolder.setVisibility(View.VISIBLE);
if (changedFolder) {
Object data = mCrumbs.getTopData();
if (data != null) {
@@ -317,7 +314,7 @@ public class AddBookmarkPage extends Activity
} else {
finish();
}
- } else if (v == mDeleteButton || v == mRemoveLink) {
+ } else if (v == mRemoveLink) {
onDeleteWithConfirm();
} else if (v == mFolderCancel) {
completeOrCancelFolderNaming(true);
@@ -418,7 +415,6 @@ public class AddBookmarkPage extends Activity
mDefaultView.setVisibility(View.GONE);
mFolderSelector.setVisibility(View.VISIBLE);
mCrumbHolder.setVisibility(View.VISIBLE);
- mFakeTitleHolder.setVisibility(View.GONE);
mAddNewFolder.setVisibility(View.VISIBLE);
mAddSeparator.setVisibility(View.VISIBLE);
getInputMethodManager().hideSoftInputFromWindow(
@@ -446,8 +442,6 @@ public class AddBookmarkPage extends Activity
boolean setAccount = false;
if (info.id != -1) {
mEditingExisting = true;
- showRemoveButton();
- mFakeTitle.setText(R.string.edit_bookmark);
mTitle.setText(info.title);
mFolderAdapter.setOtherFolderDisplayText(info.parentTitle);
mMap.putLong(BrowserContract.Bookmarks._ID, info.id);
@@ -664,11 +658,6 @@ public class AddBookmarkPage extends Activity
String url = null;
mTouchIconUrl = null;
- mFakeTitle = (TextView) findViewById(R.id.fake_title);
-
- mDeleteButton = findViewById(R.id.delete);
- mDeleteButton.setOnClickListener(this);
-
if (mMap != null) {
Bundle b = mMap.getBundle(EXTRA_EDIT_BOOKMARK);
boolean existing = mMap.getBoolean(CHECK_FOR_DUPE, false);
@@ -676,14 +665,9 @@ public class AddBookmarkPage extends Activity
mEditingFolder = mMap.getBoolean(EXTRA_IS_FOLDER, false);
mMap = b;
mEditingExisting = true;
- mFakeTitle.setText(R.string.edit_bookmark);
if (mEditingFolder) {
findViewById(R.id.row_address).setVisibility(View.GONE);
- } else {
- showRemoveButton();
}
- } else if (existing) {
- showRemoveButton();
} else {
int gravity = mMap.getInt("gravity", -1);
if (gravity != -1) {
@@ -714,10 +698,10 @@ public class AddBookmarkPage extends Activity
mAddress.setText(url);
BrowserUtils.maxLengthFilter(AddBookmarkPage.this, mAddress, BrowserUtils.ADDRESS_MAX_LENGTH);
- mButton = (TextView) findViewById(R.id.OK);
+ mButton = (ImageButton) findViewById(R.id.OK);
mButton.setOnClickListener(this);
- mCancelButton = findViewById(R.id.cancel);
+ mCancelButton = (ImageButton) findViewById(R.id.book_cancel);
mCancelButton.setOnClickListener(this);
mFolder = (FolderSpinner) findViewById(R.id.folder);
@@ -767,8 +751,6 @@ public class AddBookmarkPage extends Activity
mAccountSpinner.setOnItemSelectedListener(this);
mFolder.setSelectionIgnoringSelectionChange(1); // Select Bookmarks by default
- mFakeTitleHolder = findViewById(R.id.title_holder);
-
if (!window.getDecorView().isInTouchMode()) {
mButton.requestFocus();
}
@@ -781,14 +763,6 @@ public class AddBookmarkPage extends Activity
getLoaderManager().restartLoader(LOADER_ID_ACCOUNTS, null, this);
}
- private void showRemoveButton() {
- mDeleteButton.setVisibility(View.VISIBLE);
- findViewById(R.id.remove_divider).setVisibility(View.VISIBLE);
- mRemoveLink = findViewById(R.id.remove);
- mRemoveLink.setVisibility(View.VISIBLE);
- mRemoveLink.setOnClickListener(this);
- }
-
// Called once we have determined which folder is the root folder
private void onRootFolderFound(long root) {
mRootFolder = root;