diff options
author | Ihab Awad <ihab@google.com> | 2014-12-18 16:30:18 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-12-18 16:30:19 +0000 |
commit | f2c5004155fd55f23317946a956f41303ee8101b (patch) | |
tree | b0d882cb25aae674e1e7bd6a8d0013a7e970cc16 | |
parent | 7594d78c155773244ad1ef714e75f1ed30b51c15 (diff) | |
parent | 0bbd606a3d1da11a38fdc127f4067b06f71174f8 (diff) |
Merge "Improve Talkback for "Speed dial" user interface" into lmp-mr1-dev
-rw-r--r-- | src/com/android/dialer/list/SpeedDialFragment.java | 8 | ||||
-rw-r--r-- | src/com/android/dialer/util/DialerUtils.java | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/com/android/dialer/list/SpeedDialFragment.java b/src/com/android/dialer/list/SpeedDialFragment.java index 2ca16b701..a42031677 100644 --- a/src/com/android/dialer/list/SpeedDialFragment.java +++ b/src/com/android/dialer/list/SpeedDialFragment.java @@ -235,14 +235,16 @@ public class SpeedDialFragment extends Fragment implements OnItemClickListener, /* package */ void setEmptyViewVisibility(final boolean visible) { final int previousVisibility = mEmptyView.getVisibility(); - final int newVisibility = visible ? View.VISIBLE : View.GONE; + final int emptyViewVisibility = visible ? View.VISIBLE : View.GONE; + final int listViewVisibility = visible ? View.GONE : View.VISIBLE; - if (previousVisibility != newVisibility) { + if (previousVisibility != emptyViewVisibility) { final RelativeLayout.LayoutParams params = (LayoutParams) mContactTileFrame .getLayoutParams(); params.height = visible ? LayoutParams.WRAP_CONTENT : LayoutParams.MATCH_PARENT; mContactTileFrame.setLayoutParams(params); - mEmptyView.setVisibility(newVisibility); + mEmptyView.setVisibility(emptyViewVisibility); + mListView.setVisibility(listViewVisibility); } } diff --git a/src/com/android/dialer/util/DialerUtils.java b/src/com/android/dialer/util/DialerUtils.java index 153f762e7..d59deb4ef 100644 --- a/src/com/android/dialer/util/DialerUtils.java +++ b/src/com/android/dialer/util/DialerUtils.java @@ -125,7 +125,7 @@ public class DialerUtils { (ImageView) emptyListView.findViewById(R.id.emptyListViewImage); emptyListViewImage.setImageDrawable(res.getDrawable(imageResId)); - emptyListViewImage.setContentDescription(res.getString(strResId)); + emptyListViewImage.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO); TextView emptyListViewMessage = (TextView) emptyListView.findViewById(R.id.emptyListViewMessage); |