mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
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:
parent
178e53515e
commit
1f8063284c
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue