Fix #1914, bug involving description info dialogue hitbox

Fix #1914 using getX() instead of getRawX() method and subtracted right padding to get the value. Now info dialog opens only on touch of the icon (#1915)
This commit is contained in:
Sanket Pimple 2018-11-02 18:50:13 +05:30 committed by Adam Jones
parent 178e53515e
commit 1f8063284c

View file

@ -185,8 +185,8 @@ class DescriptionsAdapter extends RecyclerView.Adapter<DescriptionsAdapter.ViewH
if (ViewCompat.getLayoutDirection(view) == ViewCompat.LAYOUT_DIRECTION_LTR) {
value = etDescriptionText.getRight() - etDescriptionText
.getCompoundDrawables()[2]
.getBounds().width();
if (motionEvent.getAction() == ACTION_UP && motionEvent.getRawX() >= value) {
.getBounds().width() - etDescriptionText.getPaddingRight();
if (motionEvent.getAction() == ACTION_UP && motionEvent.getX() >= value) {
callback.showAlert(R.string.media_detail_description,
R.string.description_info);
return true;