diff --git a/app/build.gradle.kts b/app/build.gradle.kts index d5445dde56932ba52cd5c7d5d39a09e793a45d38..85a2ee80819ea7ab7a4599fb6951a97fb45d62df 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -55,6 +55,7 @@ dependencies { implementation("androidx.constraintlayout:constraintlayout:2.1.4") implementation("com.google.devtools.ksp:symbol-processing-api:1.9.22-1.0.17") implementation("androidx.compose.runtime:runtime:1.6.3") + implementation("androidx.cardview:cardview:1.0.0") val nav_version = "2.7.7" diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index c6d8d4b6399ca14fb33adaf8fe0cd4cf48e3ca40..7d83ca2900521298c20fae6cc9b2e3bbab9d6784 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -12,11 +12,15 @@ android:supportsRtl="true" android:theme="@style/Theme.BondoMan" tools:targetApi="31"> + <activity + android:name=".activities.LoginActivity" + android:exported="false" /> <activity android:name=".activities.MainActivity" android:exported="true"> <intent-filter> <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> diff --git a/app/src/main/java/com/example/bondoman/activities/LoginActivity.kt b/app/src/main/java/com/example/bondoman/activities/LoginActivity.kt new file mode 100644 index 0000000000000000000000000000000000000000..7bb4f3565217fde56665ed37ba48625fca3ed1bd --- /dev/null +++ b/app/src/main/java/com/example/bondoman/activities/LoginActivity.kt @@ -0,0 +1,12 @@ +package com.example.bondoman.activities + +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import com.example.bondoman.R + +class LoginActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_login) + } +} \ No newline at end of file diff --git a/app/src/main/res/drawable/bondoman.png b/app/src/main/res/drawable/bondoman.png new file mode 100644 index 0000000000000000000000000000000000000000..7608d0ddfaae42043902f988bdca905ef605340b Binary files /dev/null and b/app/src/main/res/drawable/bondoman.png differ diff --git a/app/src/main/res/drawable/input_bg.xml b/app/src/main/res/drawable/input_bg.xml new file mode 100644 index 0000000000000000000000000000000000000000..e44cf9fc8d7a6ba45656e4e892e74dfc89dacae5 --- /dev/null +++ b/app/src/main/res/drawable/input_bg.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <stroke android:color="@color/gray" android:width="1dp"/> + <corners android:radius="70dp" /> +</shape> \ No newline at end of file diff --git a/app/src/main/res/drawable/rounded_button.xml b/app/src/main/res/drawable/rounded_button.xml new file mode 100644 index 0000000000000000000000000000000000000000..f5d4f5c03073760e4f6015daa99f69bcddd45d83 --- /dev/null +++ b/app/src/main/res/drawable/rounded_button.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <corners android:radius="10dp"/> + <solid android:color="@color/green"/> +</shape> \ No newline at end of file diff --git a/app/src/main/res/font/montserrat_500.ttf b/app/src/main/res/font/montserrat_500.ttf new file mode 100644 index 0000000000000000000000000000000000000000..4012225c0b220d0e1d67001daa7e01bba3df6953 Binary files /dev/null and b/app/src/main/res/font/montserrat_500.ttf differ diff --git a/app/src/main/res/font/montserrat_600.ttf b/app/src/main/res/font/montserrat_600.ttf new file mode 100644 index 0000000000000000000000000000000000000000..189ce9d0c60c76251cf57657cee1e3e068feaaab Binary files /dev/null and b/app/src/main/res/font/montserrat_600.ttf differ diff --git a/app/src/main/res/font/montserrat_700.ttf b/app/src/main/res/font/montserrat_700.ttf new file mode 100644 index 0000000000000000000000000000000000000000..0927b8133cfc1ed1c326677f8f1275fae4529606 Binary files /dev/null and b/app/src/main/res/font/montserrat_700.ttf differ diff --git a/app/src/main/res/layout/activity_login.xml b/app/src/main/res/layout/activity_login.xml new file mode 100644 index 0000000000000000000000000000000000000000..b37ec55f99f03e321bb782c8d4299f12b8576be2 --- /dev/null +++ b/app/src/main/res/layout/activity_login.xml @@ -0,0 +1,124 @@ +<?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=".activities.LoginActivity" + > + + <ImageView + android:id="@+id/imageView" + android:layout_width="266dp" + android:layout_height="94dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.496" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.262" + app:srcCompat="@drawable/bondoman" + /> + + <com.google.android.material.card.MaterialCardView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginHorizontal="40dp" + android:layout_marginEnd="8dp" + app:cardCornerRadius="30dp" + app:cardElevation="4dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toBottomOf="@+id/imageView" + app:layout_constraintVertical_bias="0.1" + app:strokeColor="@color/gray" + app:strokeWidth="1dp" + > + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginHorizontal="20dp" + android:layout_marginVertical="30dp" + android:orientation="vertical" + > + + <TextView + android:id="@+id/textView" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:fontFamily="@font/montserrat_600" + android:text="Masuk" + android:textAlignment="center" + android:textColor="@color/black" + android:textColorHint="@color/black" + android:textSize="24sp" + android:textStyle="bold" /> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:layout_marginTop="12dp" + > + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="10dp" + android:fontFamily="@font/montserrat_500" + android:text="Email" + android:textColor="@color/black" + android:textSize="14sp" /> + <EditText + android:layout_width="match_parent" + android:layout_height="40dp" + android:background="@drawable/input_bg" + android:layout_marginTop="10dp" + /> + </LinearLayout> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + > + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="10dp" + android:fontFamily="@font/montserrat_500" + android:text="Password" + android:textColor="@color/black" + android:textSize="14sp" /> + <EditText + android:layout_width="match_parent" + android:layout_height="40dp" + android:background="@drawable/input_bg" + android:layout_marginTop="10dp" + /> + </LinearLayout> + + <Button + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:fontFamily="@font/montserrat_700" + android:background="@drawable/rounded_button" + android:text="Masuk" + android:layout_marginTop="20dp" + android:layout_gravity="center_horizontal" + android:textColor="@color/white" + android:paddingHorizontal="15dp" + /> + </LinearLayout> + + <com.google.android.material.textfield.TextInputLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + </com.google.android.material.textfield.TextInputLayout> + + + </com.google.android.material.card.MaterialCardView> + +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/app/src/main/res/values-land/dimens.xml b/app/src/main/res/values-land/dimens.xml new file mode 100644 index 0000000000000000000000000000000000000000..5f681ae11694396c167bee5b520246962495c34d --- /dev/null +++ b/app/src/main/res/values-land/dimens.xml @@ -0,0 +1,3 @@ +<resources> + <dimen name="activity_horizontal_margin">48dp</dimen> +</resources> \ No newline at end of file diff --git a/app/src/main/res/values-w1240dp/dimens.xml b/app/src/main/res/values-w1240dp/dimens.xml new file mode 100644 index 0000000000000000000000000000000000000000..7e065116699dfedbfa503eb28fe432bf1447dd73 --- /dev/null +++ b/app/src/main/res/values-w1240dp/dimens.xml @@ -0,0 +1,3 @@ +<resources> + <dimen name="activity_horizontal_margin">200dp</dimen> +</resources> \ No newline at end of file diff --git a/app/src/main/res/values-w600dp/dimens.xml b/app/src/main/res/values-w600dp/dimens.xml new file mode 100644 index 0000000000000000000000000000000000000000..5f681ae11694396c167bee5b520246962495c34d --- /dev/null +++ b/app/src/main/res/values-w600dp/dimens.xml @@ -0,0 +1,3 @@ +<resources> + <dimen name="activity_horizontal_margin">48dp</dimen> +</resources> \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index e02acb74208aa465f189b171b611b5f0525390e9..03a2e2838115a1a2fd08d4a36fc55c9c8f5187bd 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -13,8 +13,8 @@ <color name="teal_700">#FF018786</color> <color name="black">#FF000000</color> <color name="white">#FFFFFFFF</color> + <color name="gray">#D9D9D9</color> <color name="brown_1">#F1E4C3</color> <color name="brown_2">#C6A969</color> <color name="green">#597E52</color> - </resources> \ No newline at end of file diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml new file mode 100644 index 0000000000000000000000000000000000000000..e00c2dd143c595389b3cf8a32d9dc6aff48ec367 --- /dev/null +++ b/app/src/main/res/values/dimens.xml @@ -0,0 +1,5 @@ +<resources> + <!-- Default screen margins, per the Android Design guidelines. --> + <dimen name="activity_horizontal_margin">16dp</dimen> + <dimen name="activity_vertical_margin">16dp</dimen> +</resources> \ No newline at end of file