Commit f2f46621 authored by iman Fauzi's avatar iman Fauzi

make login

parent e1fb7923
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" /> <output url="file://$PROJECT_DIR$/build/classes" />
</component> </component>
<component name="ProjectType"> <component name="ProjectType">
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yono.messeripos"> package="com.yono.messeripos">
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET" />
<application <application
android:allowBackup="true" android:allowBackup="true"
...@@ -11,8 +11,13 @@ ...@@ -11,8 +11,13 @@
android:roundIcon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppTheme.appbar"> android:theme="@style/AppTheme.appbar">
<activity android:name=".PaymentActivity" android:theme="@style/AppTheme.appbar"></activity> <activity android:name=".LoginActivity"></activity>
<activity android:name=".CartActivity" android:theme="@style/AppTheme.appbar" /> <activity
android:name=".PaymentActivity"
android:theme="@style/AppTheme.appbar" />
<activity
android:name=".CartActivity"
android:theme="@style/AppTheme.appbar" />
<activity android:name=".SplashScreen"> <activity android:name=".SplashScreen">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
...@@ -20,9 +25,9 @@ ...@@ -20,9 +25,9 @@
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name=".MainActivity" android:theme="@style/AppTheme.appbar"> <activity
android:name=".MainActivity"
</activity> android:theme="@style/AppTheme.appbar"></activity>
<meta-data <meta-data
android:name="preloaded_fonts" android:name="preloaded_fonts"
......
package com.yono.messeripos;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class LoginActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login_m);
}
}
\ No newline at end of file
...@@ -18,11 +18,13 @@ public class SplashScreen extends AppCompatActivity { ...@@ -18,11 +18,13 @@ public class SplashScreen extends AppCompatActivity {
setContentView(R.layout.activity_splash); setContentView(R.layout.activity_splash);
img = findViewById(R.id.image_splash); img = findViewById(R.id.image_splash);
Animation animation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.zoom_in); // Animation animation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.zoom_in);
img.startAnimation(animation); // img.startAnimation(animation);
new Handler(Looper.getMainLooper()).postDelayed(()->{ new Handler(Looper.getMainLooper()).postDelayed(()->{
startActivity(new Intent(SplashScreen.this, MainActivity.class)); startActivity(new Intent(SplashScreen.this, LoginActivity.class));
finish(); finish();
}, 3000); }, 3000);
} }
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"> <set xmlns:android="http://schemas.android.com/apk/res/android">
<scale
xmlns:android="http://schemas.android.com/apk/res/android" <scale xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="1000" android:fromXScale="0.5"
android:fromXScale="2" android:toXScale="2.0"
android:fromYScale="2" android:fromYScale="0.5"
android:toYScale="2.0"
android:duration="3000"
android:pivotX="50%" android:pivotX="50%"
android:pivotY="50%" android:pivotY="50%" >
android:toXScale="4"
android:toYScale="4" >
</scale> </scale>
</set> </set>
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<corners android:bottomLeftRadius="50mm"/>
<gradient android:startColor="#1B76D6" android:endColor="#3028A1"/>
<size android:height="100sp"/>
</shape>
</item>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<font-family xmlns:app="http://schemas.android.com/apk/res-auto"
app:fontProviderAuthority="com.google.android.gms.fonts"
app:fontProviderPackage="com.google.android.gms"
app:fontProviderQuery="name=Poppins&amp;weight=700"
app:fontProviderCerts="@array/com_google_android_gms_fonts_certs">
</font-family>
<?xml version="1.0" encoding="utf-8"?>
<font-family xmlns:app="http://schemas.android.com/apk/res-auto"
app:fontProviderAuthority="com.google.android.gms.fonts"
app:fontProviderPackage="com.google.android.gms"
app:fontProviderQuery="name=Poppins&amp;weight=500"
app:fontProviderCerts="@array/com_google_android_gms_fonts_certs">
</font-family>
<?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"
android:background="@drawable/bg_login"
tools:context=".LoginActivity">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/mtvLogin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/poppins_bold"
android:text="Logo"
android:textColor="@color/colorWhite"
android:textSize="30sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.06999999" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/tvLoginToAcc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/poppins_medium"
android:text="Login to your account"
android:textSize="16sp"
android:textFontWeight="600"
android:textColor="@color/colorWhite"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.112"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.246" />
<com.google.android.material.card.MaterialCardView
android:id="@+id/cvLogin"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginHorizontal="30dp"
app:cardElevation="0dp"
android:backgroundTint="@android:color/transparent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvLoginToAcc"
app:layout_constraintVertical_bias="0.0">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tfUsername"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:hint="@string/username"
android:textColorHint="@color/colorWhite"
app:hintTextColor="@color/colorWhite"
app:boxStrokeColor="@color/colorWhite"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/tiUsername"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textColor="@color/colorWhite"
android:imeOptions="actionNext"
android:fontFamily="@font/poppins_medium" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tfPassword"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:hint="@string/password"
android:textColorHint="@color/colorWhite"
app:hintTextColor="@color/colorWhite"
app:boxStrokeColor="@color/colorWhite"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/tfUsername"
app:layout_constraintVertical_bias="0.0">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/tiPassword"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textColor="@color/colorWhite"
android:imeOptions="actionNext"
android:fontFamily="@font/poppins_medium" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.button.MaterialButton
android:id="@+id/btnLogin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:backgroundTint="#2041B8"
android:paddingVertical="15dp"
android:text="login"
android:imeOptions="actionGo"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tfPassword"
app:layout_constraintVertical_bias="0.01999998" />
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="forgot your password ?"
android:layout_marginTop="10dp"
android:textColor="@color/colorWhite"
app:layout_constraintTop_toBottomOf="@id/btnLogin"
app:layout_constraintStart_toStartOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -4,4 +4,5 @@ ...@@ -4,4 +4,5 @@
<color name="colorPrimaryDark">#3498DB</color> <color name="colorPrimaryDark">#3498DB</color>
<color name="colorAccent">#0f4c75</color> <color name="colorAccent">#0f4c75</color>
<color name="colorWhite">#fff</color> <color name="colorWhite">#fff</color>
<color name="mtrl_textinput_default_box_stroke_color">#fff</color>
</resources> </resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<array name="preloaded_fonts" translatable="false"> <array name="preloaded_fonts" translatable="false">
<item>@font/poppins_bold</item>
<item>@font/poppins_medium</item>
<item>@font/roboto</item> <item>@font/roboto</item>
</array> </array>
</resources> </resources>
...@@ -16,5 +16,7 @@ ...@@ -16,5 +16,7 @@
<string name="hint_quantity">0</string> <string name="hint_quantity">0</string>
<string name="hint_price">1000</string> <string name="hint_price">1000</string>
<string name="hint_description">Description</string> <string name="hint_description">Description</string>
<string name="username">Username</string>
<string name="password">password</string>
</resources> </resources>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment