Created
September 5, 2017 09:39
-
-
Save dharmakshetri/462a4b552cd8e95f321b9775e193fcad to your computer and use it in GitHub Desktop.
layout for alert dialog box in kotlin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context="co.prandroid.alrertdialog_kotling.MainActivity"> | |
<Button | |
android:id="@+id/buttonAlert" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="Alert" | |
android:onClick="displayAlert" | |
app:layout_constraintBottom_toBottomOf="parent" | |
app:layout_constraintLeft_toLeftOf="parent" | |
app:layout_constraintRight_toRightOf="parent" | |
app:layout_constraintTop_toTopOf="parent" /> | |
<EditText | |
android:id="@+id/editTextName" | |
android:layout_width="wrap_content" | |
android:layout_height="45dp" | |
android:ems="10" | |
android:inputType="textPersonName" | |
android:hint="Name" | |
app:layout_constraintLeft_toLeftOf="parent" | |
app:layout_constraintRight_toRightOf="parent" | |
app:layout_constraintHorizontal_bias="0.503" | |
app:layout_constraintStart_toStartOf="parent" | |
android:layout_marginStart="8dp" | |
app:layout_constraintEnd_toEndOf="parent" | |
android:layout_marginEnd="8dp" | |
app:layout_constraintTop_toTopOf="parent" | |
android:layout_marginTop="140dp" /> | |
<TextView | |
android:id="@+id/textViewOutput" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_marginEnd="8dp" | |
android:layout_marginStart="8dp" | |
android:layout_marginTop="72dp" | |
android:text="Output" | |
app:layout_constraintEnd_toEndOf="parent" | |
app:layout_constraintLeft_toLeftOf="parent" | |
app:layout_constraintRight_toRightOf="parent" | |
app:layout_constraintStart_toStartOf="parent" | |
app:layout_constraintTop_toBottomOf="@+id/buttonAlert" /> | |
</android.support.constraint.ConstraintLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment