Commit 2b0bb065 authored by iman Fauzi's avatar iman Fauzi

mockup slide saat pembayaran~

parent b258f7c1
......@@ -59,5 +59,6 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'androidmads.library.qrgenearator:QRGenearator:1.0.4'
implementation 'com.google.zxing:core:3.3.2'
implementation 'com.github.florent37:expansionpanel:1.2.4'
}
\ No newline at end of file
......@@ -31,48 +31,40 @@ import com.yono.messeripos.utils.Utils;
public class LoginActivity extends AppCompatActivity {
TextInputEditText username, password;
MaterialButton btnLogin;
MainViewModels mainViewModels;
ProgressBar progressBar;
SharedPreferences sharedPreferences;
Utils utils = new Utils();
LoginState loginState;
MaterialButton btnSignin;
ConstraintLayout loginSheetLayout;
BottomSheetBehavior sheetBehavior;
int height, width;
ImageButton closeBtn;
private String TAG = "MainActivity";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.dashboard_login);
setContentView(R.layout.payment_method);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
Window w = getWindow();
w.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
}
mainViewModels = ViewModelProviders.of(this).get(MainViewModels.class);
// bindUI
btnSignin = findViewById(R.id.signInButtonDashboardLogin);
// session login
sharedPreferences = getSharedPreferences(SplashScreen.MY_SHARED_PREFERENCES, Context.MODE_PRIVATE);
// button login on click
btnSignin.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
loginState = new LoginState(LoginActivity.this, mainViewModels);
loginState.setCancelable(false);
loginState.show(getSupportFragmentManager(), loginState.getTag());
}
});
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
// Window w = getWindow();
// w.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
// }
//
// mainViewModels = ViewModelProviders.of(this).get(MainViewModels.class);
//
//// bindUI
// btnSignin = findViewById(R.id.signInButtonDashboardLogin);
//
//// session login
// sharedPreferences = getSharedPreferences(SplashScreen.MY_SHARED_PREFERENCES, Context.MODE_PRIVATE);
//
//// button login on click
// btnSignin.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// loginState = new LoginState(LoginActivity.this, mainViewModels);
// loginState.setCancelable(false);
// loginState.show(getSupportFragmentManager(), loginState.getTag());
// }
// });
}
}
\ No newline at end of file
<RelativeLayout android:layout_height="wrap_content"
android:layout_width="match_parent"
android:orientation="vertical"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.github.florent37.expansionpanel.ExpansionHeader
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:id="@+id/sampleHeader"
app:expansion_headerIndicator="@id/headerIndicator"
app:expansion_layout="@id/expansionLayout"
app:expansion_toggleOnClick="true">
<RelativeLayout
android:background="@android:color/white"
android:layout_height="48dp"
android:layout_width="match_parent"
android:paddingLeft="16dp"
android:paddingRight="16dp">
<TextView
android:layout_centerVertical="true"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Trip name"
android:textColor="#3E3E3E" />
<TextView
android:layout_centerVertical="true"
android:layout_height="wrap_content"
android:layout_marginLeft="120dp"
android:layout_width="wrap_content"
android:text="Carribean cruise"
android:textColor="#AAA" />
<androidx.appcompat.widget.AppCompatImageView
android:adjustViewBounds="true"
android:id="@+id/headerIndicator"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_width="wrap_content"
app:srcCompat="@drawable/ic_expansion_header_indicator_grey_24dp" />
</RelativeLayout>
</com.github.florent37.expansionpanel.ExpansionHeader>
<com.github.florent37.expansionpanel.ExpansionLayout
android:id="@+id/expansionLayout"
app:expansion_expanded="false"
android:layout_height="wrap_content"
android:layout_width="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_marginVertical="2dp">
<com.google.android.material.card.MaterialCardView
android:id="@+id/cvPayment"
android:clickable="true"
android:focusable="true"
android:checkable="true"
android:layout_height="wrap_content"
android:layout_width="match_parent"
app:layout_constraintTop_toTopOf="parent"
app:strokeWidth="1dp"
app:strokeColor="@color/color_stroke">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="15dp">
<ImageView
android:id="@+id/ivLogo"
android:layout_width="120dp"
android:layout_height="0dp"
android:src="@drawable/ic_bni_logo"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
<RadioButton
android:id="@+id/rbPayment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:buttonTint="@color/colorPrimary"
android:enabled="false"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.github.florent37.expansionpanel.ExpansionLayout>
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:tools="http://schemas.android.com/tools"
android:layout_height="match_parent"
android:layout_width="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_marginVertical="2dp"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.google.android.material.card.MaterialCardView
android:id="@+id/cvPayment"
android:clickable="true"
android:focusable="true"
android:checkable="true"
android:layout_height="wrap_content"
android:layout_width="match_parent"
app:layout_constraintTop_toTopOf="parent"
app:strokeWidth="1dp"
app:strokeColor="@color/color_stroke">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="15dp">
<ImageView
android:id="@+id/ivLogo"
android:layout_width="120dp"
android:layout_height="0dp"
android:src="@drawable/ic_bni_logo"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
<RadioButton
android:id="@+id/rbPayment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:buttonTint="@color/colorPrimary"
android:enabled="false"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
<include
layout="@layout/expansion_header_layout"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_below="@id/cvPayment"/>
</RelativeLayout>
\ 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