Skip to content

Commit

Permalink
2017年8月16日00:07:40
Browse files Browse the repository at this point in the history
  • Loading branch information
赵东阳 committed Aug 15, 2017
1 parent dcf2d72 commit 1fb44e2
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 22 deletions.
13 changes: 0 additions & 13 deletions app/src/main/java/com/hcy/tomeetu/MainActivity.java

This file was deleted.

19 changes: 19 additions & 0 deletions app/src/main/java/com/hcy/tomeetu/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -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)
}

}
}
16 changes: 7 additions & 9 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:gravity="center"
android:layout_height="match_parent"
tools:context="com.hcy.tomeetu.MainActivity">

<TextView
<Button
android:id="@+id/bt_main_totest"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
android:text="跳转"
/>

</android.support.constraint.ConstraintLayout>
</LinearLayout>

0 comments on commit 1fb44e2

Please sign in to comment.