Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

method object class in android

package com.journaldev.viewpager;

public enum ModelObject {

    RED(R.string.red, R.layout.view_red),
    BLUE(R.string.blue, R.layout.view_blue),
    GREEN(R.string.green, R.layout.view_green);

    private int mTitleResId;
    private int mLayoutResId;

    ModelObject(int titleResId, int layoutResId) {
        mTitleResId = titleResId;
        mLayoutResId = layoutResId;
    }

    public int getTitleResId() {
        return mTitleResId;
    }

    public int getLayoutResId() {
        return mLayoutResId;
    }

}
Source by www.journaldev.com #
 
PREVIOUS NEXT
Tagged: #method #object #class #android
ADD COMMENT
Topic
Name
2+4 =