本文整理了Java中android.widget.TextView.getCompoundPaddingLeft()
方法的一些代码示例,展示了TextView.getCompoundPaddingLeft()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextView.getCompoundPaddingLeft()
方法的具体详情如下:
包路径:android.widget.TextView
类名称:TextView
方法名:getCompoundPaddingLeft
暂无
代码示例来源:origin: square/assertj-android
public S hasCompoundPaddingLeft(int padding) {
isNotNull();
int actualPadding = actual.getCompoundPaddingLeft();
assertThat(actualPadding) //
.overridingErrorMessage("Expected compound drawable left padding <%s> but was <%s>.",
padding, actualPadding) //
.isEqualTo(padding);
return myself;
}
代码示例来源:origin: willowtreeapps/Hyperion-Android
attributeTranslator.translatePx(view.getCompoundPaddingLeft())));
attributes.add(new ViewAttribute<>("CompoundPaddingTop",
attributeTranslator.translatePx(view.getCompoundPaddingTop())));
代码示例来源:origin: com.squareup.assertj/assertj-android
public S hasCompoundPaddingLeft(int padding) {
isNotNull();
int actualPadding = actual.getCompoundPaddingLeft();
assertThat(actualPadding) //
.overridingErrorMessage("Expected compound drawable left padding <%s> but was <%s>.",
padding, actualPadding) //
.isEqualTo(padding);
return myself;
}
代码示例来源:origin: darkskygit/VirtualApp
/**
* 文本框的宽度
*
* @param textView 文本框
* @return 宽度
*/
public static int getTextWidth(TextView textView) {
return textView.getMeasuredWidth() - textView.getCompoundPaddingLeft()
- textView.getCompoundPaddingRight();
}
代码示例来源:origin: bzsome/VirtualApp-x326
/**
* 文本框的宽度
*
* @param textView 文本框
* @return 宽度
*/
public static int getTextWidth(TextView textView) {
return textView.getMeasuredWidth() - textView.getCompoundPaddingLeft()
- textView.getCompoundPaddingRight();
}
代码示例来源:origin: jackuhan/AndroidMonitor
/**
* Optimization for when you have TextViews that truncate, per
* http://www.martinadamek.com/2011/01/05/performance-of-android-listview-containing-textviews/
* @param str
* @param textView
* @return
*/
private CharSequence ellipsizeString(CharSequence str, TextView textView) {
int width = textView.getWidth() - textView.getCompoundPaddingLeft() - textView.getCompoundPaddingRight();
return ellipsizeString(str, width, textView.getPaint());
}
代码示例来源:origin: stackoverflow.com
parentTextViewLocation[0] +
startXCoordinatesOfClickedText +
parentTextView.getCompoundPaddingLeft() -
parentTextView.getScrollX()
);
代码示例来源:origin: jbruchanov/AnUitor
values.put("TextScaleX", tv.getTextScaleX());
values.put("CompoundDrawablePadding", tv.getCompoundDrawablePadding());
values.put("CompoundPaddingLeft", tv.getCompoundPaddingLeft());
values.put("CompoundPaddingRight", tv.getCompoundPaddingRight());
values.put("CompoundPaddingTop", tv.getCompoundPaddingTop());
代码示例来源:origin: MCMrARM/revolution-irc
textView.getCompoundPaddingBottom()) - textView.getCompoundPaddingTop();
float tViewX = Math.min(Math.max(viewX, 0), textView.getWidth() -
textView.getCompoundPaddingRight()) - textView.getCompoundPaddingLeft();
mLastTouchInText = viewX >= textView.getCompoundPaddingLeft() &&
viewX <= textView.getWidth() - textView.getCompoundPaddingEnd() &&
viewY >= textView.getCompoundPaddingTop() &&
代码示例来源:origin: shazam/reflow-animator
currentStartRunLeft + getSectionWidth(startLayout, lastCharPosition, charPosition),
startRunBottom);
startBound.offset(sourceView.getCompoundPaddingLeft() + startOffsetLeft, sourceView.getCompoundPaddingTop());
Rect endBound = new Rect(
currentEndRunLeft,
currentEndRunLeft + getSectionWidth(endLayout, lastCharPosition, charPosition),
endRunBottom);
endBound.offset(targetView.getCompoundPaddingLeft() + endOffsetLeft, targetView.getCompoundPaddingTop());
boolean isStartVisible = startRunBottom <= sourceView.getMeasuredHeight();
boolean isEndVisible = endRunBottom <= targetView.getMeasuredHeight();
代码示例来源:origin: stackoverflow.com
parentTextViewLocation[0] +
startXCoordinatesOfClickedText +
textView.getCompoundPaddingLeft() -
textView.getScrollX()
);
内容来源于网络,如有侵权,请联系作者删除!