Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- tools:context=".MainActivity"
- android:orientation="vertical"
- android:padding="15dp"
- android:gravity="center_horizontal">
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Thread Demo"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- android:textSize="20dp"
- android:textColor="@color/purple_500"/>
- <Button
- android:id="@+id/btnStartThread"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Start"
- android:onClick="startThread"/>
- <Button
- android:id="@+id/btnStopThread"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Stop"
- android:onClick="stopThread"/>
- </LinearLayout>
Advertisement
Add Comment
Please, Sign In to add comment