Skip to content

Commit

Permalink
add leftImgVisible
Browse files Browse the repository at this point in the history
  • Loading branch information
huiger committed Aug 17, 2017
1 parent debe618 commit 2d737b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
app:titleLeftText="返回"
android:background="#000"
app:titleTextColor="#fff"
app:titleRightText="add"
app:titleCenterText="测试一下"/>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ protected void onDraw(Canvas canvas) {
}

if (!TextUtils.isEmpty(rightText)) {
mCanvas.drawText(rightText, layoutWidth - paddingRight + mPaint.measureText(rightText),
mCanvas.drawText(rightText, layoutWidth - paddingRight - mPaint.measureText(rightText),
textCenterHeight, mPaint);
}

Expand Down

0 comments on commit 2d737b8

Please sign in to comment.