Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
meser
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Muhammad Suryono
meser
Commits
2b0bb065
Commit
2b0bb065
authored
Sep 02, 2020
by
iman Fauzi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mockup slide saat pembayaran~
parent
b258f7c1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
186 additions
and
31 deletions
+186
-31
build.gradle
app/build.gradle
+1
-0
LoginActivity.java
app/src/main/java/com/yono/messeripos/LoginActivity.java
+23
-31
expansion_header_layout.xml
app/src/main/res/layout/expansion_header_layout.xml
+106
-0
payment_method.xml
app/src/main/res/layout/payment_method.xml
+56
-0
No files found.
app/build.gradle
View file @
2b0bb065
...
...
@@ -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
app/src/main/java/com/yono/messeripos/LoginActivity.java
View file @
2b0bb065
...
...
@@ -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
app/src/main/res/layout/expansion_header_layout.xml
0 → 100644
View file @
2b0bb065
<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
app/src/main/res/layout/payment_method.xml
0 → 100644
View file @
2b0bb065
<?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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment