Back to project page pinpoint-android.
The source code is released under:
MIT License
If you think the Android project pinpoint-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package co.islovely.pinpoint; /*from w ww .j a va 2 s . c om*/ public class GridActivity extends PinpointActivity { @Override protected int getLayoutId() { return R.layout.grid; } @Override protected int[] getButtonIds() { return new int[]{ R.id.columnOne_rowOne, R.id.columnOne_rowTwo, R.id.columnOne_rowThree, R.id.columnOne_rowFour, R.id.columnTwo_rowOne, R.id.columnTwo_rowTwo, R.id.columnTwo_rowThree, R.id.columnTwo_rowFour, R.id.columnThree_rowOne, R.id.columnThree_rowTwo, R.id.columnThree_rowThree, R.id.columnThree_rowFour, R.id.columnFour_rowOne, R.id.columnFour_rowTwo, R.id.columnFour_rowThree, R.id.columnFour_rowFour }; } @Override protected boolean isClickCorrect(int id) { LauncherItem launcherItem = this.getLauncherItem(); int cellX = launcherItem.getCellX(), cellY = launcherItem.getCellY(); boolean isColumnOne = cellX == 0, isColumnTwo = cellX == 1, isColumnThree = cellX == 2, isColumnFour = cellX == 3, isRowOne = cellY == 0, isRowTwo = cellY == 1, isRowThree = cellY == 2, isRowFour = cellY == 3; switch (id) { case R.id.columnOne_rowOne: return isColumnOne && isRowOne; case R.id.columnTwo_rowOne: return isColumnTwo && isRowOne; case R.id.columnThree_rowOne: return isColumnThree && isRowOne; case R.id.columnFour_rowOne: return isColumnFour && isRowOne; case R.id.columnOne_rowTwo: return isColumnOne && isRowTwo; case R.id.columnTwo_rowTwo: return isColumnTwo && isRowTwo; case R.id.columnThree_rowTwo: return isColumnThree && isRowTwo; case R.id.columnFour_rowTwo: return isColumnFour && isRowTwo; case R.id.columnOne_rowThree: return isColumnOne && isRowThree; case R.id.columnTwo_rowThree: return isColumnTwo && isRowThree; case R.id.columnThree_rowThree: return isColumnThree && isRowThree; case R.id.columnFour_rowThree: return isColumnFour && isRowThree; case R.id.columnOne_rowFour: return isColumnOne && isRowFour; case R.id.columnTwo_rowFour: return isColumnTwo && isRowFour; case R.id.columnThree_rowFour: return isColumnThree && isRowFour; case R.id.columnFour_rowFour: return isColumnFour && isRowFour; } return false; } }