CodePudding user response:
Private int indicatorPadding=0;//definition about spacingAgain a bit package method: public void setIndicatorPadding (int indicatorPadding) {
Enclosing indicatorPadding=indicatorPadding;
Invalidate ().
}
Then in the protected void ontouch (Canvas Canvas) {
Canvas. DrawRect (lineLeft + indicatorPadding, height - indicatorHeight lineRight - indicatorPadding, height, rectPaint);
}
Then attributes defined in the outermost style of local calls this method and assignment mTabs. SetIndicatorPadding (120);
CodePudding user response:
On the second floor of this method doesn't work, and after all the indicator length is 120