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;
}
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;
}
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;
}
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));
}
}
}
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);
}
}
Aggregations