Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pstsIndicatorMarginLeftRight #261

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open

Conversation

flyfly121
Copy link

Draw indicator from 'left + pstsIndicatorMarginLeftRight' to 'right - pstsIndicatorMarginLeftRight'.

flyfly121 and others added 30 commits August 28, 2015 01:33
<attr name="pstsIndicatorMarginLeftRight" format="dimension" />
indicatorMarginLeftRight
add attrs
if (indicatorAlignTabTextLeftRight) {
			if (currentTab instanceof TextView) {
				Paint p = ((TextView) currentTab).getPaint();
				float textLength = p.measureText(((TextView)currentTab).getText().toString().toUpperCase());
				indicatorMarginLeftRight = (int) ((currentTab.getWidth() - textLength) / 2);
			}
		}
之前加了个指示器Indicator左右边距的属性pstsIndicatorMarginLeftRight,可是设计师想要指示器与文字TabText等宽,于是我又加了一个属性pstsIndicatorAlignTabTextLeftRight,完美解决。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant