I have the following int:
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
setContentView(R.layout.activity_score);
// Show the Up button in the action bar.
setupActionBar();
Intent i = getIntent();
String max = i.getStringExtra(MainActivity.EXTRA_MAX);
final int maxInt = Integer.parseInt(max);
And i want to access it from here:
public void plus1 (View V)
{
maxInt ++;
}
But i get an error, even when not using final, When the int is inside the class:
public class ScoreActivity extends Activity {
I get a crash.