Skip to content

Instantly share code, notes, and snippets.

@shivam-gupta007
Created March 7, 2022 16:47
Show Gist options
  • Save shivam-gupta007/9fe93878aa454467a6e9e87f09d40486 to your computer and use it in GitHub Desktop.
Save shivam-gupta007/9fe93878aa454467a6e9e87f09d40486 to your computer and use it in GitHub Desktop.
Create an app that find Automorphic, Armstrong, Disarium Number
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.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"
android:padding="15dp"
tools:context=".AutomorphicNo">
<EditText
android:id="@+id/inputNumber"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<Button
android:id="@+id/submit_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:text="Submit"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/inputNumber" />
<TextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="24sp"
android:text="Result: "
android:layout_marginTop="15dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/submit_button" />
</androidx.constraintlayout.widget.ConstraintLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment