Java Code Examples for android.os.Parcel#readFloatArray()

The following examples show how to use android.os.Parcel#readFloatArray() . 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: BarWavesView.java    From Musicoco with Apache License 2.0 5 votes vote down vote up
private SavedState(Parcel in) {
    super(in);
    barColor = in.readInt();
    fallAnimEnable = in.readInt();
    fallDuration = in.readInt();
    waveColors = (int[][]) in.readValue(null);
    in.readFloatArray(waveHeight);

}
 
Example 2
Source File: ViewTransformDelegater.java    From libcommon with Apache License 2.0 5 votes vote down vote up
private void readFromParcel(final Parcel in) {
         // should read as same order when writing
         mState = in.readInt();
mHandleTouchEvent = in.readInt();
         mMinScale = in.readFloat();
mMaxScale = in.readFloat();
         mCurrentDegrees = in.readFloat();
         in.readFloatArray(mMatrixCache);
     }
 
Example 3
Source File: ParcelUtils.java    From mollyim-android with GNU General Public License v3.0 4 votes vote down vote up
public static void readMatrix(@NonNull Matrix matrix, @NonNull Parcel in) {
  float[] values = new float[9];
  in.readFloatArray(values);
  matrix.setValues(values);
}
 
Example 4
Source File: AssistStructure.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
ViewNode(ParcelTransferReader reader, int nestingLevel) {
    final Parcel in = reader.readParcel(VALIDATE_VIEW_TOKEN, nestingLevel);
    reader.mNumReadViews++;
    final PooledStringReader preader = reader.mStringReader;
    mClassName = preader.readString();
    mFlags = in.readInt();
    final int flags = mFlags;
    if ((flags&FLAGS_HAS_ID) != 0) {
        mId = in.readInt();
        if (mId != View.NO_ID) {
            mIdEntry = preader.readString();
            if (mIdEntry != null) {
                mIdType = preader.readString();
                mIdPackage = preader.readString();
            }
        }
    }

    if ((flags&FLAGS_HAS_AUTOFILL_DATA) != 0) {
        mSanitized = in.readInt() == 1;
        mAutofillId = in.readParcelable(null);
        mAutofillType = in.readInt();
        mAutofillHints = in.readStringArray();
        mAutofillValue = in.readParcelable(null);
        mAutofillOptions = in.readCharSequenceArray();
        final Parcelable p = in.readParcelable(null);
        if (p instanceof HtmlInfo) {
            mHtmlInfo = (HtmlInfo) p;
        }
        mMinEms = in.readInt();
        mMaxEms = in.readInt();
        mMaxLength = in.readInt();
        mTextIdEntry = preader.readString();
        mImportantForAutofill = in.readInt();
    }
    if ((flags&FLAGS_HAS_LARGE_COORDS) != 0) {
        mX = in.readInt();
        mY = in.readInt();
        mWidth = in.readInt();
        mHeight = in.readInt();
    } else {
        int val = in.readInt();
        mX = val&0x7fff;
        mY = (val>>16)&0x7fff;
        val = in.readInt();
        mWidth = val&0x7fff;
        mHeight = (val>>16)&0x7fff;
    }
    if ((flags&FLAGS_HAS_SCROLL) != 0) {
        mScrollX = in.readInt();
        mScrollY = in.readInt();
    }
    if ((flags&FLAGS_HAS_MATRIX) != 0) {
        mMatrix = new Matrix();
        in.readFloatArray(reader.mTmpMatrix);
        mMatrix.setValues(reader.mTmpMatrix);
    }
    if ((flags&FLAGS_HAS_ELEVATION) != 0) {
        mElevation = in.readFloat();
    }
    if ((flags&FLAGS_HAS_ALPHA) != 0) {
        mAlpha = in.readFloat();
    }
    if ((flags&FLAGS_HAS_CONTENT_DESCRIPTION) != 0) {
        mContentDescription = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
    }
    if ((flags&FLAGS_HAS_TEXT) != 0) {
        mText = new ViewNodeText(in, (flags&FLAGS_HAS_COMPLEX_TEXT) == 0);
    }
    if ((flags&FLAGS_HAS_INPUT_TYPE) != 0) {
        mInputType = in.readInt();
    }
    if ((flags&FLAGS_HAS_URL) != 0) {
        mWebScheme = in.readString();
        mWebDomain = in.readString();
    }
    if ((flags&FLAGS_HAS_LOCALE_LIST) != 0) {
        mLocaleList = in.readParcelable(null);
    }
    if ((flags&FLAGS_HAS_EXTRAS) != 0) {
        mExtras = in.readBundle();
    }
    if ((flags&FLAGS_HAS_CHILDREN) != 0) {
        final int NCHILDREN = in.readInt();
        if (DEBUG_PARCEL_TREE || DEBUG_PARCEL_CHILDREN) Log.d(TAG,
                "Preparing to read " + NCHILDREN
                        + " children: @ #" + reader.mNumReadViews
                        + ", level " + nestingLevel);
        mChildren = new ViewNode[NCHILDREN];
        for (int i=0; i<NCHILDREN; i++) {
            mChildren[i] = new ViewNode(reader, nestingLevel + 1);
        }
    }
}
 
Example 5
Source File: ParcelUtils.java    From deltachat-android with GNU General Public License v3.0 4 votes vote down vote up
public static void readMatrix(@NonNull Matrix matrix, @NonNull Parcel in) {
  float[] values = new float[9];
  in.readFloatArray(values);
  matrix.setValues(values);
}
 
Example 6
Source File: SpectrumData.java    From chromadoze with GNU General Public License v3.0 4 votes vote down vote up
private SpectrumData(Parcel in) {
    mData = new float[BAND_COUNT];
    in.readFloatArray(mData);
}