我有一个启动 PuzzleActivity 的 MainActivity,在 PuzzleActivity 中途我想去 SizeSelection 活动(它有另一个布局),当单击布局中的一个按钮并且该过程在我想要恢复的活动中完成时结束的拼图活动(它转到 SizeSelection.
尺码选择:
public static short getGridSize(Context content) {
if ( mIbtn3x3 == view) {
short gridSize = 3;
return gridSize;
}else if (mIbtn4x4 == view ) {
short gridSize = 4;
return gridSize;
}else if (mIbtn5x5 == view ) {
short gridSize = 5;
return gridSize ;
}
return gridSize;
}
拼图活动:
Intent i5 = new Intent(this, SizeSelection.class);
startActivity(i5);
createGameBoard(SizeSelection.getGridSize(this));
break;