本文整理了Java中android.widget.TextView.getCompoundPaddingRight()
方法的一些代码示例,展示了TextView.getCompoundPaddingRight()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextView.getCompoundPaddingRight()
方法的具体详情如下:
包路径:android.widget.TextView
类名称:TextView
方法名:getCompoundPaddingRight
暂无
代码示例来源:origin: square/assertj-android
public S hasCompoundPaddingRight(int padding) {
isNotNull();
int actualPadding = actual.getCompoundPaddingRight();
assertThat(actualPadding) //
.overridingErrorMessage("Expected compound drawable right padding <%s> but was <%s>.",
padding, actualPadding) //
.isEqualTo(padding);
return myself;
}
代码示例来源:origin: willowtreeapps/Hyperion-Android
attributeTranslator.translatePx(view.getCompoundPaddingTop())));
attributes.add(new ViewAttribute<>("CompoundPaddingRight",
attributeTranslator.translatePx(view.getCompoundPaddingRight())));
attributes.add(new ViewAttribute<>("CompoundPaddingBottom",
attributeTranslator.translatePx(view.getCompoundPaddingBottom())));
代码示例来源:origin: com.squareup.assertj/assertj-android
public S hasCompoundPaddingRight(int padding) {
isNotNull();
int actualPadding = actual.getCompoundPaddingRight();
assertThat(actualPadding) //
.overridingErrorMessage("Expected compound drawable right 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: jbruchanov/AnUitor
values.put("CompoundDrawablePadding", tv.getCompoundDrawablePadding());
values.put("CompoundPaddingLeft", tv.getCompoundPaddingLeft());
values.put("CompoundPaddingRight", tv.getCompoundPaddingRight());
values.put("CompoundPaddingTop", tv.getCompoundPaddingTop());
values.put("CompoundPaddingBottom", tv.getCompoundPaddingBottom());
代码示例来源:origin: MCMrARM/revolution-irc
textView.getCompoundPaddingBottom()) - textView.getCompoundPaddingTop();
float tViewX = Math.min(Math.max(viewX, 0), textView.getWidth() -
textView.getCompoundPaddingRight()) - textView.getCompoundPaddingLeft();
内容来源于网络,如有侵权,请联系作者删除!