diff options
author | Andrew Lee <anwlee@google.com> | 2015-10-21 19:27:38 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2015-10-21 19:27:38 +0000 |
commit | 769ffcc70108f6c3f084567f012e3e984e7d211a (patch) | |
tree | cd70090eee303f843da6228d5f751f9f48e1f79d /res | |
parent | 27ed18795727b31a4eadce7c1e82d0cab4d26600 (diff) | |
parent | d625d28ec6cf22c128d0ef0b8e64a9fff4b64aec (diff) |
Fix scrolling in blocked numbers list.
am: d625d28ec6
* commit 'd625d28ec6cf22c128d0ef0b8e64a9fff4b64aec':
Fix scrolling in blocked numbers list.
Diffstat (limited to 'res')
-rw-r--r-- | res/drawable/blocked_number_item_background.xml | 29 | ||||
-rw-r--r-- | res/layout/blocked_number_fragment.xml | 68 | ||||
-rw-r--r-- | res/layout/blocked_number_header.xml | 147 | ||||
-rw-r--r-- | res/layout/blocked_number_item.xml | 2 | ||||
-rw-r--r-- | res/layout/view_numbers_to_import_fragment.xml | 1 |
5 files changed, 139 insertions, 108 deletions
diff --git a/res/drawable/blocked_number_item_background.xml b/res/drawable/blocked_number_item_background.xml new file mode 100644 index 000000000..acfea20b8 --- /dev/null +++ b/res/drawable/blocked_number_item_background.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2015 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. +--> + +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <item> + <shape android:shape="rectangle"> + <solid android:color="@color/divider_line_color" /> + </shape> + </item> + <item android:bottom="1dp"> + <shape android:shape="rectangle"> + <solid android:color="@android:color/white" /> + </shape> + </item> +</layer-list> diff --git a/res/layout/blocked_number_fragment.xml b/res/layout/blocked_number_fragment.xml index e41d6bc80..b98b58fc5 100644 --- a/res/layout/blocked_number_fragment.xml +++ b/res/layout/blocked_number_fragment.xml @@ -14,7 +14,6 @@ limitations under the License. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:card_view="http://schemas.android.com/apk/res-auto" android:id="@+id/blocked_number_fragment" android:layout_width="match_parent" android:layout_height="match_parent" @@ -22,67 +21,18 @@ android:paddingTop="?android:attr/actionBarSize" android:background="@color/blocked_number_background"> - <android.support.v7.widget.CardView - android:id="@+id/hide_blocked_calls_setting" + <ListView android:id="@id/android:list" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginBottom="8dp" - card_view:cardCornerRadius="0dp"> + android:divider="@null" + android:headerDividersEnabled="false" /> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:gravity="center_vertical" - android:padding="16dp" - android:paddingEnd="8dp"> - - <TextView - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - android:text="@string/blocked_call_settings_hide_setting" - style="@style/BlockedNumbersDescriptionTextStyle" /> - - <Switch android:id="@+id/hide_blocked_calls_switch" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginLeft="40dp" /> - - </LinearLayout> - - </android.support.v7.widget.CardView> - - <android.support.v7.widget.CardView + <TextView android:id="@android:id/empty" android:layout_width="match_parent" - android:layout_height="wrap_content" - card_view:cardCornerRadius="0dp"> - - <LinearLayout - android:orientation="vertical" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="@color/background_dialer_white"> - - <include layout="@layout/blocked_number_header" /> - - <ListView android:id="@id/android:list" - android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_weight="1" - android:drawSelectorOnTop="false" - android:headerDividersEnabled="false" /> - - <TextView android:id="@android:id/empty" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:paddingStart="@dimen/blocked_number_horizontal_margin" - android:paddingTop="@dimen/blocked_number_top_margin" - android:paddingBottom="@dimen/blocked_number_bottom_margin" - android:text="@string/listNoBlockedNumbers" /> - - </LinearLayout> - - </android.support.v7.widget.CardView> + android:layout_height="match_parent" + android:paddingStart="@dimen/blocked_number_horizontal_margin" + android:paddingTop="@dimen/blocked_number_top_margin" + android:paddingBottom="@dimen/blocked_number_bottom_margin" + android:text="@string/listNoBlockedNumbers" /> </LinearLayout> diff --git a/res/layout/blocked_number_header.xml b/res/layout/blocked_number_header.xml index e16efbcf4..3fcdf398b 100644 --- a/res/layout/blocked_number_header.xml +++ b/res/layout/blocked_number_header.xml @@ -13,63 +13,114 @@ See the License for the specific language governing permissions and limitations under the License. --> -<merge xmlns:android="http://schemas.android.com/apk/res/android"> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:card_view="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> - <TextView android:id="@+id/textView" - android:layout_width="wrap_content" + <android.support.v7.widget.CardView + android:id="@+id/hide_blocked_calls_setting" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/blockList" - android:textColor="@color/blocked_number_header_color" - android:padding="@dimen/blocked_number_container_padding" - style="@android:style/TextAppearance.Material.Subhead" /> + android:layout_marginBottom="8dp" + card_view:cardCornerRadius="0dp"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:gravity="center_vertical" + android:padding="16dp" + android:paddingEnd="8dp" + android:background="@android:color/white"> + + <TextView + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:text="@string/blocked_call_settings_hide_setting" + style="@style/BlockedNumbersDescriptionTextStyle" /> - <RelativeLayout android:id="@+id/import_settings" + <Switch android:id="@+id/hide_blocked_calls_switch" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginLeft="40dp" /> + + </LinearLayout> + + </android.support.v7.widget.CardView> + + <android.support.v7.widget.CardView android:layout_width="match_parent" android:layout_height="wrap_content" - android:visibility="gone"> + card_view:cardCornerRadius="0dp"> - <TextView android:id="@+id/import_description" + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/blocked_call_settings_import_description" - android:textSize="@dimen/blocked_number_settings_description_text_size" - android:paddingStart="@dimen/blocked_number_container_padding" - android:paddingEnd="@dimen/blocked_number_container_padding" - style="@style/BlockedNumbersDescriptionTextStyle" /> - - <Button android:id="@+id/import_button" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_below="@id/import_description" - android:layout_alignParentEnd="true" - android:layout_marginEnd="@dimen/blocked_number_container_padding" - android:text="@string/blocked_call_settings_import_button" - style="@style/DialerFlatButtonStyle" /> - - <Button android:id="@+id/view_numbers_button" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_below="@id/import_description" - android:layout_toLeftOf="@id/import_button" - android:text="@string/blocked_call_settings_view_numbers_button" - style="@style/DialerFlatButtonStyle" /> + android:orientation="vertical" + android:background="@android:color/white"> - <View - android:layout_width="match_parent" - android:layout_height="1dp" - android:layout_below="@id/import_button" - android:background="@color/divider_line_color" - android:layout_marginTop="8dp" - android:layout_marginBottom="8dp" /> + <TextView android:id="@+id/textView" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/blockList" + android:textColor="@color/blocked_number_header_color" + android:padding="@dimen/blocked_number_container_padding" + style="@android:style/TextAppearance.Material.Subhead" /> - </RelativeLayout> + <RelativeLayout android:id="@+id/import_settings" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:visibility="gone"> - <Button android:id="@+id/add_number_button" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="end" - android:layout_marginEnd="@dimen/blocked_number_container_padding" - android:layout_marginTop="8dp" - android:text="@string/blockNumber" /> + <TextView android:id="@+id/import_description" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/blocked_call_settings_import_description" + android:textSize="@dimen/blocked_number_settings_description_text_size" + android:paddingStart="@dimen/blocked_number_container_padding" + android:paddingEnd="@dimen/blocked_number_container_padding" + style="@style/BlockedNumbersDescriptionTextStyle" /> + + <Button android:id="@+id/import_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_below="@id/import_description" + android:layout_alignParentEnd="true" + android:layout_marginEnd="@dimen/blocked_number_container_padding" + android:text="@string/blocked_call_settings_import_button" + style="@style/DialerFlatButtonStyle" /> + + <Button android:id="@+id/view_numbers_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_below="@id/import_description" + android:layout_toLeftOf="@id/import_button" + android:text="@string/blocked_call_settings_view_numbers_button" + style="@style/DialerFlatButtonStyle" /> + + <View + android:layout_width="match_parent" + android:layout_height="1dp" + android:layout_below="@id/import_button" + android:background="@color/divider_line_color" + android:layout_marginTop="8dp" + android:layout_marginBottom="8dp" /> + + </RelativeLayout> + + <Button android:id="@+id/add_number_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="end" + android:layout_marginEnd="@dimen/blocked_number_container_padding" + android:layout_marginBottom="8dp" + android:text="@string/blockNumber" /> + + </LinearLayout> + + </android.support.v7.widget.CardView> -</merge> +</LinearLayout> diff --git a/res/layout/blocked_number_item.xml b/res/layout/blocked_number_item.xml index 6c87533f1..79ca42e14 100644 --- a/res/layout/blocked_number_item.xml +++ b/res/layout/blocked_number_item.xml @@ -25,7 +25,7 @@ android:gravity="center_vertical" android:orientation="horizontal" android:focusable="true" - android:background="@color/background_dialer_white"> + android:background="@drawable/blocked_number_item_background"> <QuickContactBadge android:id="@+id/quick_contact_photo" diff --git a/res/layout/view_numbers_to_import_fragment.xml b/res/layout/view_numbers_to_import_fragment.xml index fae708bf1..c79e69af9 100644 --- a/res/layout/view_numbers_to_import_fragment.xml +++ b/res/layout/view_numbers_to_import_fragment.xml @@ -25,6 +25,7 @@ android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" + android:divider="@null" android:headerDividersEnabled="false" /> <RelativeLayout |