Пример #1
0
    public Style(Parcel parcel) {

      mType = Type.values()[parcel.readInt()];

      if (mType == Type.BUTTON) {

        mButtonText = parcel.readString();
        mButtonTextSize = parcel.readFloat();
        mButtonTextColor = parcel.readInt();
        mButtonResource = parcel.readInt();
        mButtonDividerResource = parcel.readInt();
        mButtonTypeface = parcel.readInt();
        mClickListenerTag = parcel.readString();
      }

      boolean hasIcon = parcel.readByte() != 0;

      if (hasIcon) {

        mIconResource = parcel.readInt();
        mIconPosition = IconPosition.values()[parcel.readInt()];
      }

      mDismissListenerTag = parcel.readString();
      mAnimations = Animations.values()[parcel.readInt()];
      mText = parcel.readString();
      mTypeface = parcel.readInt();
      mDuration = parcel.readInt();
      mTextColor = parcel.readInt();
      mTextSize = parcel.readFloat();
      isIndeterminate = parcel.readByte() != 0;
      mBackgroundResource = parcel.readInt();
      isTouchDismissable = parcel.readByte() != 0;
      isSwipeDismissable = parcel.readByte() != 0;
    }
Пример #2
0
 private BackStackItem(Parcel aIn) {
   path = aIn.readString();
   parentIsBack = aIn.readInt() != 0;
 }