If you think the Android project HydraListAndroid 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.fada21.android.hydralist.sample;
//fromwww.java2s.compublicenum SampleContents {
HYDRALISK("Hydralisk", R.drawable.hydralisk, R.dimen.item_default_height, R.string.hydralisk_details),
MARINE("Marine", R.drawable.marine, R.dimen.item_default_height, R.string.marine_details),
ZEALOT("Zealot", R.drawable.zealot, R.dimen.item_default_height, R.string.zealot_details);
privatefinal String name;
privatefinalint iconResId;
privatefinalint defHeightResId;
privatefinalint textResId;
private SampleContents(String name, int iconResId, int defHeightResId, int textResId) {
this.name = name;
this.iconResId = iconResId;
this.defHeightResId = defHeightResId;
this.textResId = textResId;
}
public String getName() {
return name;
}
publicint getIconResId() {
return iconResId;
}
publicint getDefHeightResId() {
return defHeightResId;
}
publicint getTextResId() {
return textResId;
}
/**
* Tells which should expand. Protoss protect their secrets and won't expand to easily.
* @return <code>true</code> for expandable
*/publicboolean isSampleExpandable() {
returnthis != ZEALOT;
}
/**
* Tells which should be dragable. Terrans ones sieged is not to be dragged easily.
* @return
*/publicboolean isDragable() {
returnthis != MARINE;
}
}