My mistake.
setContentView(R.layout.activity_scrolling);
----- This only sets a layout to the current activity even though it is meant for ScrollingActivity. This line loads the activity to Mainactivity. (Android doesn't seem to have 1 to 1 exclusive binding between layouts and activities. Do they?!)
You need to start the activity in order to use it and debug it.
So, add this below,
Intent myIntent = new Intent(MainActivity.this, ScrollingActivity.class);
myIntent.putExtra("key", "value"); //Optional parameters
MainActivity.this.startActivity(myIntent);
This enables the second activity loaded and debugger navigates to breakpoints inside the second activity.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…