0% found this document useful (0 votes)
0 views7 pages

Source Code

The document contains XML layout files for an Android application, including screens for home, login, and settings. Each layout features various UI components such as TextViews, Buttons, and ImageViews, designed for user interaction with a smart lamp application. The layouts are structured with LinearLayouts and include styling attributes for visual presentation.

Uploaded by

miftakhonaza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views7 pages

Source Code

The document contains XML layout files for an Android application, including screens for home, login, and settings. Each layout features various UI components such as TextViews, Buttons, and ImageViews, designed for user interaction with a smart lamp application. The layouts are structured with LinearLayouts and include styling attributes for visual presentation.

Uploaded by

miftakhonaza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Home

<?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"
android:orientation="vertical"
android:padding="25dp"
tools:context=".RegisterActivity">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="10dp"
android:orientation="horizontal"
android:gravity="center">

<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/rupee"/>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="20dp"
android:text="Smart Lamp"
android:textColor="@color/hijau"
android:textSize="35sp"
android:textStyle="bold" />

</LinearLayout>

</LinearLayout>

<TextView
android:textColor="@color/black"
android:paddingTop="40dp"
android:layout_gravity="left"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="Selamat Datang"
android:textSize="25sp"/>
<TextView
android:textColor="@color/black"
android:paddingTop="5dp"
android:layout_gravity="left"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="20sp"
android:text="Dimas Santoso"
android:layout_marginBottom="20dp"/>

<ImageView
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_marginBottom="1dp"
android:scaleType="centerCrop"
android:src="@drawable/banner1" />

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:paddingTop="20dp"
android:layout_gravity="right"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Lampu Kamar"
android:textStyle="bold"
android:textColor="@color/black"
android:textSize="20sp"/>

</LinearLayout>

<Button
android:layout_gravity="center"
android:id="@+id/btnoff"
android:layout_marginTop="40dp"
android:layout_width="match_parent"
android:layout_height="45dp"
android:text="OFF"
android:textAllCaps="false"
android:textColor="@color/white"
android:layout_marginBottom="20dp"
android:background="@color/abutadikit" />

<Button
android:layout_gravity="center"
android:id="@+id/btnon"
android:layout_marginTop="0dp"
android:layout_width="match_parent"
android:layout_height="45dp"
android:text="ON"
android:textAllCaps="false"
android:textColor="@color/white"
android:layout_marginBottom="40dp"
android:background="@color/hijau" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottomNavigationView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:paddingBottom="5dp"
app:menu="@menu/bottom_navigation_menu" />
</LinearLayout>

</LinearLayout>

Button Navbar
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/nav_home"
android:title="Home"
android:icon="@drawable/ic_home" />
<item
android:id="@+id/nav_automasi"
android:title="Automasi"
android:icon="@drawable/ikon1" />
<item
android:id="@+id/nav_profil"
android:title="Akun"
android:icon="@drawable/user" />
</menu>

Login
<?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"
android:orientation="vertical"
android:padding="25dp"
tools:context=".LoginActivity">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="10dp"
android:orientation="horizontal"
android:gravity="center">

<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/rupee"/>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="20dp"
android:text="Smart Lamp"
android:textColor="@color/hijau"
android:textSize="35sp"
android:textStyle="bold" />

</LinearLayout>

</LinearLayout>

<TextView
android:textColor="@color/black"
android:paddingTop="40dp"
android:layout_gravity="left"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="Login"
android:textSize="25sp"/>
<TextView
android:textColor="@color/black"
android:paddingTop="10dp"
android:layout_gravity="left"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="14sp"
android:text="Selamat datang ,silahkan login"
android:layout_marginBottom="36dp"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:paddingTop="20dp"
android:layout_gravity="right"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Email"
android:textStyle="bold"
android:textColor="@color/black"
android:textSize="14sp"/>
<TextView
android:paddingTop="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="*"
android:textStyle="bold"
android:textColor="@color/red_warning"
android:paddingBottom="15dp"
android:textSize="14sp"/>
</LinearLayout>
<EditText
android:id="@+id/inEmail"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="50dp"
android:hint="masukkan alamat email"
android:paddingStart="10dp"
android:background="@drawable/bg_rounded_ed"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:paddingTop="15dp"
android:text="Password"
android:textColor="@color/black"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:paddingTop="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="*"
android:textStyle="bold"
android:textColor="@color/red_warning"
android:paddingBottom="10dp"
android:textSize="14sp"/>
</LinearLayout>
<EditText
android:id="@+id/inPassword"
android:paddingStart="10dp"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="50dp"
android:drawableEnd="@drawable/btn_mata"
android:paddingRight="10dp"
android:hint="masukkan password"
android:background="@drawable/bg_rounded_ed"/>

<Button
android:id="@+id/btnMove"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_gravity="center"
android:layout_marginTop="40dp"
android:layout_marginBottom="40dp"
android:background="@color/hijau"
android:text="Login"
android:textAllCaps="false"
android:textColor="@color/white" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Belum punya akun? "
android:textColor="@color/black"
android:textStyle="bold"
android:textSize="15sp"/>
<TextView
android:id="@+id/daftarLogin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Daftar"
android:textColor="@color/hijau"
android:textStyle="bold"
android:textSize="15sp"/>
</LinearLayout>

</LinearLayout>

Setting
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="20dp"
tools:context=".SettingsFragment">

<TextView
android:layout_marginTop="19dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
android:textStyle="bold"
android:textColor="@color/black"
android:text="Pengaturan"
android:layout_gravity="center" />
<de.hdodenhof.circleimageview.CircleImageView
android:layout_marginTop="20dp"
android:layout_gravity="center"
android:layout_width="150dp"
android:layout_height="150dp"
android:src="@drawable/rupee"/>
<TextView
android:id="@+id/textNama"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textStyle="bold"
android:textColor="@color/hijau"
android:text="Smart Lamp"/>

<Button
android:id="@+id/btnProfil"
android:layout_marginTop="50dp"
android:layout_width="match_parent"
android:layout_height="50dp"
android:text="Ubah Profil"
android:textAlignment="center"
android:textAllCaps="false"
android:textColor="@color/black"
android:layout_marginBottom="15dp"
android:background="@drawable/bg_rounded_btn_setting" />

<Button
android:id="@+id/btnHubungkanlampu"
android:layout_width="match_parent"
android:layout_height="50dp"
android:text="Hubungkan Lampu"
android:textAlignment="center"
android:textAllCaps="false"
android:textColor="@color/black"
android:layout_marginBottom="15dp"
android:background="@drawable/bg_rounded_btn_setting" />

<Button
android:id="@+id/btnOtomatisasi"
android:layout_width="match_parent"
android:layout_height="50dp"
android:text="Otomatisasi"
android:textAlignment="center"
android:textAllCaps="false"
android:textColor="@color/black"
android:layout_marginBottom="15dp"
android:background="@drawable/bg_rounded_btn_setting" />

<Button
android:id="@+id/btnTentang"
android:layout_width="match_parent"
android:layout_height="50dp"
android:text="Tentang Smart Lamp"
android:textAlignment="center"
android:textAllCaps="false"
android:textColor="@color/black"
android:layout_marginBottom="15dp"

android:background="@drawable/bg_rounded_btn_setting" />

<Button
android:id="@+id/btnKeluar"
android:layout_width="match_parent"
android:layout_height="50dp"
android:text="Keluar"
android:textAlignment="center"
android:textAllCaps="false"
android:textColor="@color/red_warning"
android:layout_marginBottom="15dp"
android:background="@drawable/bg_rounded_btn_setting" />

</LinearLayout>

You might also like