how can i show string one activity to another activity on a 9*9 sudoku grid? [duplicate]
i want to show string one activity to another activity another activity is the sudoku game class and want to show the string like a sudoku puzzle on the sudoku screen board on the sudoku game class.sudoku grid is 9*9.
In the parent Activity I would create an Intent to the Child activity. Then use putExtra to send data. Then use getExtra or any variation on that to get the String. I have used getStringExtra in this example.
Intent childActivity = new Intent(this, Child.class);
childActivity.putExtra("parent_parameter", "This String is for child");
startActivity(childActivity);
In the Child.java Activity.
Intent childIntent = getIntent();
String fromParent = childIntent.data.getStringExtra("parent_parameter");
精彩评论