summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2012-09-04 07:55:46 -0400
committerJohn Spurlock <jspurlock@google.com>2012-09-05 10:28:49 -0400
commit1537e8b3e8d81bf404f6aa70c8ca514f3ff62dd5 (patch)
treedb97938daa07c616e3cb3b1d65e9f189b266a5c0 /res
parent952146ee8f13ea87a890e3e4f7726fe49b60fc3d (diff)
downloadpackages_apps_Settings-1537e8b3e8d81bf404f6aa70c8ca514f3ff62dd5.zip
packages_apps_Settings-1537e8b3e8d81bf404f6aa70c8ca514f3ff62dd5.tar.gz
packages_apps_Settings-1537e8b3e8d81bf404f6aa70c8ca514f3ff62dd5.tar.bz2
Dream settings: list items back to constant height
Expanding/collapsing items removed, settings icon shown on right with divider if applicable. New "Start" action on the action bar to start dreaming. This is no longer in preview/test mode, but a call to .dream(). Bug: 7010260 Change-Id: Ia1d8b9a70218dcc598bf62befbf545f572bbc6b1
Diffstat (limited to 'res')
-rw-r--r--res/layout/dream_info_row.xml99
-rw-r--r--res/values/strings.xml6
2 files changed, 51 insertions, 54 deletions
diff --git a/res/layout/dream_info_row.xml b/res/layout/dream_info_row.xml
index c2a9a32..356a82a 100644
--- a/res/layout/dream_info_row.xml
+++ b/res/layout/dream_info_row.xml
@@ -13,19 +13,20 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="?android:attr/selectableItemBackground"
- android:divider="?android:attr/dividerHorizontal"
- android:orientation="vertical"
- android:showDividers="middle" >
+ android:layout_height="wrap_content" >
+
+ <!-- Dream selectable row (icon, caption, radio button) -->
<RelativeLayout
- android:id="@android:id/summary"
+ android:id="@android:id/widget_frame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_alignParentTop="true" >
+ android:layout_toLeftOf="@+id/divider"
+ android:background="?android:attr/selectableItemBackground" >
+
+ <!-- Dream icon -->
<ImageView
android:id="@android:id/icon"
@@ -37,18 +38,14 @@
android:layout_marginRight="6dp"
android:layout_marginTop="10dp"
android:contentDescription="@null"
+ android:maxHeight="@android:dimen/app_icon_size"
+ android:maxWidth="@android:dimen/app_icon_size"
android:scaleType="fitCenter" />
- <RadioButton
- android:id="@android:id/button1"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_alignParentRight="true"
- android:layout_centerVertical="true"
- android:duplicateParentState="true" />
+ <!-- Dream caption -->
<TextView
- android:id="@android:id/text1"
+ android:id="@android:id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
@@ -57,41 +54,43 @@
android:ellipsize="end"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium" />
- </RelativeLayout>
- <RelativeLayout
- android:id="@android:id/widget_frame"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:visibility="gone" >
+ <!-- Dream radio button -->
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:divider="?android:attr/dividerVertical"
- android:dividerPadding="12dp"
- android:showDividers="middle" >
-
- <Button
- android:id="@android:id/button2"
- style="@android:style/Widget.ActionButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:text="@string/screensaver_settings_dream_settings"
- android:textAllCaps="true"
- android:textSize="12dp" />
-
- <Button
- android:id="@android:id/button3"
- style="@android:style/Widget.ActionButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:text="@string/screensaver_settings_dream_preview"
- android:textAllCaps="true"
- android:textSize="12dp" />
- </LinearLayout>
+ <RadioButton
+ android:id="@android:id/button1"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_alignParentRight="true"
+ android:layout_centerVertical="true"
+ android:duplicateParentState="true" />
</RelativeLayout>
-</LinearLayout> \ No newline at end of file
+ <!-- Divider -->
+
+ <ImageView
+ android:id="@id/divider"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_centerVertical="true"
+ android:layout_toLeftOf="@android:id/button2"
+ android:contentDescription="@null"
+ android:src="@drawable/nav_divider" />
+
+ <!-- Settings icon -->
+
+ <ImageView
+ android:id="@android:id/button2"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_alignBottom="@android:id/widget_frame"
+ android:layout_alignParentRight="true"
+ android:layout_alignTop="@android:id/widget_frame"
+ android:layout_centerVertical="true"
+ android:layout_margin="0dip"
+ android:background="?android:attr/selectableItemBackground"
+ android:contentDescription="@null"
+ android:padding="8dip"
+ android:src="@drawable/ic_bt_config" />
+
+</RelativeLayout> \ No newline at end of file
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 6dc2f3d..2711582 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1717,10 +1717,8 @@
<string name="screensaver_settings_start_dreaming">Start dreaming now</string>
<!-- Dream settings screen, action label, when to dream -->
<string name="screensaver_settings_when_to_dream">When to dream</string>
- <!-- Dream settings screen, button label to launch dream settings -->
- <string name="screensaver_settings_dream_settings">Settings</string>
- <!-- Dream settings screen, button label to preview dream -->
- <string name="screensaver_settings_dream_preview">Preview</string>
+ <!-- Dream settings screen, button label to start dreaming -->
+ <string name="screensaver_settings_dream_start">Start</string>
<!-- Sound & display settings screen, setting option name to change whether the screen adjusts automatically based on lighting conditions -->
<string name="automatic_brightness">Automatic brightness</string>
<!-- [CHAR LIMIT=30] Sound & display settings screen, setting option name to change font size -->