Java Code Examples for android.view.View#getPaddingStart()
The following examples show how to use
android.view.View#getPaddingStart() .
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: FirefoxReality File: WidgetPlacement.java License: Mozilla Public License 2.0 | 5 votes |
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; }
Example 2
Source Project: AndroidBarUtils File: AndroidBarUtils.java License: Apache License 2.0 | 5 votes |
/** * 设置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); } }
Example 3
Source Project: 365browser File: ApiCompatibilityUtils.java License: Apache License 2.0 | 5 votes |
/** * @see android.view.View#getPaddingStart() */ public static int getPaddingStart(View view) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { return view.getPaddingStart(); } else { // Before JB MR1, all layouts are left-to-right, so start == left. return view.getPaddingLeft(); } }
Example 4
Source Project: AppCompat-Extension-Library File: ViewCompatUtils.java License: Apache License 2.0 | 5 votes |
public static int getPaddingStart(View view) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { return view.getPaddingStart(); } else { return view.getPaddingLeft(); } }
Example 5
Source Project: letv File: ViewCompatJellybeanMr1.java License: Apache License 2.0 | 4 votes |
public static int getPaddingStart(View view) { return view.getPaddingStart(); }
Example 6
Source Project: ProjectX File: Compat.java License: Apache License 2.0 | 4 votes |
@Override public int getPaddingStart(View view) { return view.getPaddingStart(); }
Example 7
Source Project: ProjectX File: Compat.java License: Apache License 2.0 | 4 votes |
@Override public int getPaddingStart(View view) { return view.getPaddingStart(); }
Example 8
Source Project: ProjectX File: Compat.java License: Apache License 2.0 | 4 votes |
@Override public int getPaddingStart(View view) { return view.getPaddingStart(); }
Example 9
Source Project: adt-leanback-support File: ViewCompatJellybeanMr1.java License: Apache License 2.0 | 4 votes |
public static int getPaddingStart(View view) { return view.getPaddingStart(); }