Skip to content

Commit

Permalink
Merge pull request #9313 from garymathews/TIMOB-25158_6_2_X
Browse files Browse the repository at this point in the history
[6_2_X][TIMOB-25158] Android: Fix TableView.rightImage size
  • Loading branch information
ssjsamir committed Aug 15, 2017
2 parents 3467019 + 7bfb3e2 commit 71b415e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public class TiTableViewRowProxyItem extends TiBaseTableViewItem

private static final String LEFT_MARGIN = "6dp";
private static final String RIGHT_MARGIN = "6dp";
private static final String RIGHT_SIZE = "17dp";
private static final int MIN_HEIGHT = 48;

private BitmapDrawable hasChildDrawable, hasCheckDrawable;
Expand Down Expand Up @@ -551,9 +550,10 @@ protected void onLayout(boolean changed, int left, int top, int right, int botto
}

if (rightImage != null && rightImage.getVisibility() != GONE) {
int w = new TiDimension(RIGHT_SIZE, TiDimension.TYPE_RIGHT).getAsPixels(this);
int h = new TiDimension(RIGHT_SIZE, TiDimension.TYPE_RIGHT).getAsPixels(this);
int w = rightImage.getMeasuredWidth();
int h = rightImage.getMeasuredHeight();
int rightMargin = new TiDimension(RIGHT_MARGIN, TiDimension.TYPE_RIGHT).getAsPixels(this);

contentRight -= w + rightMargin;
int offset = (height - h) / 2;
rightImage.layout(right-w-rightMargin, top+offset, right-rightMargin, top+offset+h);
Expand Down

0 comments on commit 71b415e

Please sign in to comment.