页面跳转问题
点击静态加载时,模拟器没有反应,我在switch里面打印Log也没反应,Log打印不出来,为什么???
点击静态加载时,模拟器没有反应,我在switch里面打印Log也没反应,Log打印不出来,为什么???
2016-08-18
package com.example.myapplication;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.RadioGroup;
public class MainActivity extends AppCompatActivity implements RadioGroup.OnCheckedChangeListener{
private RadioGroup radioGroup;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
radioGroup= (RadioGroup) findViewById(R.id.radio);
}
@Override
public void onCheckedChanged(RadioGroup radioGroup, int i) {
switch (i){
case R.id.first:{
Intent intent =new Intent(MainActivity.this,Main2Activity.class);
startActivity(intent);
break;
}
case R.id.second:{
break;
}
case R.id.third:{
break;
}
case R.id.fouth:{
break;
}
}
}
}
举报