當前位置: 首頁>>代碼示例>>Java>>正文


Java TextView.getCompoundPaddingBottom方法代碼示例

本文整理匯總了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();
}
 
開發者ID:matpag,項目名稱:ClickDrawableTextView,代碼行數:18,代碼來源:CsDrawableTouchUtils.java

示例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;
}
 
開發者ID:wp521,項目名稱:MyFire,代碼行數:11,代碼來源:ExpandableTextView.java

示例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;
}
 
開發者ID:yhyzgn,項目名稱:Widgets,代碼行數:6,代碼來源:ExpandTextView.java

示例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;
}
 
開發者ID:haihaio,項目名稱:AmenEye,代碼行數:9,代碼來源:FoldableTextView.java

示例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;
}
 
開發者ID:angcyo,項目名稱:RLibrary,代碼行數:6,代碼來源:ExpandableTextView.java

示例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;
}
 
開發者ID:mangestudio,項目名稱:GCSApp,代碼行數:12,代碼來源:ExpandableTextView2.java


注:本文中的android.widget.TextView.getCompoundPaddingBottom方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。