summaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
Diffstat (limited to 'res/layout')
-rw-r--r--res/layout/browser_add_bookmark.xml208
-rw-r--r--res/layout/browser_add_bookmark_content.xml218
2 files changed, 223 insertions, 203 deletions
diff --git a/res/layout/browser_add_bookmark.xml b/res/layout/browser_add_bookmark.xml
index f5c09a9..b66a37e 100644
--- a/res/layout/browser_add_bookmark.xml
+++ b/res/layout/browser_add_bookmark.xml
@@ -4,9 +4,9 @@
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.
@@ -15,209 +15,11 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="@dimen/add_bookmark_width"
- android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:orientation="vertical"
>
- <RelativeLayout android:id="@+id/crumb_holder"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:minHeight="?android:attr/listPreferredItemHeight"
- android:gravity="center_vertical"
- android:visibility="gone"
- android:paddingLeft="5dip"
- android:paddingRight="5dip"
- >
- <com.android.browser.BreadCrumbView android:id="@+id/crumbs"
- android:layout_width="wrap_content"
- android:layout_height="?android:attr/listPreferredItemHeight"
- android:layout_alignParentLeft="true"
- android:layout_toLeftOf="@+id/add_divider"
- android:layout_centerVertical="true"
- />
- <TextView
- android:id="@+id/add_new_folder"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_alignBaseline="@+id/crumbs"
- android:drawableLeft="@drawable/ic_add_string"
- android:gravity="center_vertical"
- android:text="@string/new_folder"
- android:visibility="gone"
- android:layout_centerVertical="true"
- android:textAppearance="?android:attr/textAppearanceMedium" />
- <ImageView android:id="@+id/add_divider"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toLeftOf="@+id/add_new_folder"
- android:src="@drawable/crumb_divider"
- android:layout_centerVertical="true"
- />
- </RelativeLayout>
- <LinearLayout android:id="@+id/title_holder"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:minHeight="?android:attr/listPreferredItemHeight"
- android:paddingLeft="5dip"
- android:paddingRight="5dip"
- >
- <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:drawableLeft="@drawable/ic_bookmark_on_holo_dark"
- android:text="@string/bookmark_this_page"
- android:textAppearance="?android:attr/textAppearanceMedium" />
- <ImageView android:id="@+id/remove_divider"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- android:src="@drawable/crumb_divider"
- android:layout_centerVertical="true"
- android:visibility="gone"
- />
- <TextView android:id="@+id/remove"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- android:gravity="center_vertical"
- android:text="@string/remove"
- android:drawableLeft="@drawable/trashcan"
- android:visibility="gone"
- android:textAppearance="?android:attr/textAppearanceMedium" />
- </LinearLayout>
- <View android:id="@+id/titleDivider"
- android:layout_width="match_parent"
- android:layout_height="1dip"
- android:gravity="fill_horizontal"
- android:background="?android:attr/colorForeground"
- />
-
- <TableLayout android:id="@+id/default_view"
- android:layout_width="match_parent"
- android:layout_height="@dimen/folder_selector_height"
- android:layout_weight="1"
- android:stretchColumns="1"
- android:shrinkColumns="1"
- android:paddingTop="20dip"
- android:paddingLeft="20dip"
- android:paddingRight="20dip" >
- <TableRow>
- <TextView
- android:id="@+id/titleText"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:layout_marginBottom="40dip"
- android:text="@string/name"
- android:textAppearance="?android:attr/textAppearanceMedium" />
-
- <EditText
- android:id="@+id/title"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:layout_marginRight="20dip"
- android:layout_marginLeft="20dip"
- android:gravity="fill_horizontal"
- android:inputType="textCapSentences"
- android:ellipsize="end"
- android:textAppearance="?android:attr/textAppearanceMedium" />
- </TableRow>
-
- <TableRow
- android:id="@+id/row_address">
- <TextView
- android:id="@+id/addressText"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/location"
- android:gravity="left"
- android:layout_marginBottom="40dip"
- android:textAppearance="?android:attr/textAppearanceMedium" />
-
- <EditText
- android:id="@+id/address"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:layout_marginRight="20dip"
- android:layout_marginLeft="20dip"
- android:hint="@string/http"
- android:gravity="fill_horizontal"
- android:inputType="textUri"
- android:ellipsize="end"
- android:textAppearance="?android:attr/textAppearanceMedium" />
- </TableRow>
- <TableRow>
- <TextView
- android:id="@+id/add_to"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/containing_folder"
- android:textAppearance="?android:attr/textAppearanceMedium" />
-
- <view class="com.android.browser.addbookmark.FolderSpinner"
- android:id="@+id/folder"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:layout_marginRight="20dip"
- android:layout_marginLeft="20dip"
- android:spinnerMode="dropdown"
- android:gravity="center_vertical"
- />
- </TableRow>
- </TableLayout>
-
- <LinearLayout android:id="@+id/folder_selector"
- android:layout_width="match_parent"
- android:layout_height="@dimen/folder_selector_height"
- android:orientation="vertical"
- android:visibility="gone"
- >
-
- <view class="com.android.browser.AddBookmarkPage$CustomListView"
- android:id="@+id/list"
- android:layout_marginLeft="16dip"
- android:layout_marginRight="16dip"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- />
- <TextView
- android:id="@+id/empty"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:visibility="gone"
- android:layout_marginLeft="16dip"
- android:layout_marginTop="16dip"
- android:text="@string/no_subfolders"
- android:textStyle="italic"
- android:textAppearance="?android:attr/textAppearanceMedium" />
- </LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:minHeight="54dip"
- android:orientation="horizontal"
- android:paddingTop="4dip"
- android:paddingLeft="2dip"
- android:paddingRight="2dip" >
- <Button android:id="@+id/OK"
- android:text="@string/save"
- android:layout_width="0dip"
- android:layout_gravity="left"
- android:layout_weight="1"
- android:maxLines="2"
- android:layout_height="wrap_content" />
- <Button android:id="@+id/cancel"
- android:text="@string/do_not_save"
- android:layout_width="0dip"
- android:layout_gravity="right"
- android:layout_weight="1"
- android:maxLines="2"
- android:layout_height="wrap_content" />
- </LinearLayout>
+ <include layout="@layout/browser_add_bookmark_content" />
</LinearLayout>
diff --git a/res/layout/browser_add_bookmark_content.xml b/res/layout/browser_add_bookmark_content.xml
new file mode 100644
index 0000000..59d9329
--- /dev/null
+++ b/res/layout/browser_add_bookmark_content.xml
@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+-->
+
+<merge xmlns:android="http://schemas.android.com/apk/res/android">
+ <RelativeLayout android:id="@+id/crumb_holder"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="?android:attr/listPreferredItemHeight"
+ android:gravity="center_vertical"
+ android:visibility="gone"
+ android:paddingLeft="5dip"
+ android:paddingRight="5dip"
+ >
+ <com.android.browser.BreadCrumbView android:id="@+id/crumbs"
+ android:layout_width="wrap_content"
+ android:layout_height="?android:attr/listPreferredItemHeight"
+ android:layout_alignParentLeft="true"
+ android:layout_toLeftOf="@+id/add_divider"
+ android:layout_centerVertical="true"
+ />
+ <TextView
+ android:id="@+id/add_new_folder"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:layout_alignBaseline="@+id/crumbs"
+ android:drawableLeft="@drawable/ic_add_string"
+ android:gravity="center_vertical"
+ android:text="@string/new_folder"
+ android:visibility="gone"
+ android:layout_centerVertical="true"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+ <ImageView android:id="@+id/add_divider"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toLeftOf="@+id/add_new_folder"
+ android:src="@drawable/crumb_divider"
+ android:layout_centerVertical="true"
+ />
+ </RelativeLayout>
+ <LinearLayout android:id="@+id/title_holder"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:minHeight="?android:attr/listPreferredItemHeight"
+ android:paddingLeft="5dip"
+ android:paddingRight="5dip"
+ >
+ <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:drawableLeft="@drawable/ic_bookmark_on_holo_dark"
+ android:text="@string/bookmark_this_page"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+ <ImageView android:id="@+id/remove_divider"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:src="@drawable/crumb_divider"
+ android:layout_centerVertical="true"
+ android:visibility="gone"
+ />
+ <TextView android:id="@+id/remove"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:gravity="center_vertical"
+ android:text="@string/remove"
+ android:drawableLeft="@drawable/trashcan"
+ android:visibility="gone"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+ </LinearLayout>
+ <View android:id="@+id/titleDivider"
+ android:layout_width="match_parent"
+ android:layout_height="1dip"
+ android:gravity="fill_horizontal"
+ android:background="?android:attr/colorForeground"
+ />
+
+ <TableLayout android:id="@+id/default_view"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:stretchColumns="1"
+ android:shrinkColumns="1"
+ android:paddingTop="20dip"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip" >
+ <TableRow>
+ <TextView
+ android:id="@+id/titleText"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:layout_marginBottom="40dip"
+ android:text="@string/name"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <EditText
+ android:id="@+id/title"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:layout_marginRight="20dip"
+ android:layout_marginLeft="20dip"
+ android:gravity="fill_horizontal"
+ android:inputType="textCapSentences"
+ android:ellipsize="end"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+ </TableRow>
+
+ <TableRow
+ android:id="@+id/row_address">
+ <TextView
+ android:id="@+id/addressText"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/location"
+ android:gravity="left"
+ android:layout_marginBottom="40dip"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <EditText
+ android:id="@+id/address"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:layout_marginRight="20dip"
+ android:layout_marginLeft="20dip"
+ android:hint="@string/http"
+ android:gravity="fill_horizontal"
+ android:inputType="textUri"
+ android:ellipsize="end"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+ </TableRow>
+ <TableRow>
+ <TextView
+ android:id="@+id/add_to"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/containing_folder"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <view class="com.android.browser.addbookmark.FolderSpinner"
+ android:id="@+id/folder"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:layout_marginRight="20dip"
+ android:layout_marginLeft="20dip"
+ android:spinnerMode="dropdown"
+ android:gravity="center_vertical"
+ />
+ </TableRow>
+ </TableLayout>
+
+ <LinearLayout android:id="@+id/folder_selector"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/folder_selector_height"
+ android:orientation="vertical"
+ android:visibility="gone"
+ >
+
+ <view class="com.android.browser.AddBookmarkPage$CustomListView"
+ android:id="@+id/list"
+ android:layout_marginLeft="16dip"
+ android:layout_marginRight="16dip"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ />
+ <TextView
+ android:id="@+id/empty"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:visibility="gone"
+ android:layout_marginLeft="16dip"
+ android:layout_marginTop="16dip"
+ android:text="@string/no_subfolders"
+ android:textStyle="italic"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="54dip"
+ android:orientation="horizontal"
+ android:paddingTop="4dip"
+ android:paddingLeft="2dip"
+ android:paddingRight="2dip" >
+ <Button android:id="@+id/OK"
+ android:text="@string/save"
+ android:layout_width="0dip"
+ android:layout_gravity="left"
+ android:layout_weight="1"
+ android:maxLines="2"
+ android:layout_height="wrap_content" />
+ <Button android:id="@+id/cancel"
+ android:text="@string/do_not_save"
+ android:layout_width="0dip"
+ android:layout_gravity="right"
+ android:layout_weight="1"
+ android:maxLines="2"
+ android:layout_height="wrap_content" />
+ </LinearLayout>
+
+</merge>