Android Open Source - RoboBinding-album-sample Create Edit Album Activity

From Project

Back to project page RoboBinding-album-sample.


The source code is released under:

Apache License

If you think the Android project RoboBinding-album-sample listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.robobinding.albumsample.activity;
/*from   w w  w  . j a  v a 2  s .  com*/
import org.robobinding.albumsample.R;
import org.robobinding.albumsample.model.Album;
import org.robobinding.albumsample.presentationmodel.CreateEditAlbumPresentationModel;
import org.robobinding.albumsample.presentationmodel.CreateEditAlbumView;

import android.os.Bundle;

 * @author Cheng Wei
 * @author Robert Taylor
 * @since 1.0
public class CreateEditAlbumActivity extends AbstractActivity implements CreateEditAlbumView {

    public static final String ALBUM_ID = ViewAlbumActivity.ALBUM_ID;

    public void onCreate(Bundle savedInstanceState) {

        long albumId = getIntent().getLongExtra(ALBUM_ID, Album.NO_ID);

        Album.Builder albumBuilder;
        if (Album.isNew(albumId))
            albumBuilder = new Album.Builder();
        else {
            Album album = getAlbumStore().get(albumId);
            albumBuilder = album.createBuilder();

        CreateEditAlbumPresentationModel presentationModel = new CreateEditAlbumPresentationModel(this, getAlbumStore(), albumBuilder);
        initializeContentView(R.layout.activity_create_edit_album, presentationModel);

    public void finishActivity() {

    public String getCreateAlbumTitle() {
        return getString(R.string.create_album);

Java Source Code List