diff options
author | calderwoodra <calderwoodra@google.com> | 2018-02-02 15:52:26 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-02-02 17:27:36 -0800 |
commit | 1579e1c993ecef391a1a828cb2ac13d2985d893d (patch) | |
tree | 2c0e8f1b3dac28c1aa77341281b46a2f8be4fb91 /java/com/android/dialer/main/impl/toolbar/res/layout | |
parent | ae8144b6905143e0a8e5a6920b6ed8f60cf8b00e (diff) |
Implemented drag to remove in NUI with old favorites.
This change moves the remove button to overlap the search bar
instead of reside underneath it since we no longer have top tabs.
Bug: 72722364
Test: manual
PiperOrigin-RevId: 184347110
Change-Id: I5bfa70fec9dd7ee6ee0b7270039931f9277291f4
Diffstat (limited to 'java/com/android/dialer/main/impl/toolbar/res/layout')
-rw-r--r-- | java/com/android/dialer/main/impl/toolbar/res/layout/toolbar_layout.xml | 44 |
1 files changed, 42 insertions, 2 deletions
diff --git a/java/com/android/dialer/main/impl/toolbar/res/layout/toolbar_layout.xml b/java/com/android/dialer/main/impl/toolbar/res/layout/toolbar_layout.xml index 9b0086b38..7c4cee2b3 100644 --- a/java/com/android/dialer/main/impl/toolbar/res/layout/toolbar_layout.xml +++ b/java/com/android/dialer/main/impl/toolbar/res/layout/toolbar_layout.xml @@ -18,8 +18,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/toolbar" android:layout_width="match_parent" - android:layout_height="wrap_content" - android:minHeight="?attr/actionBarSize" + android:layout_height="?attr/actionBarSize" android:background="@color/dialer_theme_color" app:contentInsetStart="0dp" app:contentInsetEnd="0dp"> @@ -89,4 +88,45 @@ <include layout="@layout/expanded_search_bar"/> </com.android.dialer.main.impl.toolbar.SearchBarView> + + <!-- Sets android:importantForAccessibility="no" to avoid being announced when navigating with + talkback enabled. It will still be announced when user drag or drop contact onto it. + This is required since drag and drop event is only sent to views are visible when drag + starts. --> + <com.android.dialer.app.list.RemoveView + android:id="@+id/remove_view" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_gravity="center_vertical" + android:layout_margin="@dimen/search_bar_margin" + android:contentDescription="@string/main_remove_contact" + android:visibility="gone" + android:importantForAccessibility="no"> + + <LinearLayout + android:id="@+id/remove_view_content" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@color/dialer_theme_color" + android:gravity="center" + android:orientation="horizontal"> + + <ImageView + android:id="@+id/remove_view_icon" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:layout_marginBottom="8dp" + android:src="@drawable/quantum_ic_close_vd_theme_24" + android:tint="@color/dialer_primary_text_color_white"/> + + <TextView + android:id="@+id/remove_view_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/main_remove_contact" + android:textColor="@color/dialer_primary_text_color_white" + android:textSize="16sp"/> + </LinearLayout> + </com.android.dialer.app.list.RemoveView> </com.android.dialer.main.impl.toolbar.MainToolbar>
\ No newline at end of file |