Android Open Source - Keep-score Player






From Project

Back to project page Keep-score.

License

The source code is released under:

MIT License

If you think the Android project Keep-score 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 gr.sv1jsb.kratascore.persistance;
// w  w  w  . ja  va2s . c  o  m
import android.database.Cursor;
import android.os.Parcel;
import android.os.Parcelable;


/**
 * Created by andreas on 11/8/2014.
 */
public class Player implements Parcelable{
    public long _id;
    public String player;
    public String photo;
    public String fb_id;

    private static int _ID = 0;
    private static int PLAYER = KrataScoreContract.PlayerEntry.NUM_PLAYER;
    private static int PHOTO = KrataScoreContract.PlayerEntry.NUM_PHOTO;
    private static int FB_ID = KrataScoreContract.PlayerEntry.NUM_FB_ID;

    public Player(long id, String player, String photo, String fb_id){
        this._id = id;
        this.player = player;
        this.photo = photo;
        this.fb_id = fb_id;
    }

    public static Player newInstanceFromCursor(Cursor c){
        return new Player(c.getLong(_ID), c.getString(PLAYER), c.getString(PHOTO), c.getString(FB_ID));
    }

    public Player(){}

    public String toString(){
        return "_id: " + String.valueOf(_id) + " player: " + player + " photo: " + photo + " fb_id: " + fb_id;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeLong(_id);
        parcel.writeString(player);
        parcel.writeString(photo);
        parcel.writeString(fb_id);
    }

    public static final Parcelable.Creator<Player> CREATOR = new Parcelable.Creator<Player>() {
        public Player createFromParcel(Parcel in) {
            return new Player(in);
        }

        public Player[] newArray(int size) {
            return new Player[size];
        }
    };
    private Player(Parcel in) {
        _id = in.readLong();
        player = in.readString();
        photo = in.readString();
        fb_id = in.readString();
    }
}




Java Source Code List

gr.sv1jsb.cropimage.ApplicationTest.java
gr.sv1jsb.cropimage.BitmapManager.java
gr.sv1jsb.cropimage.CropImageView.java
gr.sv1jsb.cropimage.CropImage.java
gr.sv1jsb.cropimage.HighlightView.java
gr.sv1jsb.cropimage.ImageViewTouchBase.java
gr.sv1jsb.cropimage.MonitoredActivity.java
gr.sv1jsb.cropimage.RotateBitmap.java
gr.sv1jsb.cropimage.Util.java
gr.sv1jsb.kratascore.AboutFragment.java
gr.sv1jsb.kratascore.AddScoreDialog.java
gr.sv1jsb.kratascore.ApplicationTest.java
gr.sv1jsb.kratascore.Constants.java
gr.sv1jsb.kratascore.DateFragment.java
gr.sv1jsb.kratascore.DeleteConfirmDialog.java
gr.sv1jsb.kratascore.EndConfirmDialog.java
gr.sv1jsb.kratascore.GameFragment.java
gr.sv1jsb.kratascore.GameListFragment.java
gr.sv1jsb.kratascore.GenericAlertDialog.java
gr.sv1jsb.kratascore.HelpFragment.java
gr.sv1jsb.kratascore.KrataScoreActivity.java
gr.sv1jsb.kratascore.NewGameActivity.java
gr.sv1jsb.kratascore.PhotoPickDialog.java
gr.sv1jsb.kratascore.PlayerActivity.java
gr.sv1jsb.kratascore.PlayerListActivity.java
gr.sv1jsb.kratascore.SearchActivity.java
gr.sv1jsb.kratascore.SortDialog.java
gr.sv1jsb.kratascore.adapters.BaseCursorAdapter.java
gr.sv1jsb.kratascore.adapters.GameAdapter.java
gr.sv1jsb.kratascore.adapters.GameListAdapter.java
gr.sv1jsb.kratascore.adapters.PlayerListAdapter.java
gr.sv1jsb.kratascore.persistance.KrataScoreContract.java
gr.sv1jsb.kratascore.persistance.KrataScoreDB.java
gr.sv1jsb.kratascore.persistance.Player.java
gr.sv1jsb.kratascore.provider.KrataScoreProvider.java
gr.sv1jsb.utils.ImageCache.java
gr.sv1jsb.utils.ImageUtils.java
gr.sv1jsb.utils.RandomStringUtils.java