List of usage examples for android.os Bundle getLong
public long getLong(String key)
From source file:com.example.crudcontent.fragment.DatePickerDialogFragment.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Bundle args = getArguments(); if (args != null) { date = new Date(args.getLong(ARG_DATE)); }/* www. ja va 2 s . c o m*/ }
From source file:de.incoherent.osaac.activities.EditAlarmActivity.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_edit_alarm); mNameEdit = (EditText) findViewById(R.id.nameTextEdit); Bundle extras = getIntent().getExtras(); long id = extras.getLong("id"); Database db = new Database(this); db.open();/*ww w . ja va 2 s. c o m*/ mAlarm = db.getAlarm(id); int holidayCount = db.getAlarmHolidaysCount(id); mAlarm.set24HourFormat(DateFormat.is24HourFormat(this)); db.close(); if (mAlarm == null) { setResult(RESULT_CANCELED); finish(); } mTimeScrollerFragment = new TimeScrollerFragment(mAlarm.getHour(), mAlarm.getMinute(), DateFormat.is24HourFormat(this)); FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); ft.add(R.id.timeScrollerLayout, mTimeScrollerFragment); mNameEdit.setText(mAlarm.getName()); Bundle args = new Bundle(); args.putLong("exemptionId", mAlarm.getId()); args.putInt("exemptionCount", holidayCount); args.putString("ringtoneUri", mAlarm.getRingtoneUri()); args.putString("ringtoneTitle", mAlarm.getRingtoneTitle()); args.putBoolean("snoozeChecked", mAlarm.snooze()); args.putBoolean("challengeChecked", false); args.putBoolean("vibrateChecked", mAlarm.vibrate()); args.putInt("volume", mAlarm.getVolume()); args.putInt("weekMask", mAlarm.getRepeatWeekBitmask()); mSettingsFragment = new SettingsFragment(args); ft.add(R.id.settingsLayout, mSettingsFragment); ft.commit(); }
From source file:com.cyanogenmod.eleven.adapters.ArtistDetailAlbumAdapter.java
@Override // LoaderCallbacks public Loader<List<Album>> onCreateLoader(int id, Bundle args) { return new AlbumLoader(mActivity, args.getLong(Config.ID)); }
From source file:com.github.suzukaze.yarulistfortodoly.fragment.ItemListFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ItemListView itemListView = (ItemListView) inflater.inflate(R.layout.item_list, container, false); ButterKnife.bind(this, itemListView); MainActivity mainActivity = (MainActivity) getActivity(); InputMethodManager inputMethodManager = mainActivity.getInputMethodManager(); Bundle bundle = getArguments(); if (bundle != null) { long projectId = bundle.getLong(KEY_PROJECT_ID); project = dataManager.getProject(projectId); ItemListViewModel itemListViewModel = new ItemListViewModel(sharedPreferencesManager, accountManager, dataManager, historyManager); itemListViewModel.setProjectId(projectId); itemListView.init(itemListViewModel, mainActivity, inputMethodManager, mainActivity.getEditItemView(), compositeSubscription);//from w w w .j a v a 2 s. c o m itemListView.show(); } return itemListView; }
From source file:de.vanita5.twittnuker.fragment.support.DestroySavedSearchDialogFragment.java
private long getAccountId() { final Bundle args = getArguments(); if (!args.containsKey(EXTRA_ACCOUNT_ID)) return -1; return args.getLong(EXTRA_ACCOUNT_ID); }
From source file:com.dwdesign.tweetings.fragment.SearchUsersFragment.java
@Override public Loader<List<ParcelableUser>> newLoaderInstance() { final Bundle args = getArguments(); long account_id = -1; String query = null;//from ww w . j av a 2 s .c om if (args != null) { account_id = args.getLong(INTENT_KEY_ACCOUNT_ID); query = args.getString(INTENT_KEY_QUERY); } return new UserSearchLoader(getActivity(), account_id, query, mPage, getData()); }
From source file:com.ultramegasoft.flavordex2.fragment.AddFlavorsFragment.java
@Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); final Bundle args = getArguments(); if (args != null) { mCatId = args.getLong(AddEntryFragment.ARG_CAT_ID); }// ww w .j a v a 2 s . c o m }
From source file:com.freshdigitable.udonroad.UserInfoFragment.java
private long getUserId() { final Bundle arguments = getArguments(); return arguments.getLong("userId"); }
From source file:de.vanita5.twittnuker.fragment.support.UserFavoritesFragment.java
@Override public Loader<List<ParcelableStatus>> newLoaderInstance(final Context context, final Bundle args) { if (args == null) return null; final long account_id = args.getLong(EXTRA_ACCOUNT_ID); final long user_id = args.getLong(EXTRA_USER_ID, -1); final long max_id = args.getLong(EXTRA_MAX_ID, -1); final long since_id = args.getLong(EXTRA_SINCE_ID, -1); final String screen_name = args.getString(EXTRA_SCREEN_NAME); final int tab_position = args.getInt(EXTRA_TAB_POSITION, -1); mUserId = user_id;/* w ww .ja va 2 s . c o m*/ mUserScreenName = screen_name; return new UserFavoritesLoader(getActivity(), account_id, user_id, screen_name, max_id, since_id, getData(), getSavedStatusesFileArgs(), tab_position); }
From source file:com.nadmm.airports.ListMenuFragment.java
@Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); Bundle args = getArguments(); getSupportActionBar().setSubtitle(args.getString(SUBTITLE_TEXT)); long id = args.getLong(MENU_ID); Cursor c = getMenuCursor(id); setCursor(c);// ww w . ja v a2s . c o m }