Esempio n. 1
0
 internal DrawableContainerState(android.graphics.drawable.DrawableContainer.DrawableContainerState
                                 orig, android.graphics.drawable.DrawableContainer owner, android.content.res.Resources
                                 res)
 {
     mOwner = owner;
     if (orig != null)
     {
         mChangingConfigurations         = orig.mChangingConfigurations;
         mChildrenChangingConfigurations = orig.mChildrenChangingConfigurations;
         android.graphics.drawable.Drawable[] origDr = orig.mDrawables;
         mDrawables   = new android.graphics.drawable.Drawable[origDr.Length];
         mNumChildren = orig.mNumChildren;
         int N = mNumChildren;
         {
             for (int i = 0; i < N; i++)
             {
                 if (res != null)
                 {
                     mDrawables[i] = origDr[i].getConstantState().newDrawable(res);
                 }
                 else
                 {
                     mDrawables[i] = origDr[i].getConstantState().newDrawable();
                 }
                 mDrawables[i].setCallback(owner);
             }
         }
         mCheckedConstantState = mCanConstantState = true;
         mVariablePadding      = orig.mVariablePadding;
         if (orig.mConstantPadding != null)
         {
             mConstantPadding = new android.graphics.Rect(orig.mConstantPadding);
         }
         mConstantSize         = orig.mConstantSize;
         mComputedConstantSize = orig.mComputedConstantSize;
         mConstantWidth        = orig.mConstantWidth;
         mConstantHeight       = orig.mConstantHeight;
         mHaveOpacity          = orig.mHaveOpacity;
         mOpacity           = orig.mOpacity;
         mHaveStateful      = orig.mHaveStateful;
         mStateful          = orig.mStateful;
         mDither            = orig.mDither;
         mEnterFadeDuration = orig.mEnterFadeDuration;
         mExitFadeDuration  = orig.mExitFadeDuration;
     }
     else
     {
         mDrawables            = new android.graphics.drawable.Drawable[10];
         mNumChildren          = 0;
         mCheckedConstantState = mCanConstantState = false;
     }
 }
Esempio n. 2
0
			internal DrawableContainerState(android.graphics.drawable.DrawableContainer.DrawableContainerState
				 orig, android.graphics.drawable.DrawableContainer owner, android.content.res.Resources
				 res)
			{
				mOwner = owner;
				if (orig != null)
				{
					mChangingConfigurations = orig.mChangingConfigurations;
					mChildrenChangingConfigurations = orig.mChildrenChangingConfigurations;
					android.graphics.drawable.Drawable[] origDr = orig.mDrawables;
					mDrawables = new android.graphics.drawable.Drawable[origDr.Length];
					mNumChildren = orig.mNumChildren;
					int N = mNumChildren;
					{
						for (int i = 0; i < N; i++)
						{
							if (res != null)
							{
								mDrawables[i] = origDr[i].getConstantState().newDrawable(res);
							}
							else
							{
								mDrawables[i] = origDr[i].getConstantState().newDrawable();
							}
							mDrawables[i].setCallback(owner);
						}
					}
					mCheckedConstantState = mCanConstantState = true;
					mVariablePadding = orig.mVariablePadding;
					if (orig.mConstantPadding != null)
					{
						mConstantPadding = new android.graphics.Rect(orig.mConstantPadding);
					}
					mConstantSize = orig.mConstantSize;
					mComputedConstantSize = orig.mComputedConstantSize;
					mConstantWidth = orig.mConstantWidth;
					mConstantHeight = orig.mConstantHeight;
					mHaveOpacity = orig.mHaveOpacity;
					mOpacity = orig.mOpacity;
					mHaveStateful = orig.mHaveStateful;
					mStateful = orig.mStateful;
					mDither = orig.mDither;
					mEnterFadeDuration = orig.mEnterFadeDuration;
					mExitFadeDuration = orig.mExitFadeDuration;
				}
				else
				{
					mDrawables = new android.graphics.drawable.Drawable[10];
					mNumChildren = 0;
					mCheckedConstantState = mCanConstantState = false;
				}
			}