diff options
author | Katherine Kuan <katherinekuan@google.com> | 2011-07-15 18:20:36 -0700 |
---|---|---|
committer | Katherine Kuan <katherinekuan@google.com> | 2011-07-19 13:59:10 -0700 |
commit | 703cda7119b710446f7abc38843043b7cbbf3a47 (patch) | |
tree | 226f419ffab389debc33d46baef0ef9b1e4e52fb /res | |
parent | d829ea489ceca9911278be1b311538bf15b63546 (diff) | |
download | packages_apps_Contacts-703cda7119b710446f7abc38843043b7cbbf3a47.tar.gz packages_apps_Contacts-703cda7119b710446f7abc38843043b7cbbf3a47.tar.bz2 packages_apps_Contacts-703cda7119b710446f7abc38843043b7cbbf3a47.zip |
Show group source on group detail page
- Show group source button as:
* scrolling header item in ListView for phone portrait
* non-scrolling header outside of ListView for tablet landscape
and portrait (b/c can't addHeaderView on ListView after
the adapter is set and we reuse the GroupDetailFragment
on the tablet)
* custom action bar button in phone landscape
- Tested by inserting an action and action_uri for one group
Change-Id: I29abad130dac57e3077fd4f3e546a451f579b394
Diffstat (limited to 'res')
-rw-r--r-- | res/layout-sw580dp-w1000dp/group_detail_fragment.xml | 84 | ||||
-rw-r--r-- | res/layout-sw580dp/group_detail_fragment.xml | 7 | ||||
-rw-r--r-- | res/layout-sw580dp/group_source_button.xml | 46 | ||||
-rw-r--r-- | res/layout-w470dp/group_source_button.xml | 57 | ||||
-rw-r--r-- | res/layout/group_source_button.xml | 48 | ||||
-rw-r--r-- | res/menu/group_source.xml | 21 | ||||
-rw-r--r-- | res/values-sw580dp/donottranslate_config.xml | 1 | ||||
-rw-r--r-- | res/values-w470dp/donottranslate_config.xml | 22 | ||||
-rw-r--r-- | res/values/donottranslate_config.xml | 6 | ||||
-rw-r--r-- | res/values/strings.xml | 3 |
10 files changed, 295 insertions, 0 deletions
diff --git a/res/layout-sw580dp-w1000dp/group_detail_fragment.xml b/res/layout-sw580dp-w1000dp/group_detail_fragment.xml new file mode 100644 index 000000000..11779cbf9 --- /dev/null +++ b/res/layout-sw580dp-w1000dp/group_detail_fragment.xml @@ -0,0 +1,84 @@ +<?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. +--> + + +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/group_detail" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@drawable/panel_content"> + + <!-- Static header containing the group title, size, and group source (if applicable) --> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingBottom="@dimen/group_detail_vertical_padding" + android:orientation="horizontal" > + + <LinearLayout + android:layout_width="0dip" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical" > + + <TextView + android:id="@+id/group_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingLeft="@dimen/group_detail_border_padding" + android:paddingTop="@dimen/group_detail_vertical_padding" + android:textAppearance="?android:attr/textAppearanceLarge" + android:textStyle="bold" /> + + <TextView + android:id="@+id/group_size" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingLeft="@dimen/group_detail_border_padding" + android:textAppearance="?android:attr/textAppearanceMedium" + android:textColor="?android:attr/textColorSecondary" /> + + </LinearLayout> + + <FrameLayout + android:id="@+id/group_source_view_container" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_gravity="center_vertical" + android:paddingRight="@dimen/group_detail_border_padding" /> + + </LinearLayout> + + <View + android:layout_width="match_parent" + android:layout_height="1dip" + android:background="?android:attr/listDivider" + android:layout_marginBottom="@dimen/group_detail_vertical_padding" + android:layout_marginLeft="@dimen/group_detail_divider_margin" + android:layout_marginRight="@dimen/group_detail_divider_margin" /> + + <!-- List of group members --> + <ListView android:id="@android:id/list" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_marginLeft="@dimen/group_detail_border_padding" + android:layout_marginRight="@dimen/group_detail_border_padding" + android:cacheColorHint="#00000000" + android:divider="@null" /> + +</LinearLayout>
\ No newline at end of file diff --git a/res/layout-sw580dp/group_detail_fragment.xml b/res/layout-sw580dp/group_detail_fragment.xml index 7c65036cb..a7db15478 100644 --- a/res/layout-sw580dp/group_detail_fragment.xml +++ b/res/layout-sw580dp/group_detail_fragment.xml @@ -49,6 +49,13 @@ android:layout_marginLeft="@dimen/group_detail_divider_margin" android:layout_marginRight="@dimen/group_detail_divider_margin" /> + <FrameLayout + android:id="@+id/group_source_view_container" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:paddingLeft="@dimen/group_detail_border_padding" /> + <ListView android:id="@android:id/list" android:layout_width="match_parent" android:layout_height="match_parent" diff --git a/res/layout-sw580dp/group_source_button.xml b/res/layout-sw580dp/group_source_button.xml new file mode 100644 index 000000000..6b0b8fe9a --- /dev/null +++ b/res/layout-sw580dp/group_source_button.xml @@ -0,0 +1,46 @@ +<?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. +--> + +<!-- + Layout for the button that will launch the user into the source application + that the group came from (on a group detail page). +--> + +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/group_source" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:background="?android:attr/selectableItemBackground" + android:padding="10dip" > + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:duplicateParentState="true" + android:textAppearance="?android:attr/textAppearanceMedium" + android:text="@string/view_updates_from_group"/> + + <ImageView + android:id="@android:id/icon" + android:duplicateParentState="true" + android:layout_width="30dip" + android:layout_height="30dip" + android:layout_marginLeft="7dip" + android:layout_gravity="center_vertical"/> + +</LinearLayout> diff --git a/res/layout-w470dp/group_source_button.xml b/res/layout-w470dp/group_source_button.xml new file mode 100644 index 000000000..b725512bc --- /dev/null +++ b/res/layout-w470dp/group_source_button.xml @@ -0,0 +1,57 @@ +<?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. +--> + +<!-- + Layout for the button that will launch the user into the source application + that the group came from (on a group detail page). This will be used in the + action bar, so it has a vertical divider. +--> + +<LinearLayout + 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"> + + <LinearLayout + style="?android:attr/actionButtonStyle" + android:id="@+id/group_source" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:paddingRight="5dip" + android:orientation="horizontal"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:textAppearance="?android:attr/textAppearanceMedium" + android:text="@string/view_updates_from_group"/> + + <ImageView + android:id="@android:id/icon" + android:layout_width="25dip" + android:layout_height="25dip" + android:layout_marginLeft="7dip" + android:layout_marginRight="7dip" + android:layout_centerVertical="true"/> + + </LinearLayout> + +</LinearLayout> diff --git a/res/layout/group_source_button.xml b/res/layout/group_source_button.xml new file mode 100644 index 000000000..0aa9c5892 --- /dev/null +++ b/res/layout/group_source_button.xml @@ -0,0 +1,48 @@ +<?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. +--> + +<!-- + Layout for the button that will launch the user into the source application + that the group came from (on a group detail page). +--> + +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/group_source" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="?android:attr/selectableItemBackground" + android:padding="10dip" > + + <TextView + android:layout_width="0dip" + android:layout_height="wrap_content" + android:layout_weight="1" + android:layout_gravity="center_vertical" + android:duplicateParentState="true" + android:textAppearance="?android:attr/textAppearanceMedium" + android:text="@string/view_updates_from_group"/> + + <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"/> + +</LinearLayout> diff --git a/res/menu/group_source.xml b/res/menu/group_source.xml new file mode 100644 index 000000000..6d1af2d34 --- /dev/null +++ b/res/menu/group_source.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. +--> + +<menu xmlns:android="http://schemas.android.com/apk/res/android"> + <item + android:id="@+id/menu_group_source" + android:showAsAction="always" /> +</menu> diff --git a/res/values-sw580dp/donottranslate_config.xml b/res/values-sw580dp/donottranslate_config.xml index 9841fd503..5c59f162f 100644 --- a/res/values-sw580dp/donottranslate_config.xml +++ b/res/values-sw580dp/donottranslate_config.xml @@ -21,4 +21,5 @@ <bool name="config_use_two_panes">true</bool> <bool name="always_show_search_view">true</bool> <bool name="show_home_icon">true</bool> + <bool name="config_show_group_action_in_action_bar">false</bool> </resources> diff --git a/res/values-w470dp/donottranslate_config.xml b/res/values-w470dp/donottranslate_config.xml new file mode 100644 index 000000000..462015a9d --- /dev/null +++ b/res/values-w470dp/donottranslate_config.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 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. +*/ +--> + +<resources> + <bool name="config_show_group_action_in_action_bar">true</bool> +</resources> diff --git a/res/values/donottranslate_config.xml b/res/values/donottranslate_config.xml index 3447392a9..0c719c444 100644 --- a/res/values/donottranslate_config.xml +++ b/res/values/donottranslate_config.xml @@ -110,4 +110,10 @@ <!-- If true, the "home" icon on the action bar will be shown. --> <bool name="show_home_icon">false</bool> + + <!-- + If true, the "view updates from group" button in the action bar will be + shown. Otherwise it will be part of the content on the group detail page. + --> + <bool name="config_show_group_action_in_action_bar">false</bool> </resources> diff --git a/res/values/strings.xml b/res/values/strings.xml index 209aab7ed..348c66049 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1614,6 +1614,9 @@ <!-- The title of the activity that edits an existing group [CHAR LIMIT=NONE] --> <string name="editGroup_title_edit">Edit group</string> + <!-- Button to view the updates from the current group on the group detail page [CHAR LIMIT=20] --> + <string name="view_updates_from_group">View updates</string> + <!-- Title of the notification of new voicemail. --> <string name="notification_voicemail_title">New voicemail</string> |