getPaddingEnd ( )源码实例Demo

android.view.View#getPaddingEnd ( )源码实例Demo

下面列出了android.view.View#getPaddingEnd ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: FirefoxReality   文件: WidgetPlacement.java
public void setSizeFromMeasure(Context aContext, View aView) {
    aView.measure(View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED),
                  View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED));
    int border =  SettingsStore.getInstance(aContext).getTransparentBorderWidth();
    int paddingH = aView.getPaddingStart() + aView.getPaddingEnd();
    int paddingV = aView.getPaddingTop() + aView.getPaddingBottom();
    width = (int)Math.ceil((aView.getMeasuredWidth() + paddingH)/density) + border * 2;
    height = (int)Math.ceil((aView.getMeasuredHeight() + paddingV)/density) + border * 2;
}
 
源代码2 项目: AndroidBarUtils   文件: AndroidBarUtils.java
/**
 * 设置BarPaddingTop
 *
 * @param context Activity
 * @param view    View[ToolBar、TitleBar、navigationView.getHeaderView(0)]
 */
public static void setBarPaddingTop(Activity context, View view) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
        int paddingStart = view.getPaddingStart();
        int paddingEnd = view.getPaddingEnd();
        int paddingBottom = view.getPaddingBottom();
        int statusBarHeight = getStatusBarHeight(context);
        //改变titleBar的高度
        ViewGroup.LayoutParams lp = view.getLayoutParams();
        lp.height += statusBarHeight;
        view.setLayoutParams(lp);
        //设置paddingTop
        view.setPaddingRelative(paddingStart, statusBarHeight, paddingEnd, paddingBottom);
    }
}
 
源代码3 项目: 365browser   文件: ApiCompatibilityUtils.java
/**
 * @see android.view.View#getPaddingEnd()
 */
public static int getPaddingEnd(View view) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
        return view.getPaddingEnd();
    } else {
        // Before JB MR1, all layouts are left-to-right, so end == right.
        return view.getPaddingRight();
    }
}
 
public static int getPaddingEnd(View view) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
        return view.getPaddingEnd();
    } else {
        return view.getPaddingRight();
    }
}
 
源代码5 项目: letv   文件: ViewCompatJellybeanMr1.java
public static int getPaddingEnd(View view) {
    return view.getPaddingEnd();
}
 
源代码6 项目: ProjectX   文件: Compat.java
@Override
public int getPaddingEnd(View view) {
    return view.getPaddingEnd();
}
 
源代码7 项目: ProjectX   文件: Compat.java
@Override
public int getPaddingEnd(View view) {
    return view.getPaddingEnd();
}
 
源代码8 项目: ProjectX   文件: Compat.java
@Override
public int getPaddingEnd(View view) {
    return view.getPaddingEnd();
}
 
public static int getPaddingEnd(View view) {
    return view.getPaddingEnd();
}
 
源代码评论
动弹
沙发等你来抢
 方法所在类
 同类方法