Skip to main content

latihan layout

   Tugas Android Studio 

Nama : Syaid Alfarishi

Kelas  : XI RPL 2

menngunakan :constraint layout 



<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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=".MainActivity">

<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:background="@android:color/holo_green_light"
android:text="APP SURAT E-ANDROID"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="28dp"
android:textStyle="bold" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="120dp"
android:text="Bukittinggi, 20,12 22"
android:textAlignment="textEnd"
android:textSize="20dp" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="150dp"
android:text="Dear My Son"
android:textSize="20dp" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="200dp"
android:textSize="12dp"
android:text="Salam hangat dari Ayahmu, Anakku Tersayang. Jauh engkau
merantau kenegeri orang, maka ingatlah tuah yang ayah berikan. Dimana lagit di
junjung distiu bumi dipijak. \n \n
Wahai anaku, Janganlah menjadi raja di negeri orang, tapi jadilah
lentera penerang hidup. \n \n
" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="320dp"
android:text="Dari Ayahmu"
android:textAlignment="textEnd"
android:textSize="18dp" />



</androidx.constraintlayout.widget.ConstraintLayout>

Comments

Popular posts from this blog

card View

 Tutorial membuat card view makanan hia disini saya akan mengajarkan mengenai card view beserta dengan scrollview , disini saya menyediakan codingan berserta hasil result nya CODINGAN :  <?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=".MainActivity"     android:background="@color/cardview_light_background">     <ScrollView         android:layout_width="match_parent"         android:layout_height="600dp"         android:layout_margin="10dp"         app:layout_constraintTop_toTopOf="parent">     <LinearLayout       ...

Kuis 1 (Image view)

 Nama : Syaid Alfarishi Kelas : XI RPL 2 Codingan :  <?xml version="1.0" encoding="utf-8"?> <RelativeLayout 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=".MainActivity">     //Penempatan komponen     <TextView         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_marginBottom="10dp"         android:background="@color/purple_500"         android:padding="20dp"         android:text="bahasa pemrogramman"         android:textAlignment="center"         android:textAllC...

Tugas 2 Get dan Set text

 Tugas 2 Get dan set text (xml) halaman main_activity.xml <? xml version ="1.0" encoding ="utf-8" ?> < androidx.constraintlayout.widget.ConstraintLayout 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 =".MainActivity" > < TextView android :id ="@+id/textView6" android :layout_width ="match_parent" android :layout_height ="wrap_content" android :background ="@color/purple_500" android :padding ="8dp" android :text ="DATA SISWA" android :textAlignment ="center" android :textColor ="@color/white" android :textSize =...