Added simple start button

This commit is contained in:
Jim Martens 2019-07-15 21:53:35 +02:00
parent 5af6f00120
commit b1cfdaa556
3 changed files with 18 additions and 0 deletions

View File

@ -1,7 +1,9 @@
package com.example.myfirstapp
import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
class MainActivity : AppCompatActivity() {
@ -9,4 +11,9 @@ class MainActivity : AppCompatActivity() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
}
fun startSession(view: View) {
val intent = Intent(this, MessageListActivity::class.java)
startActivity(intent)
}
}

View File

@ -6,4 +6,14 @@
android:layout_height="match_parent"
tools:context=".MainActivity">
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="startSession"
android:text="@string/button_start_session"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -2,6 +2,7 @@
<string name="app_name">My First App</string>
<string name="edit_message">Enter a message</string>
<string name="button_send">Send</string>
<string name="button_start_session">Start Troubleshooting</string>
<string name="greeting">Welcome to the Interactive Troubleshooting. Please specify the component you have problems with.</string>
<string name="select_problem">Please specify your problem.</string>
<string name="okay">Okay</string>