diff --git a/app/src/main/java/com/hcy/tomeetu/MainActivity.java b/app/src/main/java/com/hcy/tomeetu/MainActivity.java deleted file mode 100644 index cf7f250..0000000 --- a/app/src/main/java/com/hcy/tomeetu/MainActivity.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.hcy.tomeetu; - -import android.support.v7.app.AppCompatActivity; -import android.os.Bundle; - -public class MainActivity extends AppCompatActivity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - } -} diff --git a/app/src/main/java/com/hcy/tomeetu/MainActivity.kt b/app/src/main/java/com/hcy/tomeetu/MainActivity.kt new file mode 100644 index 0000000..bf813e7 --- /dev/null +++ b/app/src/main/java/com/hcy/tomeetu/MainActivity.kt @@ -0,0 +1,19 @@ +package com.hcy.tomeetu + +import android.content.Intent +import android.support.v7.app.AppCompatActivity +import android.os.Bundle +import kotlinx.android.synthetic.main.activity_main.* + +class MainActivity : AppCompatActivity() { + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + bt_main_totest.setOnClickListener { + val intent = Intent(this@MainActivity, TestActivity::class.java) + startActivity(intent) + } + + } +} diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 57d7206..1fee4ac 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,18 +1,16 @@ - - + android:text="跳转" + /> - +