Example usage for android.os Bundle getLong

List of usage examples for android.os Bundle getLong

Introduction

In this page you can find the example usage for android.os Bundle getLong.

Prototype

public long getLong(String key) 

Source Link

Document

Returns the value associated with the given key, or 0L if no mapping of the desired type exists for the given key.

Usage

From source file:com.vuze.android.remote.dialog.DialogFragmentDeleteTorrent.java

private void setupVars(View view) {
    Bundle args = getArguments();
    String name = args.getString("name");
    torrentId = args.getLong("id");

    String remoteProfileID = args.getString(SessionInfoManager.BUNDLE_KEY);
    sessionInfo = SessionInfoManager.getSessionInfo(remoteProfileID, null);

    cbDeleteData = (CheckBox) view.findViewById(R.id.dialog_delete_datacheck);

    RemoteProfile remoteProfile = sessionInfo.getRemoteProfile();
    if (remoteProfile != null) {
        cbDeleteData.setChecked(remoteProfile.isDeleteRemovesData());
    }/*  w  w  w  .j  a  v a 2s.  c  o m*/

    TextView tv = (TextView) view.findViewById(R.id.dialog_delete_message);

    tv.setText(getResources().getString(R.string.dialog_delete_message, name));
}

From source file:com.jpventura.popularmovies.app.OverviewActivity.java

@Override
public Loader<Cursor> onCreateLoader(int strategy, Bundle args) {
    MovieSelection selection = new MovieSelection().baseId(args.getLong(EXTRA_MOVIE_ID));

    return new CursorLoader(this, MovieColumns.CONTENT_URI, PROJECTION, selection.sel(), selection.args(),
            null);/*from   w  w w  .  j  a  v a2s . com*/
}

From source file:com.serenegiant.aceparrot.PhotoFragment.java

@Override
protected void loadArguments(final Bundle savedInstanceState) {
    Bundle args = savedInstanceState;
    if (args == null) {
        args = getArguments();/*w  w w  .  j a  v a 2 s  .  c o  m*/
    }
    mId = args.getLong(KEY_FILE_ID);
}

From source file:com.andryr.musicplayer.fragments.dialog.AlbumEditorDialog.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Bundle args = getArguments();
    if (args != null) {

        long id = args.getLong(ARG_ID);
        String title = args.getString(ARG_NAME);
        String artist = args.getString(ARG_ARTIST);
        int year = args.getInt(ARG_YEAR);
        int trackCount = args.getInt(ARG_TRACK_COUNT);

        mAlbum = new Album(id, title, artist, year, trackCount);

    }// w w w. j  av  a  2s. c om
}

From source file:com.pseudosudostudios.jdd.fragments.ScoreFragment.java

public void setDisplays(Bundle data) {
    try {/* ww  w .  j  a  v a2s.  co m*/
        this.time = data.getLong(WinActivity.timeKey);
        this.moves = data.getInt(WinActivity.moveKey);
        this.numColors = Grid.numberOfColors;
        Entry n = new Entry(data.getString(WinActivity.levelKey), moves, time, Grid.numberOfColors);
        this.score = n.getScore();
        timeDisplay.setText(time / 1000 + "");
        scoreDisplay.setText(score + "");
        movesDisplay.setText(moves + "");
        shareSocial.setVisibility(View.VISIBLE);
        ScoreSaves.addNewScore(getActivity(), n);
        highScores.setAdapter(new HighScoresAdapter(getActivity()));
        highScores.invalidate();
        // Google play games
    } catch (NullPointerException e) {
        e.printStackTrace();
    }
}

From source file:de.aw.monma.wertpapier.FragmentWertpapierKurseListe.java

@Override
public void setCursorLoaderArguments(int id, Bundle args) {
    args.putString(ORDERBY, orderBy);//from   w  w  w .j  av  a 2s .  c o m
    args.putString(SELECTION, selection);
    Long wpid = args.getLong(WPID);
    String[] selectionArgs = new String[] { String.valueOf(wpid) };
    args.putStringArray(SELECTIONARGS, selectionArgs);
}

From source file:com.andryr.musicplayer.fragments.dialog.ID3TagEditorDialog.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Bundle args = getArguments();
    if (args != null) {

        long id = args.getLong(ARG_ID);
        String title = args.getString(ARG_TITLE);
        String artist = args.getString(ARG_ARTIST);
        String album = args.getString(ARG_ALBUM);
        long albumId = args.getLong(ARG_ALBUM_ID);
        int trackNumber = args.getInt(ARG_TRACK_NUMBER);
        mSong = new Song(id, title, artist, album, albumId, trackNumber, 0);

    }//from  w  ww  .j  a v  a2s  .  c  o m
}

From source file:com.cyanogenmod.eleven.ui.fragments.AlbumDetailFragment.java

private void setupHeader(String artist, Bundle arguments) {
    mAlbumId = arguments.getLong(Config.ID);
    mArtistName = artist;//from  w w w .j  av a2s. c om
    mAlbumName = arguments.getString(Config.NAME);
    String year = arguments.getString(Config.ALBUM_YEAR);
    int songCount = arguments.getInt(Config.SONG_COUNT);

    mAlbumArt = (ImageView) mRootView.findViewById(R.id.album_art);
    mAlbumArt.setContentDescription(mAlbumName);
    ImageFetcher.getInstance(getActivity()).loadAlbumImage(artist, mAlbumName, mAlbumId, mAlbumArt);

    TextView title = (TextView) mRootView.findViewById(R.id.title);
    title.setText(mAlbumName);

    setupCountAndYear(mRootView, year, songCount);

    // will be updated once we have song data
    mAlbumDuration = (TextView) mRootView.findViewById(R.id.duration);
    mGenre = (TextView) mRootView.findViewById(R.id.genre);
}

From source file:de.dev.eth0.rssreader.app.ui.FeedEntryDetailActivity.java

@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
    super.onRestoreInstanceState(savedInstanceState);
    if (savedInstanceState != null) {
        feedId = savedInstanceState.getLong(FeedEntryTable.COLUMN_ID);
    }//w w  w.  ja va  2  s  .co m
}

From source file:de.vanita5.twittnuker.fragment.support.CursorStatusesFragment.java

@Override
protected long[] getAccountIds() {
    final Bundle args = getArguments();
    if (args != null && args.getLong(EXTRA_ACCOUNT_ID) > 0) {
        return new long[] { args.getLong(EXTRA_ACCOUNT_ID) };
    }//from ww  w. ja v  a2 s.  c  om
    return Utils.getActivatedAccountIds(getActivity());
}