Skip to content

Instantly share code, notes, and snippets.

@gcherubini
Created October 7, 2017 19:29
Show Gist options
  • Save gcherubini/c466ca2a66a74b403bd3ac6feee4a6e5 to your computer and use it in GitHub Desktop.
Save gcherubini/c466ca2a66a74b403bd3ac6feee4a6e5 to your computer and use it in GitHub Desktop.
Simplifying Android activities with Kotlin - Home Activity Layou
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
android:layout_margin="40dp">
<EditText
android:id="@+id/edit_text_user_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="What is your name?"
android:gravity="center"/>
<Button
android:id="@+id/btn_send"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:text="SEND"
android:textStyle="bold"
android:background="@android:color/transparent"/>
</LinearLayout>
</layout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment