android.view.ViewGroup.MarginLayoutParams#getMarginStart ( )源码实例Demo

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

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);
    }
}
 
源代码2 项目: 365browser   文件: ApiCompatibilityUtils.java
/**
 * @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;
    }
}
 
源代码3 项目: android-chromium   文件: ApiCompatibilityUtils.java
/**
 * @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;
    }
}
 
源代码4 项目: android-chromium   文件: ApiCompatibilityUtils.java
/**
 * @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;
    }
}