diff options
author | Paul Soulos <psoulos@google.com> | 2014-05-29 13:56:25 -0700 |
---|---|---|
committer | Brian Attwell <brianattwell@google.com> | 2014-06-11 14:33:27 -0700 |
commit | 2d48b5ae6664a7ae0ed9941f55fae9dc327bd640 (patch) | |
tree | 70236cf18fb4a32fc24108c65129a3087c7f90f6 /res | |
parent | 2b9563d4c3aa7d3f57ab16ea4cb98cd9e588c50d (diff) | |
download | packages_apps_Contacts-2d48b5ae6664a7ae0ed9941f55fae9dc327bd640.tar.gz packages_apps_Contacts-2d48b5ae6664a7ae0ed9941f55fae9dc327bd640.tar.bz2 packages_apps_Contacts-2d48b5ae6664a7ae0ed9941f55fae9dc327bd640.zip |
Add ExpandingEntryCardView to QuickContact
The communication card is slightly implemented to make sure ExpandingEntryCardView
works as intended. There is more work to do in a different CL to finish this.
Also delete a bunch of QC code.
Change-Id: If7d8373866560c635851fe0e09ffad9cc0054f4f
Diffstat (limited to 'res')
25 files changed, 301 insertions, 485 deletions
diff --git a/res/drawable-hdpi/expanding_entry_card_expand_white_24.png b/res/drawable-hdpi/expanding_entry_card_expand_white_24.png Binary files differnew file mode 100644 index 000000000..50ebbc597 --- /dev/null +++ b/res/drawable-hdpi/expanding_entry_card_expand_white_24.png diff --git a/res/drawable-mdpi/expanding_entry_card_expand_white_24.png b/res/drawable-mdpi/expanding_entry_card_expand_white_24.png Binary files differnew file mode 100644 index 000000000..a0d4063b8 --- /dev/null +++ b/res/drawable-mdpi/expanding_entry_card_expand_white_24.png diff --git a/res/drawable-xhdpi/expanding_entry_card_expand_white_24.png b/res/drawable-xhdpi/expanding_entry_card_expand_white_24.png Binary files differnew file mode 100644 index 000000000..42e9f2cb5 --- /dev/null +++ b/res/drawable-xhdpi/expanding_entry_card_expand_white_24.png diff --git a/res/drawable-xxhdpi/expanding_entry_card_expand_white_24.png b/res/drawable-xxhdpi/expanding_entry_card_expand_white_24.png Binary files differnew file mode 100644 index 000000000..af4d7114b --- /dev/null +++ b/res/drawable-xxhdpi/expanding_entry_card_expand_white_24.png diff --git a/res/drawable/quickcontact_track_background.xml b/res/drawable/expanding_entry_card_collapse_white_24.xml index fcf61fd38..a38706ee8 100644 --- a/res/drawable/quickcontact_track_background.xml +++ b/res/drawable/expanding_entry_card_collapse_white_24.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2011 The Android Open Source Project +<!-- Copyright (C) 2014 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. @@ -14,6 +14,7 @@ limitations under the License. --> -<bitmap xmlns:android="http://schemas.android.com/apk/res/android" - android:src="@drawable/quickcon_background_texture" - android:tileMode="repeat" /> +<rotate xmlns:android="http://schemas.android.com/apk/res/android" + android:drawable="@drawable/expanding_entry_card_expand_white_24" + android:fromDegrees="180" + android:toDegrees="0"/>
\ No newline at end of file diff --git a/res/drawable/list_divider.xml b/res/drawable/list_divider.xml deleted file mode 100644 index 81df0f5c0..000000000 --- a/res/drawable/list_divider.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?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. ---> -<shape xmlns:android="http://schemas.android.com/apk/res/android" - android:shape="rectangle"> - <solid - android:color="@color/quickcontact_list_divider"/> -</shape>
\ No newline at end of file diff --git a/res/drawable/quickcontact_list_item_divider.xml b/res/drawable/quickcontact_list_item_divider.xml deleted file mode 100644 index 99882c47c..000000000 --- a/res/drawable/quickcontact_list_item_divider.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?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. ---> -<inset xmlns:android="http://schemas.android.com/apk/res/android" - android:drawable="@drawable/list_divider" - android:insetRight="16dp" - android:insetLeft="16dp" />
\ No newline at end of file diff --git a/res/layout-land/quickcontact_activity.xml b/res/layout-land/quickcontact_activity.xml index c39855115..6b85eae41 100644 --- a/res/layout-land/quickcontact_activity.xml +++ b/res/layout-land/quickcontact_activity.xml @@ -13,45 +13,26 @@ See the License for the specific language governing permissions and limitations under the License. --> -<view +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ex="http://schemas.android.com/apk/res-auto" - class="com.android.contacts.quickcontact.FloatingChildLayout" - android:id="@+id/floating_layout" + android:id="@android:id/content" android:layout_width="match_parent" android:layout_height="match_parent" - android:focusable="true" - android:focusableInTouchMode="true" - android:descendantFocusability="afterDescendants"> - <LinearLayout - android:id="@android:id/content" - android:layout_width="match_parent" + android:padding="32dip" + android:orientation="horizontal"> + <view + class="com.android.contacts.common.widget.ProportionalLayout" + android:layout_width="wrap_content" android:layout_height="match_parent" - android:padding="32dip" - android:orientation="horizontal"> - <view - class="com.android.contacts.common.widget.ProportionalLayout" - android:layout_width="wrap_content" - android:layout_height="match_parent" - ex:ratio="1.0" - ex:direction="heightToWidth"> - <include layout="@layout/quickcontact_photo_container" /> - </view> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical"> - <include layout="@layout/quickcontact_track" /> - <View - android:id="@+id/line_after_track" - android:layout_width="match_parent" - android:layout_height="2dip" - android:background="@color/quickcontact_tab_indicator" /> - <android.support.v4.view.ViewPager - android:id="@+id/item_list_pager" - android:background="@drawable/quickcontact_track_background" - android:layout_width="match_parent" - android:layout_height="match_parent" /> - </LinearLayout> - </LinearLayout> -</view> + ex:ratio="1.0" + ex:direction="heightToWidth"> + <include layout="@layout/quickcontact_photo_container" /> + </view> + <com.android.contacts.quickcontact.ExpandingEntryCardView + android:id="@+id/communication_card" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:background="@color/quickcontact_activity_background" /> +</LinearLayout>
\ No newline at end of file diff --git a/res/layout-sw600dp-land/quickcontact_activity.xml b/res/layout-sw600dp-land/quickcontact_activity.xml index 230c4e07b..563ca43ed 100644 --- a/res/layout-sw600dp-land/quickcontact_activity.xml +++ b/res/layout-sw600dp-land/quickcontact_activity.xml @@ -13,41 +13,22 @@ See the License for the specific language governing permissions and limitations under the License. --> -<view +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - class="com.android.contacts.quickcontact.FloatingChildLayout" - android:id="@+id/floating_layout" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:focusable="true" - android:focusableInTouchMode="true" - android:descendantFocusability="afterDescendants"> - <LinearLayout - android:id="@android:id/content" - android:layout_width="wrap_content" + android:id="@android:id/content" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="32dip" + android:orientation="horizontal"> + <FrameLayout + android:layout_width="360dip" + android:layout_height="360dip"> + <include layout="@layout/quickcontact_photo_container" /> + </FrameLayout> + <com.android.contacts.quickcontact.ExpandingEntryCardView + android:id="@+id/communication_card" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:padding="32dip" - android:orientation="horizontal"> - <FrameLayout - android:layout_width="360dip" - android:layout_height="360dip"> - <include layout="@layout/quickcontact_photo_container" /> - </FrameLayout> - <LinearLayout - android:layout_width="360dip" - android:layout_height="match_parent" - android:orientation="vertical"> - <include layout="@layout/quickcontact_track" /> - <View - android:id="@+id/line_after_track" - android:layout_width="match_parent" - android:layout_height="2dip" - android:background="@color/quickcontact_tab_indicator" /> - <android.support.v4.view.ViewPager - android:id="@+id/item_list_pager" - android:background="@drawable/quickcontact_track_background" - android:layout_width="match_parent" - android:layout_height="match_parent" /> - </LinearLayout> - </LinearLayout> -</view> + android:orientation="vertical" + android:background="@color/quickcontact_activity_background" /> +</LinearLayout>
\ No newline at end of file diff --git a/res/layout-sw600dp/quickcontact_activity.xml b/res/layout-sw600dp/quickcontact_activity.xml index 229974bc7..686212dc4 100644 --- a/res/layout-sw600dp/quickcontact_activity.xml +++ b/res/layout-sw600dp/quickcontact_activity.xml @@ -13,37 +13,22 @@ See the License for the specific language governing permissions and limitations under the License. --> -<view +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:ex="http://schemas.android.com/apk/res-auto" - class="com.android.contacts.quickcontact.FloatingChildLayout" - android:id="@+id/floating_layout" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:focusable="true" - android:focusableInTouchMode="true" - android:descendantFocusability="afterDescendants"> - <LinearLayout - android:id="@android:id/content" - android:layout_width="wrap_content" + android:id="@android:id/content" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="32dip" + android:orientation="vertical" > + <FrameLayout + android:layout_width="360dip" + android:layout_height="@dimen/quick_contact_photo_container_height"> + <include layout="@layout/quickcontact_photo_container" /> + </FrameLayout> + <com.android.contacts.quickcontact.ExpandingEntryCardView + android:id="@+id/communication_card" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:padding="32dip" - android:orientation="vertical" > - <FrameLayout - android:layout_width="360dip" - android:layout_height="@dimen/quick_contact_photo_container_height"> - <include layout="@layout/quickcontact_photo_container" /> - </FrameLayout> - <include layout="@layout/quickcontact_track" /> - <View - android:id="@+id/line_after_track" - android:layout_width="match_parent" - android:layout_height="2dip" - android:background="@color/quickcontact_tab_indicator" /> - <android.support.v4.view.ViewPager - android:id="@+id/item_list_pager" - android:background="@drawable/quickcontact_track_background" - android:layout_width="match_parent" - android:layout_height="160dip" /> - </LinearLayout> -</view> + android:orientation="vertical" + android:background="@color/quickcontact_activity_background" /> +</LinearLayout>
\ No newline at end of file diff --git a/res/layout-sw720dp-land/quickcontact_activity.xml b/res/layout-sw720dp-land/quickcontact_activity.xml index 230c4e07b..563ca43ed 100644 --- a/res/layout-sw720dp-land/quickcontact_activity.xml +++ b/res/layout-sw720dp-land/quickcontact_activity.xml @@ -13,41 +13,22 @@ See the License for the specific language governing permissions and limitations under the License. --> -<view +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - class="com.android.contacts.quickcontact.FloatingChildLayout" - android:id="@+id/floating_layout" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:focusable="true" - android:focusableInTouchMode="true" - android:descendantFocusability="afterDescendants"> - <LinearLayout - android:id="@android:id/content" - android:layout_width="wrap_content" + android:id="@android:id/content" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="32dip" + android:orientation="horizontal"> + <FrameLayout + android:layout_width="360dip" + android:layout_height="360dip"> + <include layout="@layout/quickcontact_photo_container" /> + </FrameLayout> + <com.android.contacts.quickcontact.ExpandingEntryCardView + android:id="@+id/communication_card" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:padding="32dip" - android:orientation="horizontal"> - <FrameLayout - android:layout_width="360dip" - android:layout_height="360dip"> - <include layout="@layout/quickcontact_photo_container" /> - </FrameLayout> - <LinearLayout - android:layout_width="360dip" - android:layout_height="match_parent" - android:orientation="vertical"> - <include layout="@layout/quickcontact_track" /> - <View - android:id="@+id/line_after_track" - android:layout_width="match_parent" - android:layout_height="2dip" - android:background="@color/quickcontact_tab_indicator" /> - <android.support.v4.view.ViewPager - android:id="@+id/item_list_pager" - android:background="@drawable/quickcontact_track_background" - android:layout_width="match_parent" - android:layout_height="match_parent" /> - </LinearLayout> - </LinearLayout> -</view> + android:orientation="vertical" + android:background="@color/quickcontact_activity_background" /> +</LinearLayout>
\ No newline at end of file diff --git a/res/layout/expanding_entry_card_item.xml b/res/layout/expanding_entry_card_item.xml new file mode 100644 index 000000000..5f2deebe7 --- /dev/null +++ b/res/layout/expanding_entry_card_item.xml @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2014 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:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> + + <RelativeLayout + style="@style/SelectableItem" + android:id="@+id/entry_layout" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_weight="1" + android:paddingLeft="@dimen/expanding_entry_card_item_padding_with_image_start" + android:paddingRight="@dimen/expanding_entry_card_item_padding_end" + android:paddingTop="@dimen/expanding_entry_card_item_padding_top" + android:paddingBottom="@dimen/expanding_entry_card_item_padding_bottom"> + + <ImageView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/icon" + android:layout_alignParentLeft="true" + android:layout_alignParentTop="true" + android:layout_marginRight="@dimen/expanding_entry_card_item_image_spacing"/> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/header" + android:layout_alignParentTop="true" + android:layout_toRightOf="@+id/icon" + android:textStyle="bold" + android:textColor="@android:color/black" + android:singleLine="true"/> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/sub_header" + android:layout_below="@+id/header" + android:layout_toRightOf="@+id/icon_sub_header" + android:textColor="@android:color/black"/> + + <ImageView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/icon_sub_header" + android:layout_below="@+id/header" + android:layout_toRightOf="@+id/icon" + android:layout_marginRight="@dimen/expanding_entry_card_item_sub_header_icon_margin_right" + android:layout_marginBottom="@dimen/expanding_entry_card_item_sub_header_icon_margin_bottom" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/text" + android:layout_below="@+id/sub_header" + android:layout_toRightOf="@+id/icon_text" + android:textColor="@android:color/darker_gray"/> + + <ImageView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/icon_text" + android:layout_toRightOf="@+id/icon" + android:layout_below="@+id/sub_header" + android:layout_marginTop="@dimen/expanding_entry_card_item_text_icon_margin_top" + android:layout_marginRight="@dimen/expanding_entry_card_item_text_icon_margin_right" /> + </RelativeLayout> + +</LinearLayout> diff --git a/res/layout/expanding_entry_card_view.xml b/res/layout/expanding_entry_card_view.xml new file mode 100644 index 000000000..12f96e670 --- /dev/null +++ b/res/layout/expanding_entry_card_view.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2014 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"> + + <TextView + android:id="@+id/title" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:ellipsize="end" + android:lines="1" + android:padding="@dimen/expanding_entry_card_title_padding" + android:singleLine="true" + android:textSize="@dimen/expanding_entry_card_title_text_size" /> + + <View + android:layout_width="match_parent" + android:layout_height="@dimen/expanding_entry_card_item_separator_height" + android:background="@color/expanding_entry_card_item_separator_color" /> + + <LinearLayout + android:id="@+id/content_area_linear_layout" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" /> + +</merge>
\ No newline at end of file diff --git a/res/layout/quickcontact_activity.xml b/res/layout/quickcontact_activity.xml index 36bdd50bc..3aa0a1426 100644 --- a/res/layout/quickcontact_activity.xml +++ b/res/layout/quickcontact_activity.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2011 The Android Open Source Project +<!-- + 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. @@ -13,44 +14,37 @@ See the License for the specific language governing permissions and limitations under the License. --> -<view - xmlns:android="http://schemas.android.com/apk/res/android" +<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ex="http://schemas.android.com/apk/res-auto" - class="com.android.contacts.quickcontact.FloatingChildLayout" - android:id="@+id/floating_layout" android:layout_width="match_parent" android:layout_height="match_parent" + android:orientation="vertical" android:focusable="true" android:focusableInTouchMode="true" - android:descendantFocusability="afterDescendants"> + android:descendantFocusability="afterDescendants" > + <LinearLayout android:id="@android:id/content" android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingLeft="15dip" - android:paddingRight="15dip" - android:paddingStart="15dip" - android:paddingEnd="15dip" - android:paddingTop="8dip" - android:orientation="vertical"> + android:orientation="vertical" > + <view - class="com.android.contacts.common.widget.ProportionalLayout" android:layout_width="match_parent" android:layout_height="wrap_content" - ex:ratio="0.5" - ex:direction="widthToHeight"> + class="com.android.contacts.common.widget.ProportionalLayout" + ex:direction="widthToHeight" + ex:ratio="0.5" > + <include layout="@layout/quickcontact_photo_container" /> </view> - <include layout="@layout/quickcontact_track" /> - <View - android:id="@+id/line_after_track" - android:layout_width="match_parent" - android:layout_height="2dip" - android:background="@color/quickcontact_tab_indicator" /> - <android.support.v4.view.ViewPager - android:id="@+id/item_list_pager" + + <com.android.contacts.quickcontact.ExpandingEntryCardView + android:id="@+id/communication_card" android:layout_width="match_parent" - android:layout_height="156dip" - android:background="@color/quickcontact_activity_background"/> + android:layout_height="wrap_content" + android:background="@color/quickcontact_activity_background" + android:orientation="vertical" /> </LinearLayout> -</view> + +</ScrollView>
\ No newline at end of file diff --git a/res/layout/quickcontact_expanding_entry_card_button.xml b/res/layout/quickcontact_expanding_entry_card_button.xml new file mode 100644 index 000000000..9cd34d708 --- /dev/null +++ b/res/layout/quickcontact_expanding_entry_card_button.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2014 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:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + style="@style/SelectableItem" > + + <View + android:layout_width="match_parent" + android:layout_height="@dimen/expanding_entry_card_item_separator_height" + android:background="@color/expanding_entry_card_item_separator_color" /> + + <TextView + android:id="@+id/text" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:drawablePadding="@dimen/expanding_entry_card_button_drawable_padding" + android:gravity="center_vertical" + android:paddingBottom="@dimen/expanding_entry_card_button_padding_vertical" + android:paddingLeft="@dimen/expanding_entry_card_button_padding_start" + android:paddingTop="@dimen/expanding_entry_card_button_padding_vertical" + android:textColor="@color/expanding_entry_card_button_text_color" /> + +</LinearLayout>
\ No newline at end of file diff --git a/res/layout/quickcontact_list_fragment.xml b/res/layout/quickcontact_list_fragment.xml deleted file mode 100755 index 712f116e9..000000000 --- a/res/layout/quickcontact_list_fragment.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?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. ---> - -<RelativeLayout - xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="wrap_content"> - <ListView - android:id="@+id/list" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:divider="@drawable/quickcontact_list_item_divider" - android:dividerHeight="1dip" - android:background="@color/quickcontact_list_background" - android:cacheColorHint="@null" - android:layout_alignParentTop="true" - /> - <View - android:layout_alignBottom="@+id/list" - style="@style/QuickContactListBottomStyle"/> -</RelativeLayout> diff --git a/res/layout/quickcontact_list_item.xml b/res/layout/quickcontact_list_item.xml deleted file mode 100755 index 615895fef..000000000 --- a/res/layout/quickcontact_list_item.xml +++ /dev/null @@ -1,54 +0,0 @@ -<?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/actions_view_container" - android:nextFocusRight="@+id/secondary_action_button" - style="@style/QuickContactListItemStyle"> - <LinearLayout style="@style/QuickContactListItemTextWrapperStyle"> - <TextView - android:id="@android:id/text1" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textColor="@color/primary_text_color" - android:textAppearance="?android:attr/textAppearanceMedium" - android:singleLine="true" - android:ellipsize="end" /> - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal"> - <ImageView - android:id="@+id/presence_icon" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="1dip" - android:layout_marginRight="4dip" - android:layout_marginEnd="4dip" - android:layout_gravity="center_vertical" - android:gravity="center" - android:scaleType="centerInside" /> - <TextView - android:id="@android:id/text2" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textColor="@color/secondary_text_color" - android:textAllCaps="true" - android:textAppearance="?android:attr/textAppearanceSmall" /> - </LinearLayout> - </LinearLayout> - <include layout="@layout/quickcontact_list_item_base"/> -</LinearLayout> diff --git a/res/layout/quickcontact_list_item_address.xml b/res/layout/quickcontact_list_item_address.xml deleted file mode 100755 index c55c3395c..000000000 --- a/res/layout/quickcontact_list_item_address.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?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/actions_view_container" - android:nextFocusRight="@+id/secondary_action_button" - style="@style/QuickContactListItemStyle"> - <LinearLayout style="@style/QuickContactListItemTextWrapperStyle" - android:layout_marginTop="12dip" - android:layout_marginBottom="12dip"> - <TextView - android:id="@android:id/text1" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textColor="@color/primary_text_color" - android:textAppearance="?android:attr/textAppearanceMedium" /> - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal"> - <ImageView - android:id="@+id/presence_icon" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="1dip" - android:layout_marginRight="4dip" - android:layout_marginEnd="4dip" - android:layout_gravity="center_vertical" - android:gravity="center" - android:scaleType="centerInside" /> - <TextView - android:id="@android:id/text2" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textColor="@color/secondary_text_color" - android:textAllCaps="true" - android:textAppearance="?android:attr/textAppearanceSmall" /> - </LinearLayout> - </LinearLayout> - <include layout="@layout/quickcontact_list_item_base"/> -</LinearLayout> diff --git a/res/layout/quickcontact_list_item_base.xml b/res/layout/quickcontact_list_item_base.xml deleted file mode 100644 index 80a34227f..000000000 --- a/res/layout/quickcontact_list_item_base.xml +++ /dev/null @@ -1,42 +0,0 @@ -<?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"> - <View - android:id="@+id/vertical_divider" - android:layout_width="1dip" - android:layout_height="match_parent" - android:layout_gravity="center_vertical" - android:layout_marginTop="@dimen/detail_vertical_divider_vertical_margin" - android:layout_marginBottom="@dimen/detail_vertical_divider_vertical_margin" - android:background="?android:attr/dividerVertical" /> - <ImageView - android:id="@+id/secondary_action_button" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:paddingLeft="8dip" - android:paddingRight="14dip" - android:paddingStart="8dip" - android:paddingEnd="14dip" - android:background="?android:attr/selectableItemBackground" - android:duplicateParentState="false" - android:nextFocusLeft="@id/actions_view_container"/> - <View - android:layout_width="1dip" - android:layout_height="match_parent" - android:layout_gravity="center_vertical" - android:background="?android:attr/dividerVertical" /> -</merge> diff --git a/res/layout/quickcontact_track.xml b/res/layout/quickcontact_track.xml deleted file mode 100644 index 83a771c8e..000000000 --- a/res/layout/quickcontact_track.xml +++ /dev/null @@ -1,43 +0,0 @@ -<?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"> - <HorizontalScrollView - android:id="@+id/track_scroller" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:fadingEdgeLength="0dip" - android:background="@color/quickcontact_track_background" - android:scrollbars="none"> - <RelativeLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content"> - <LinearLayout - android:id="@+id/track" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal" /> - <View - android:id="@+id/selected_tab_rectangle" - android:layout_width="60dip" - android:layout_height="6dip" - android:layout_alignBottom="@id/track" - android:layout_alignParentLeft="true" - android:layout_alignParentStart="true" - android:background="@color/quickcontact_tab_indicator" /> - </RelativeLayout> - </HorizontalScrollView> -</merge> diff --git a/res/layout/quickcontact_track_button.xml b/res/layout/quickcontact_track_button.xml deleted file mode 100644 index f9dcd1d6a..000000000 --- a/res/layout/quickcontact_track_button.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2009 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. ---> - -<com.android.contacts.quickcontact.CheckableImageView - xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="60dip" - android:layout_height="60dip" - android:paddingLeft="12dip" - android:paddingRight="12dip" - android:paddingStart="12dip" - android:paddingEnd="12dip" - android:paddingTop="8dip" - android:paddingBottom="8dip" - android:scaleType="centerInside" - android:focusable="true" - android:clickable="true" - android:background="?android:attr/selectableItemBackground" /> diff --git a/res/values/colors.xml b/res/values/colors.xml index d1ea3b06b..e53dc41eb 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -15,10 +15,6 @@ --> <resources> - <color name="quickcontact_list_divider">#ffcdcdcd</color> - <color name="quickcontact_list_background">#ffe2e2e2</color> - <color name="quickcontact_tab_indicator">#ffc6c6c6</color> - <color name="quickcontact_track_background">#fff5f5f5</color> <color name="quickcontact_activity_background">#fff5f5f5</color> <color name="quickcontact_name_detail_background">#66000000</color> @@ -43,4 +39,10 @@ <color name="tab_selected_color">#ffeeff41</color> <color name="contacts_accent_color">#00acc1</color> + <!-- Color of the separator between entries in an ExpandingEntryCardView --> + <color name="expanding_entry_card_item_separator_color">#eeeeee</color> + + <!-- Color of the text on an ExpandingEntryCard button --> + <color name="expanding_entry_card_button_text_color">@android:color/black</color> + </resources> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 40b466572..4995f7116 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -133,4 +133,30 @@ wide screen devices). --> <dimen name="contact_picker_contact_list_min_height">550dip</dimen> + + <!-- Size of the title text for a ExpandingEntryCardView --> + <dimen name="expanding_entry_card_title_text_size">16sp</dimen> + <!-- Padding for the title text for a ExpandingEntryCardView --> + <dimen name="expanding_entry_card_title_padding">16dp</dimen> + + <!-- Height of the separator between entries in an ExpandingEntryCardView --> + <dimen name="expanding_entry_card_item_separator_height">1dp</dimen> + <!-- Dimensions for an entry in ExpandingEntryCardView --> + <dimen name="expanding_entry_card_item_padding_start">67dp</dimen> + <dimen name="expanding_entry_card_item_padding_with_image_start">20dp</dimen> + <dimen name="expanding_entry_card_item_padding_end">20dp</dimen> + <dimen name="expanding_entry_card_item_padding_top">16dp</dimen> + <dimen name="expanding_entry_card_item_padding_bottom">16dp</dimen> + <dimen name="expanding_entry_card_item_image_spacing">16dp</dimen> + + <!-- Dimensions for a button in ExpandingEntryCardView --> + <dimen name="expanding_entry_card_button_padding_start">20dp</dimen> + <dimen name="expanding_entry_card_button_padding_vertical">16dp</dimen> + <dimen name="expanding_entry_card_button_drawable_padding">20dp</dimen> + + <dimen name="expanding_entry_card_item_text_icon_margin_top">7dp</dimen> + <dimen name="expanding_entry_card_item_text_icon_margin_right">7dp</dimen> + <dimen name="expanding_entry_card_item_sub_header_icon_margin_right">4dp</dimen> + <dimen name="expanding_entry_card_item_sub_header_icon_margin_bottom">14dp</dimen> + </resources> diff --git a/res/values/strings.xml b/res/values/strings.xml index f40dbb0c6..6c368f541 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -648,4 +648,12 @@ <!-- Content description for the button that adds a new contact [CHAR LIMIT=NONE] --> <string name="action_menu_add_new_contact_button">add new contact</string> + <!-- Button Label to see more on an ExpandingEntryCardView [CHAR LIMIT=40] --> + <string name="expanding_entry_card_view_see_more">See more</string> + <!-- Button Label to see less on an ExpandingEntryCardView [CHAR LIMIT=40] --> + <string name="expanding_entry_card_view_see_less">See less</string> + + <!-- Title of communication card. [CHAR LIMIT=60] --> + <string name="communication_card_title">Contact</string> + </resources> diff --git a/res/values/styles.xml b/res/values/styles.xml index dcce5abe0..5ec06a88b 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -41,7 +41,7 @@ <style name="Theme"> </style> - <style name="Theme.QuickContact" parent="@android:style/Theme.Holo.Light"> + <style name="Theme.QuickContact" parent="@android:style/Theme.Quantum.Light"> <item name="android:windowBackground">@android:color/transparent</item> <item name="android:colorBackgroundCacheHint">@null</item> <item name="android:windowFrame">@null</item> @@ -223,12 +223,7 @@ <item name="android:layout_height">150dip</item> </style> - <style name="QuickContactListItemStyle"> - <item name="android:layout_width">match_parent</item> - <item name="android:layout_height">wrap_content</item> - <item name="android:minHeight">?android:attr/listPreferredItemHeight</item> - <item name="android:orientation">horizontal</item> - <item name="android:gravity">center_vertical</item> + <style name="SelectableItem" parent="@android:style/Theme.Quantum.Light"> <item name="android:background">?android:attr/selectableItemBackground</item> </style> @@ -244,12 +239,6 @@ <item name="android:orientation">vertical</item> </style> - <style name="QuickContactListBottomStyle"> - <item name="android:layout_width">match_parent</item> - <item name="android:layout_height">2dip</item> - <item name="android:background">@color/quickcontact_tab_indicator</item> - </style> - <style name="Theme.PhotoSelector" parent="@android:style/Theme.Holo.Light"> <item name="android:windowBackground">@android:color/transparent</item> <item name="android:windowFrame">@null</item> |