You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.6 KiB
48 lines
1.6 KiB
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");
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|