Skip to content

Instantly share code, notes, and snippets.

@manijshrestha

manijshrestha/activity_main.xml Secret

Created Oct 14, 2018
Embed
What would you like to do?
Kotlin Multiplatform Main Activity layout
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<Button android:id="@+id/red_button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/red_button"
android:layout_margin="16dp"
android:textColor="#FF0000"
android:onClick="onButtonClick"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<Button android:id="@+id/green_button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/green_button"
android:layout_margin="16dp"
android:textColor="#00FF00"
android:onClick="onButtonClick"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/red_button"/>
<Button android:id="@+id/blue_button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/blue_button"
android:layout_margin="16dp"
android:textColor="#0000FF"
android:onClick="onButtonClick"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/green_button"/>
</android.support.constraint.ConstraintLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.