Java Code Examples for android.os.Bundle#putCharSequenceArrayList()
The following examples show how to use
android.os.Bundle#putCharSequenceArrayList() .
These examples are extracted from open source projects.
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 Project: AutoBundle File: ExampleActivityAutoBundle.java License: Apache License 2.0 | 5 votes |
public static void pack(@NonNull ExampleActivity source, @NonNull Bundle args) { args.putInt("type2", source.type2); if (source.getName() != null) { args.putString("name", source.getName()); } else { throw new IllegalStateException("name must not be null."); } args.putInt("type1", source.type1); if (source.getAltName() != null) { args.putString("optionalName", source.getAltName()); } if (source.fooList != null) { args.putCharSequenceArrayList("fooList", source.fooList); } if (source.exampleData != null) { ParcelableConverter exampleDataConverter = new ParcelableConverter(); args.putParcelable("exampleData", exampleDataConverter.convert(source.exampleData) ); } if (source.persons != null) { args.putParcelableArrayList("persons", source.persons); } if (source.getExampleData2() != null) { ParcelableConverter exampleData2Converter = new ParcelableConverter(); args.putParcelable("exampleData2", exampleData2Converter.convert(source.getExampleData2()) ); } if (source.integerField != null) { args.putInt("integerField", source.integerField); } if (source.booleanField != null) { args.putBoolean("booleanField", source.booleanField); } args.putInt("intOption", source.intOption); }
Example 2
Source Project: android-state File: InjectionHelper.java License: Eclipse Public License 1.0 | 4 votes |
public void putCharSequenceArrayList(Bundle state, String key, ArrayList<CharSequence> x) { state.putCharSequenceArrayList(key + mBaseKey, x); }
Example 3
Source Project: android-state File: BundlerListCharSequence.java License: Eclipse Public License 1.0 | 4 votes |
@Override public void put(@NonNull String key, @NonNull List<CharSequence> value, @NonNull Bundle bundle) { ArrayList<CharSequence> arrayList = value instanceof ArrayList ? (ArrayList<CharSequence>) value : new ArrayList<>(value); bundle.putCharSequenceArrayList(key, arrayList); }
Example 4
Source Project: postman File: ArrayListBundler.java License: MIT License | 4 votes |
@Override public void writeToBundle(ArrayList<CharSequence> list, Bundle bundle, String key) { bundle.putCharSequenceArrayList(key, list); }