Created
November 24, 2021 10:32
-
-
Save mustafayigitt/3ac3da76ce548621842697284f11e5c0 to your computer and use it in GitHub Desktop.
ui with xml
This file contains 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"?> | |
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:gravity="center" | |
android:orientation="vertical"> | |
<TextView | |
android:id="@+id/txtHeader" | |
style="@style/TextAppearance.MaterialComponents.Headline2" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_marginBottom="20dp" | |
android:paddingHorizontal="20dp" | |
android:text="Hello Compose" | |
android:textAlignment="center" /> | |
<ImageView | |
android:id="@+id/imgSelectedAnimal" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:contentDescription="selected animal image" | |
android:paddingHorizontal="20dp" | |
android:scaleType="centerCrop" | |
android:layout_marginBottom="20dp" | |
android:src="@drawable/ic_launcher_foreground" /> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_marginBottom="20dp" | |
android:layout_height="wrap_content" | |
android:gravity="center" | |
android:orientation="horizontal"> | |
<RadioButton | |
android:id="@+id/radioButtonDog" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" /> | |
<Space | |
android:layout_width="100dp" | |
android:layout_height="wrap_content" /> | |
<RadioButton | |
android:id="@+id/radioButtonCat" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" /> | |
</LinearLayout> | |
<Button | |
android:id="@+id/btnScrollToTop" | |
android:layout_width="wrap_content" | |
android:backgroundTint="@color/black" | |
android:textColor="@color/white" | |
android:text="Scroll to Top" | |
android:textAllCaps="false" | |
android:layout_height="wrap_content"/> | |
</LinearLayout> | |
</ScrollView> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment