Android Open Source - android-data-persistence Meme






From Project

Back to project page android-data-persistence.

License

The source code is released under:

MIT License

If you think the Android project android-data-persistence 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 com.teamtreehouse.mememaker.models;
/* ww w. j a  va 2s.co m*/
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.util.Log;

import java.io.File;
import java.io.Serializable;
import java.util.ArrayList;

/**
 * Created by Evan Anger on 8/17/14.
 */
public class Meme implements Serializable {
    private int mId;
    private String mAssetLocation;
    private ArrayList<MemeAnnotation> mAnnotations;
    private String mName;

    public Meme(int id, String assetLocation, String name, ArrayList<MemeAnnotation> annotations) {
        mId = id;
        mAssetLocation = assetLocation;
        mAnnotations = annotations;
        mName = name;
    }

    public int getId() { return mId; }
    public String getAssetLocation() {
        return mAssetLocation;
    }

    public void setAssetLocation(String assetLocation) {
        mAssetLocation = assetLocation;
    }

    public ArrayList<MemeAnnotation> getAnnotations() {
        return mAnnotations;
    }

    public void setAnnotations(ArrayList<MemeAnnotation> annotations) {
        mAnnotations = annotations;
    }

    public String getName() {
        return mName;
    }

    public void setName(String name) { mName = name; }

    public Bitmap getBitmap() {
        File file = new File(mAssetLocation);
        if(!file.exists()) {
            Log.e("FILE IS MISSING", mAssetLocation);
        }
        return BitmapFactory.decodeFile(mAssetLocation);
    }
}




Java Source Code List

com.teamtreehouse.mememaker.MemeMakerApplicationSettings.java
com.teamtreehouse.mememaker.MemeMakerApplication.java
com.teamtreehouse.mememaker.adapters.GridViewAdapter.java
com.teamtreehouse.mememaker.adapters.MemeItemListAdapter.java
com.teamtreehouse.mememaker.adapters.SectionsPagerAdapter.java
com.teamtreehouse.mememaker.database.MemeDatasource.java
com.teamtreehouse.mememaker.database.MemeSQLiteHelper.java
com.teamtreehouse.mememaker.models.ImageGridItem.java
com.teamtreehouse.mememaker.models.ImageItem.java
com.teamtreehouse.mememaker.models.MemeAnnotation.java
com.teamtreehouse.mememaker.models.Meme.java
com.teamtreehouse.mememaker.ui.activities.CreateMemeActivity.java
com.teamtreehouse.mememaker.ui.activities.MainActivity.java
com.teamtreehouse.mememaker.ui.activities.MemeSettingsActivity.java
com.teamtreehouse.mememaker.ui.fragments.ImageGridFragment.java
com.teamtreehouse.mememaker.ui.fragments.MemeItemFragment.java
com.teamtreehouse.mememaker.ui.fragments.MemeSettingsFragment.java
com.teamtreehouse.mememaker.ui.views.MemeImageView.java
com.teamtreehouse.mememaker.utils.FileUtilities.java
com.teamtreehouse.mememaker.utils.ImageResizer.java
com.teamtreehouse.mememaker.utils.StorageType.java