From 11ee58b1b8711c6d3b2ade6a71835b6c102a08a7 Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Tue, 13 Aug 2013 10:10:57 -0700 Subject: Use swipe helper for swiping * Use SwipeHelper for swiping, in SwipeableListView for regular favorites. SwipeHelper and SwipeableListView are copied from DeskClock, with minor modifications (to prevent swiping or call log items, and all contact buttons). * Make ContactTileRow implement SwipeHelperCallback so that tiled favorites can be swiped. * Remove PhoneFavoriteGestureListener * Add selectable item backgrounds to undo buttons on removal dialog * Moved common code shared by PhoneFavoriteRegularRowView and PhoneFavoriteSquareTileView to PhoneFavoriteTileView * Standardize layout ids for phone_favorite_regular_row_view and phone_favorite_tile_view * Add long click listener to PhoneFavoriteTileView to trigger the start of a drag and drop operation * Remove any contact entries that are in the removal dialog phase if the app is paused Bug: 10257340 Bug: 10341201 Bug: 10328093 Bug: 10290239 Bug: 10262721 Bug: 10257340 Change-Id: I20448048b658759f6de75d643d2150be5a6ba8af --- res/layout/phone_favorite_regular_row_view.xml | 8 ++++--- res/layout/phone_favorite_tile_view.xml | 12 ++++++----- res/layout/phone_favorites_fragment.xml | 2 +- res/values/animation_constants.xml | 30 ++++++++++++++++++++++++++ res/values/ids.xml | 22 +++++++++++++++++++ 5 files changed, 65 insertions(+), 9 deletions(-) create mode 100644 res/values/animation_constants.xml create mode 100644 res/values/ids.xml (limited to 'res') diff --git a/res/layout/phone_favorite_regular_row_view.xml b/res/layout/phone_favorite_regular_row_view.xml index 137d3da60..8ac01d666 100644 --- a/res/layout/phone_favorite_regular_row_view.xml +++ b/res/layout/phone_favorite_regular_row_view.xml @@ -17,7 +17,7 @@ @@ -88,7 +88,9 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:clickable="true" - android:layout_marginRight="30dp" + android:paddingStart="30dp" + android:paddingEnd="30dp" + android:background="?android:attr/selectableItemBackground" android:gravity="center_vertical"> @@ -86,18 +86,19 @@ diff --git a/res/layout/phone_favorites_fragment.xml b/res/layout/phone_favorites_fragment.xml index 2b6bbe447..6a3320bb7 100644 --- a/res/layout/phone_favorites_fragment.xml +++ b/res/layout/phone_favorites_fragment.xml @@ -28,7 +28,7 @@ android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1"> - + + + 250 + + + 100 + 200 + 400 + 2000 + 350 + 2 + 5dip + 10dip + 20dip + \ No newline at end of file diff --git a/res/values/ids.xml b/res/values/ids.xml new file mode 100644 index 000000000..2b095043a --- /dev/null +++ b/res/values/ids.xml @@ -0,0 +1,22 @@ + + + + + + \ No newline at end of file -- cgit v1.2.3