Created
December 4, 2013 22:10
-
-
Save tophyr/7796505 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public ActionBarContainer(Context context, AttributeSet attrs) { | |
| super(context, attrs); | |
| setBackgroundDrawable(null); | |
| TypedArray a = context.obtainStyledAttributes(attrs, | |
| com.android.internal.R.styleable.ActionBar); | |
| mBackground = a.getDrawable(com.android.internal.R.styleable.ActionBar_background); | |
| mStackedBackground = a.getDrawable( | |
| com.android.internal.R.styleable.ActionBar_backgroundStacked); | |
| if (getId() == com.android.internal.R.id.split_action_bar) { | |
| mIsSplit = true; | |
| mSplitBackground = a.getDrawable( | |
| com.android.internal.R.styleable.ActionBar_backgroundSplit); | |
| } | |
| a.recycle(); | |
| setWillNotDraw(mIsSplit ? mSplitBackground == null : | |
| mBackground == null && mStackedBackground == null); | |
| } | |
| public ActionBarContainer(Context context, AttributeSet attrs) { | |
| super(context, attrs); | |
| setBackgroundDrawable(null); | |
| TypedArray a = context.obtainStyledAttributes(attrs, | |
| com.android.internal.R.styleable.ActionBar); | |
| mBackground = a.getDrawable(com.android.internal.R.styleable.ActionBar_background); | |
| mStackedBackground = a.getDrawable( | |
| com.android.internal.R.styleable.ActionBar_backgroundStacked); | |
| if (getId() == com.android.internal.R.id.split_action_bar) { | |
| mIsSplit = true; | |
| mSplitBackground = a.getDrawable( | |
| com.android.internal.R.styleable.ActionBar_backgroundSplit); | |
| } | |
| a.recycle(); | |
| setWillNotDraw(mIsSplit ? mSplitBackground == null : | |
| mBackground == null && mStackedBackground == null); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment