本文整理匯總了Java中android.support.v4.view.ViewCompat.getPaddingEnd方法的典型用法代碼示例。如果您正苦於以下問題:Java ViewCompat.getPaddingEnd方法的具體用法?Java ViewCompat.getPaddingEnd怎麽用?Java ViewCompat.getPaddingEnd使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.support.v4.view.ViewCompat
的用法示例。
在下文中一共展示了ViewCompat.getPaddingEnd方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onMeasure
import android.support.v4.view.ViewCompat; //導入方法依賴的package包/類
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int padStart = ViewCompat.getPaddingStart(this);
int padEnd = ViewCompat.getPaddingEnd(this);
final int preferredHeight = mDesiredDayHeight * MAX_WEEKS_IN_MONTH
+ mDesiredDayOfWeekHeight + mDesiredMonthHeight
+ getPaddingTop() + getPaddingBottom();
final int preferredWidth = mDesiredCellWidth * DAYS_IN_WEEK
+ padStart + padEnd;
final int resolvedWidth = resolveSize(preferredWidth, widthMeasureSpec);
final int resolvedHeight = resolveSize(preferredHeight, heightMeasureSpec);
setMeasuredDimension(resolvedWidth, resolvedHeight);
}
示例2: getPaddingEnd
import android.support.v4.view.ViewCompat; //導入方法依賴的package包/類
static int getPaddingEnd(View v) {
if (v == null) {
return 0;
}
return ViewCompat.getPaddingEnd(v);
}
示例3: getPaddingEnd
import android.support.v4.view.ViewCompat; //導入方法依賴的package包/類
public int getPaddingEnd() {
return this.mRecyclerView != null ? ViewCompat.getPaddingEnd(this.mRecyclerView) : 0;
}
示例4: getPaddingEnd
import android.support.v4.view.ViewCompat; //導入方法依賴的package包/類
static int getPaddingEnd(View v) {
if (v == null) {
return 0;
}
return ViewCompat.getPaddingEnd(v);
}
示例5: getPaddingEnd
import android.support.v4.view.ViewCompat; //導入方法依賴的package包/類
/**
* Return the end padding of the parent RecyclerView
*
* @return Padding in pixels
*/
public int getPaddingEnd() {
return mRecyclerView != null ? ViewCompat.getPaddingEnd(mRecyclerView) : 0;
}