parent
a106e6f1e5
commit
c33b1fa277
@ -0,0 +1,47 @@
|
|||||||
|
package com.example.musicwork;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.Button;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import com.example.musicwork.chuangguan.ChooseLevel;
|
||||||
|
import com.example.musicwork.chuangguan.Teach;
|
||||||
|
import com.example.musicwork.freeModel.InitActivity;
|
||||||
|
|
||||||
|
public class MainActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_main);
|
||||||
|
Intent intent1 = getIntent();
|
||||||
|
final String username = intent1.getStringExtra("username");
|
||||||
|
Button button_toFree = (Button) findViewById(R.id.button_toFree);
|
||||||
|
button_toFree.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Intent intent = new Intent(MainActivity.this, InitActivity.class);//进入自由模式
|
||||||
|
//启动
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
Button button_toChooseLevel = (Button) findViewById(R.id.button_toChooseLevel);
|
||||||
|
button_toChooseLevel.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Intent intent = new Intent(MainActivity.this, ChooseLevel.class);
|
||||||
|
//启动
|
||||||
|
startActivity(intent);
|
||||||
|
Log.i("TAG", "choose_level_button onClick");
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in new issue