Android Studio Layout Linear Vertical Example

Here is an example of android studio simple layout (Linear)

Design View


Text View

<?xml version="1.0" encoding="utf-8"?><LinearLayout 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="one.com.example.onesi.onesinus.MainActivity"    android:orientation="vertical">

    <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="@string/title_linear" 
       android:textSize="25sp" 
       android:layout_marginLeft="50dp"        />
    
    <EditText 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:text="TextBox"/>

    <EditText 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:text="TextBox"/>

    <EditText 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:text="TextBox"/>

    <Button 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:text="@string/str_btn"/>

    <Button 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:text="@string/str_btn"/>

    <Button 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:text="@string/str_btn"/>

</LinearLayout>

Tidak ada komentar