Java Code Examples for android.view.ViewGroup.MarginLayoutParams#getMarginStart()
The following examples show how to use
android.view.ViewGroup.MarginLayoutParams#getMarginStart() .
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 File: PlaybackControlsRowPresenter.java From adt-leanback-support with Apache License 2.0 | 6 votes |
private void initRow(ViewHolder vh) { vh.mCardHeight = vh.mCard.getLayoutParams().height; MarginLayoutParams lp = (MarginLayoutParams) vh.mControlsDock.getLayoutParams(); vh.mControlsDockMarginStart = lp.getMarginStart(); vh.mControlsDockMarginEnd = lp.getMarginEnd(); vh.mControlsVh = (PlaybackControlsPresenter.ViewHolder) mPlaybackControlsPresenter.onCreateViewHolder(vh.mControlsDock); mPlaybackControlsPresenter.setProgressColor(vh.mControlsVh, mProgressColorSet ? mProgressColor : getDefaultProgressColor(vh.mControlsDock.getContext())); vh.mControlsDock.addView(vh.mControlsVh.view); vh.mSecondaryControlsVh = mSecondaryControlsPresenter.onCreateViewHolder(vh.mSecondaryControlsDock); if (!mSecondaryActionsHidden) { vh.mSecondaryControlsDock.addView(vh.mSecondaryControlsVh.view); } }
Example 2
Source File: ApiCompatibilityUtils.java From 365browser with Apache License 2.0 | 5 votes |
/** * @see android.view.ViewGroup.MarginLayoutParams#getMarginStart() */ public static int getMarginStart(MarginLayoutParams layoutParams) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { return layoutParams.getMarginStart(); } else { return layoutParams.leftMargin; } }
Example 3
Source File: ApiCompatibilityUtils.java From android-chromium with BSD 2-Clause "Simplified" License | 5 votes |
/** * @see android.view.ViewGroup.MarginLayoutParams#getMarginStart() */ public static int getMarginStart(MarginLayoutParams layoutParams) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { return layoutParams.getMarginStart(); } else { return layoutParams.leftMargin; } }
Example 4
Source File: ApiCompatibilityUtils.java From android-chromium with BSD 2-Clause "Simplified" License | 5 votes |
/** * @see android.view.ViewGroup.MarginLayoutParams#getMarginStart() */ public static int getMarginStart(MarginLayoutParams layoutParams) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { return layoutParams.getMarginStart(); } else { return layoutParams.leftMargin; } }