本文整理汇总了Java中android.widget.TextView.getCompoundPaddingBottom方法的典型用法代码示例。如果您正苦于以下问题:Java TextView.getCompoundPaddingBottom方法的具体用法?Java TextView.getCompoundPaddingBottom怎么用?Java TextView.getCompoundPaddingBottom使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.widget.TextView
的用法示例。
在下文中一共展示了TextView.getCompoundPaddingBottom方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: CsDrawableTouchUtils
import android.widget.TextView; //导入方法依赖的package包/类
CsDrawableTouchUtils(MotionEvent event, TextView view, boolean isLayoutRTL){
this.event = event;
this.view = view;
this.isLayoutRTL = isLayoutRTL;
vSpace = view.getHeight() - view.getCompoundPaddingBottom() - view.getCompoundPaddingTop();
hSpace = view.getWidth() - view.getCompoundPaddingRight() - view.getCompoundPaddingLeft();
//if the drawable is extremely large (pushing the edges of the drawable itself
//or of the other drawables out of the current view bounds, will not be possible
//to calculate the correct touch position
if (hSpace < 0 || vSpace < 0){
throw new IllegalArgumentException("The size of one of your drawable is exceeding the" +
" calculated width or height of the view. In this case you should provide" +
"a smaller drawable or provide a smaller dimension in XML or with the builder");
}
scrollX = view.getScrollX();
scrollY = view.getScrollY();
}
示例2: getRealTextViewHeight
import android.widget.TextView; //导入方法依赖的package包/类
/**
* 获取内容tv真实高度(含padding)
* @param textView
* @return
*/
private static int getRealTextViewHeight( TextView textView) {
int textHeight = textView.getLayout().getLineTop(textView.getLineCount());
int padding = textView.getCompoundPaddingTop() + textView.getCompoundPaddingBottom();
return textHeight + padding;
}
示例3: getRealTextViewHeight
import android.widget.TextView; //导入方法依赖的package包/类
private static int getRealTextViewHeight(@NonNull TextView textView) {
int textHeight = textView.getLayout().getLineTop(textView.getLineCount());
int padding = textView.getCompoundPaddingTop() + textView.getCompoundPaddingBottom();
return textHeight + padding;
}
示例4: getRealTextViewHeight
import android.widget.TextView; //导入方法依赖的package包/类
/**
* 获取内容tv真实高度(含padding)
*/
private static int getRealTextViewHeight(TextView textView) {
int textHeight = textView.getLayout().getLineTop(textView.getLineCount());
int padding = textView.getCompoundPaddingTop() + textView.getCompoundPaddingBottom();
return textHeight + padding;
}
示例5: getRealTextViewHeight
import android.widget.TextView; //导入方法依赖的package包/类
private static int getRealTextViewHeight(TextView textView) {
int textHeight = textView.getLayout().getLineTop(textView.getLineCount());
int padding = textView.getCompoundPaddingTop() + textView.getCompoundPaddingBottom();
return textHeight + padding;
}
示例6: getRealTextViewHeight
import android.widget.TextView; //导入方法依赖的package包/类
/**
* 获取内容tv真实高度(含padding)
*
* @param textView
* @return
*/
private static int getRealTextViewHeight(TextView textView) {
int textHeight = textView.getLayout().getLineTop(textView.getLineCount());
int padding = textView.getCompoundPaddingTop() + textView.getCompoundPaddingBottom();
return textHeight + padding;
}