Search in sources :

Example 6 with Parcelable

use of android.os.Parcelable in project cw-omnibus by commonsguy.

the class UnderlinePageIndicator method onSaveInstanceState.

@Override
public Parcelable onSaveInstanceState() {
    Parcelable superState = super.onSaveInstanceState();
    SavedState savedState = new SavedState(superState);
    savedState.currentPage = mCurrentPage;
    return savedState;
}
Also used : Parcelable(android.os.Parcelable)

Example 7 with Parcelable

use of android.os.Parcelable in project android-betterpickers by code-troopers.

the class ExpirationPicker method onSaveInstanceState.

@Override
public Parcelable onSaveInstanceState() {
    final Parcelable parcel = super.onSaveInstanceState();
    final SavedState state = new SavedState(parcel);
    state.mMonthInput = mMonthInput;
    state.mYearInput = mYearInput;
    state.mYearInputPointer = mYearInputPointer;
    return state;
}
Also used : Parcelable(android.os.Parcelable)

Example 8 with Parcelable

use of android.os.Parcelable in project android-betterpickers by code-troopers.

the class NumberPicker method onSaveInstanceState.

@Override
public Parcelable onSaveInstanceState() {
    final Parcelable parcel = super.onSaveInstanceState();
    final SavedState state = new SavedState(parcel);
    state.mInput = mInput;
    state.mSign = mSign;
    state.mInputPointer = mInputPointer;
    return state;
}
Also used : Parcelable(android.os.Parcelable)

Example 9 with Parcelable

use of android.os.Parcelable in project cw-omnibus by commonsguy.

the class MainActivity method readFromTag.

void readFromTag(Intent i) {
    Parcelable[] msgs = (Parcelable[]) i.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES);
    if (msgs.length > 0) {
        NdefMessage msg = (NdefMessage) msgs[0];
        if (msg.getRecords().length > 0) {
            NdefRecord rec = msg.getRecords()[0];
            secretMessage.setText(new String(rec.getPayload(), US_ASCII));
        }
    }
}
Also used : NdefRecord(android.nfc.NdefRecord) NdefMessage(android.nfc.NdefMessage) Parcelable(android.os.Parcelable)

Example 10 with Parcelable

use of android.os.Parcelable in project cw-omnibus by commonsguy.

the class WebBeamActivity method handleIntent.

private void handleIntent(Intent i) {
    if (NfcAdapter.ACTION_NDEF_DISCOVERED.equals(i.getAction())) {
        Parcelable[] rawMsgs = i.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES);
        NdefMessage msg = (NdefMessage) rawMsgs[0];
        String url = new String(msg.getRecords()[0].getPayload());
        beamFragment.loadUrl(url);
    }
}
Also used : NdefMessage(android.nfc.NdefMessage) Parcelable(android.os.Parcelable)

Aggregations

Parcelable (android.os.Parcelable)818 Bundle (android.os.Bundle)99 View (android.view.View)85 Intent (android.content.Intent)56 SparseArray (android.util.SparseArray)38 Test (org.junit.Test)31 ArrayList (java.util.ArrayList)26 MenuItem (android.view.MenuItem)23 ImageView (android.widget.ImageView)23 TextView (android.widget.TextView)17 MenuItem (com.actionbarsherlock.view.MenuItem)14 SuppressLint (android.annotation.SuppressLint)13 Dialog (android.app.Dialog)13 MediumTest (android.support.test.filters.MediumTest)13 NameNotFoundException (android.content.pm.PackageManager.NameNotFoundException)12 Paint (android.graphics.Paint)12 MenuView (com.android.internal.view.menu.MenuView)12 RemoteException (android.os.RemoteException)11 Bitmap (android.graphics.Bitmap)10 ShortcutIconResource (android.content.Intent.ShortcutIconResource)9