Merge "Make group source button styled like a stacked action bar"
diff --git a/res/drawable-hdpi/ab_stacked_solid_inverse_holo.9.png b/res/drawable-hdpi/ab_stacked_solid_inverse_holo.9.png
new file mode 100644
index 0000000..42528b1
--- /dev/null
+++ b/res/drawable-hdpi/ab_stacked_solid_inverse_holo.9.png
Binary files differ
diff --git a/res/drawable-mdpi/ab_stacked_solid_inverse_holo.9.png b/res/drawable-mdpi/ab_stacked_solid_inverse_holo.9.png
new file mode 100644
index 0000000..a823841
--- /dev/null
+++ b/res/drawable-mdpi/ab_stacked_solid_inverse_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/ab_stacked_solid_inverse_holo.9.png b/res/drawable-xhdpi/ab_stacked_solid_inverse_holo.9.png
new file mode 100644
index 0000000..16b9bef
--- /dev/null
+++ b/res/drawable-xhdpi/ab_stacked_solid_inverse_holo.9.png
Binary files differ
diff --git a/res/drawable/group_source_button_background.xml b/res/drawable/group_source_button_background.xml
new file mode 100644
index 0000000..7ebf604
--- /dev/null
+++ b/res/drawable/group_source_button_background.xml
@@ -0,0 +1,21 @@
+<?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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+ <item android:state_pressed="true" android:drawable="@drawable/action_bar_item_pressed_holo_light"/>
+ <item android:drawable="@drawable/ab_stacked_solid_inverse_holo" />
+</selector>
diff --git a/res/layout-w470dp/group_source_button.xml b/res/layout-w470dp/group_source_button.xml
index fb57e83..1acd510 100644
--- a/res/layout-w470dp/group_source_button.xml
+++ b/res/layout-w470dp/group_source_button.xml
@@ -24,9 +24,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="match_parent"
- android:divider="?android:attr/dividerVertical"
- android:showDividers="end"
- android:dividerPadding="12dip"
android:orientation="horizontal"
style="?android:attr/actionButtonStyle">
@@ -34,7 +31,6 @@
android:id="@+id/group_source"
android:layout_width="wrap_content"
android:layout_height="match_parent"
- android:paddingRight="5dip"
android:orientation="horizontal">
<TextView
diff --git a/res/layout/group_detail_fragment.xml b/res/layout/group_detail_fragment.xml
index 34eb285..d95a6db 100644
--- a/res/layout/group_detail_fragment.xml
+++ b/res/layout/group_detail_fragment.xml
@@ -20,18 +20,37 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
+ <!--
+ This layout can contain the second row of the action bar containing a group source
+ button if applicable (this is a fake stacked action bar)
+ -->
<FrameLayout
android:id="@+id/group_source_view_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_gravity="center_vertical" />
+ android:layout_gravity="center_vertical"/>
- <ListView
- android:id="@android:id/list"
+ <FrameLayout
android:layout_width="match_parent"
android:layout_height="0dip"
- android:layout_weight="1"
- android:fadingEdge="none"
- android:scrollbarStyle="outsideOverlay"/>
+ android:layout_weight="1">
+
+ <ListView
+ android:id="@android:id/list"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:fadingEdge="none"
+ android:scrollbarStyle="outsideOverlay"/>
+
+ <!--
+ Shadow overlay over the list of group members (since we have a fake stacked
+ action bar)
+ -->
+ <ImageView
+ android:layout_width="match_parent"
+ android:layout_height="20dip"
+ android:background="?android:attr/windowContentOverlay"/>
+
+ </FrameLayout>
</LinearLayout>
diff --git a/res/layout/group_source_button.xml b/res/layout/group_source_button.xml
index 0aa9c58..49aa2db 100644
--- a/res/layout/group_source_button.xml
+++ b/res/layout/group_source_button.xml
@@ -24,8 +24,10 @@
android:id="@+id/group_source"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="?android:attr/selectableItemBackground"
- android:padding="10dip" >
+ android:minHeight="48dip"
+ android:background="@drawable/group_source_button_background"
+ android:paddingLeft="16dip"
+ android:paddingRight="16dip" >
<TextView
android:layout_width="0dip"
@@ -34,15 +36,21 @@
android:layout_gravity="center_vertical"
android:duplicateParentState="true"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:text="@string/view_updates_from_group"/>
+ android:textColor="@color/action_bar_button_text_color"
+ android:text="@string/view_updates_from_group"
+ style="@android:style/Widget.Holo.ActionBar.TabText"/>
- <ImageView
- android:id="@android:id/icon"
- android:layout_width="30dip"
- android:layout_height="30dip"
- android:duplicateParentState="true"
- android:layout_marginLeft="7dip"
- android:layout_marginRight="7dip"
- android:layout_centerVertical="true"/>
+ <FrameLayout
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent">
+
+ <ImageView
+ android:id="@android:id/icon"
+ android:layout_width="32dip"
+ android:layout_height="32dip"
+ android:duplicateParentState="true"
+ android:layout_gravity="center_vertical"/>
+
+ </FrameLayout>
</LinearLayout>