Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
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
2c5e12f3
Commit
2c5e12f3
authored
Aug 25, 2020
by
Muhammad Suryono
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dashboard' into dev
parents
931c1480
00c671c1
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
213 additions
and
116 deletions
+213
-116
Project.xml
.idea/codeStyles/Project.xml
+24
-0
misc.xml
.idea/misc.xml
+1
-1
MainActivity.java
app/src/main/java/com/yono/messeripos/MainActivity.java
+1
-0
bg_add.xml
app/src/main/res/drawable/bg_add.xml
+10
-0
activity_cart.xml
app/src/main/res/layout/activity_cart.xml
+8
-115
form_product.xml
app/src/main/res/layout/form_product.xml
+17
-0
item_cart.xml
app/src/main/res/layout/item_cart.xml
+152
-0
No files found.
.idea/codeStyles/Project.xml
View file @
2c5e12f3
<component
name=
"ProjectCodeStyleConfiguration"
>
<code_scheme
name=
"Project"
version=
"173"
>
<DBN-PSQL>
<case-options
enabled=
"true"
>
<option
name=
"KEYWORD_CASE"
value=
"lower"
/>
<option
name=
"FUNCTION_CASE"
value=
"lower"
/>
<option
name=
"PARAMETER_CASE"
value=
"lower"
/>
<option
name=
"DATATYPE_CASE"
value=
"lower"
/>
<option
name=
"OBJECT_CASE"
value=
"preserve"
/>
</case-options>
<formatting-settings
enabled=
"false"
/>
</DBN-PSQL>
<DBN-SQL>
<case-options
enabled=
"true"
>
<option
name=
"KEYWORD_CASE"
value=
"lower"
/>
<option
name=
"FUNCTION_CASE"
value=
"lower"
/>
<option
name=
"PARAMETER_CASE"
value=
"lower"
/>
<option
name=
"DATATYPE_CASE"
value=
"lower"
/>
<option
name=
"OBJECT_CASE"
value=
"preserve"
/>
</case-options>
<formatting-settings
enabled=
"false"
>
<option
name=
"STATEMENT_SPACING"
value=
"one_line"
/>
<option
name=
"CLAUSE_CHOP_DOWN"
value=
"chop_down_if_statement_long"
/>
<option
name=
"ITERATION_ELEMENTS_WRAPPING"
value=
"chop_down_if_not_single"
/>
</formatting-settings>
</DBN-SQL>
<DBN-PSQL>
<case-options
enabled=
"true"
>
<option
name=
"KEYWORD_CASE"
value=
"lower"
/>
...
...
.idea/misc.xml
View file @
2c5e12f3
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_1_8"
project-jdk-name=
"
1.8
"
project-jdk-type=
"JavaSDK"
>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_1_8"
project-jdk-name=
"
JDK
"
project-jdk-type=
"JavaSDK"
>
<output
url=
"file://$PROJECT_DIR$/build/classes"
/>
</component>
<component
name=
"ProjectType"
>
...
...
app/src/main/java/com/yono/messeripos/MainActivity.java
View file @
2c5e12f3
...
...
@@ -118,6 +118,7 @@ public class MainActivity extends AppCompatActivity {
}
});
mainViewModels
=
ViewModelProviders
.
of
(
this
).
get
(
MainViewModels
.
class
);
mainViewModels
.
getProduct
().
observe
(
this
,
new
Observer
<
DataResponse
<
List
<
ProductModels
<
CategoryModels
>>>>()
{
@Override
...
...
app/src/main/res/drawable/bg_add.xml
0 → 100644
View file @
2c5e12f3
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item>
<shape>
<corners
android:bottomRightRadius=
"100dp"
android:bottomLeftRadius=
"100dp"
/>
<gradient
android:endColor=
"#3028A1"
android:startColor=
"#1B76D6"
/>
<size
android:height=
"120sp"
/>
</shape>
</item>
</selector>
\ No newline at end of file
app/src/main/res/layout/activity_cart.xml
View file @
2c5e12f3
...
...
@@ -12,123 +12,16 @@
layout=
"@layout/app_bar"
/>
<com.google.android.material.card.MaterialCardView
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rvCart"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:layout_constraintTop_toBottomOf=
"@id/cAppBar"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingVertical=
"15dp"
android:paddingHorizontal=
"20dp"
>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tvProductName"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/hint_product_name"
android:fontFamily=
"@font/roboto"
android:textSize=
"24sp"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tvPrice"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/hint_price"
android:fontFamily=
"@font/roboto"
android:textSize=
"16sp"
app:layout_constraintTop_toBottomOf=
"@+id/tvProductName"
app:layout_constraintStart_toStartOf=
"@id/tvProductName"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/cross"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"x"
android:fontFamily=
"@font/roboto"
android:textSize=
"16sp"
android:layout_marginStart=
"10dp"
app:layout_constraintStart_toEndOf=
"@id/tvPrice"
app:layout_constraintBottom_toBottomOf=
"@id/tvPrice"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tvQuantity"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"1"
android:fontFamily=
"@font/roboto"
android:textSize=
"16sp"
android:layout_marginStart=
"10dp"
app:layout_constraintStart_toEndOf=
"@id/cross"
app:layout_constraintBottom_toBottomOf=
"@id/cross"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tvTotal"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/hint_price"
android:fontFamily=
"@font/roboto"
android:textSize=
"16sp"
android:textFontWeight=
"600"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"@id/tvQuantity"
/>
<ImageButton
android:id=
"@+id/btMinus"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:padding=
"10dp"
android:layout_marginTop=
"20dp"
android:src=
"@drawable/ic_baseline_minus_24"
android:background=
"@drawable/ic_rounded_circle"
app:layout_constraintTop_toBottomOf=
"@id/tvPrice"
app:layout_constraintStart_toStartOf=
"parent"
/>
<com.google.android.material.textfield.TextInputLayout
android:id=
"@+id/tiQty"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
app:boxBackgroundColor=
"#fff"
app:layout_constraintBottom_toBottomOf=
"@id/btMinus"
app:layout_constraintStart_toEndOf=
"@id/btMinus"
>
<com.google.android.material.textfield.TextInputEditText
android:id=
"@+id/etQty"
android:enabled=
"false"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"1"
android:textColor=
"#333"
/>
</com.google.android.material.textfield.TextInputLayout>
<ImageButton
android:id=
"@+id/btPlus"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:padding=
"10dp"
android:src=
"@drawable/ic_baseline_plus_24"
android:background=
"@drawable/ic_rounded_circle"
app:layout_constraintStart_toEndOf=
"@id/tiQty"
app:layout_constraintBottom_toBottomOf=
"@id/tiQty"
/>
<ImageButton
android:id=
"@+id/btDelete"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:backgroundTint=
"#00FFFFFF"
android:src=
"@drawable/ic_baseline_delete_24"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"@id/btPlus"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
app:layout_constraintTop_toBottomOf=
"@id/cAppBar"
android:overScrollMode=
"never"
android:padding=
"12sp"
app:layoutManager=
"androidx.recyclerview.widget.GridLayoutManager"
tools:listitem=
"@layout/item_cart"
/>
<com.google.android.material.button.MaterialButton
android:id=
"@+id/btCheckout"
...
...
app/src/main/res/layout/form_product.xml
View file @
2c5e12f3
...
...
@@ -2,7 +2,9 @@
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@drawable/bg_add"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:fitsSystemWindows=
"true"
xmlns:tools=
"http://schemas.android.com/tools"
>
<com.google.android.material.appbar.MaterialToolbar
...
...
@@ -47,6 +49,7 @@
android:layout_height=
"wrap_content"
android:layout_margin=
"10dp"
android:hint=
"@string/name"
android:textColor=
"#fff"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
app:layout_constraintTop_toBottomOf=
"@+id/cvProduct"
tools:ignore=
"MissingConstraints"
>
...
...
@@ -65,6 +68,7 @@
android:layout_height=
"wrap_content"
android:layout_margin=
"10dp"
android:hint=
"@string/price"
android:textColor=
"#fff"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
app:layout_constraintTop_toBottomOf=
"@id/tfName"
>
...
...
@@ -82,6 +86,7 @@
android:layout_height=
"wrap_content"
android:layout_margin=
"10dp"
android:hint=
"@string/stock"
android:textColor=
"#fff"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
app:layout_constraintTop_toBottomOf=
"@id/tfPrice"
>
...
...
@@ -89,6 +94,7 @@
android:id=
"@+id/etStock"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:textColor=
"#fff"
/>
</com.google.android.material.textfield.TextInputLayout>
...
...
@@ -111,4 +117,15 @@
android:text=
"@string/add"
tools:ignore=
"MissingConstraints"
/>
<ImageView
android:id=
"@+id/ivLogin"
android:layout_width=
"191dp"
android:layout_height=
"166dp"
android:layout_marginTop=
"68dp"
android:src=
"@drawable/ic_launcher_new_icon_foreground"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/btnAdd"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/item_cart.xml
0 → 100644
View file @
2c5e12f3
<?xml version="1.0" encoding="utf-8"?>
<layout
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"
>
<data>
<variable
name=
"carts"
type=
"com.yono.messeripos.models.ProductCartModels"
/>
<variable
name=
"quantity"
type=
"String"
/>
<variable
name=
"price"
type=
"String"
/>
<variable
name=
"product_name"
type=
"String"
/>
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_margin=
"12dp"
>
<com.google.android.material.card.MaterialCardView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
tools:ignore=
"MissingConstraints"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingHorizontal=
"20dp"
android:paddingVertical=
"15dp"
>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tvProductName"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:fontFamily=
"@font/roboto"
android:text=
"@{carts.product_name_orders}"
android:textSize=
"24sp"
app:layout_constraintStart_toStartOf=
"parent"
tools:text=
"@string/hint_product_name"
app:layout_constraintTop_toTopOf=
"parent"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tvPrice"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:fontFamily=
"@font/roboto"
android:text=
"@{price}"
tools:text=
"@string/hint_price"
android:textSize=
"16sp"
app:layout_constraintStart_toStartOf=
"@id/tvProductName"
app:layout_constraintTop_toBottomOf=
"@+id/tvProductName"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/cross"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"10dp"
android:fontFamily=
"@font/roboto"
android:text=
"x"
android:textSize=
"16sp"
app:layout_constraintBottom_toBottomOf=
"@id/tvPrice"
app:layout_constraintStart_toEndOf=
"@id/tvPrice"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tvQuantity"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"10dp"
android:fontFamily=
"@font/roboto"
android:text=
"1"
android:textSize=
"16sp"
app:layout_constraintBottom_toBottomOf=
"@id/cross"
app:layout_constraintStart_toEndOf=
"@id/cross"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tvTotal"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:fontFamily=
"@font/roboto"
android:text=
"@string/hint_price"
android:textFontWeight=
"600"
android:textSize=
"16sp"
app:layout_constraintBottom_toBottomOf=
"@id/tvQuantity"
app:layout_constraintEnd_toEndOf=
"parent"
/>
<ImageButton
android:id=
"@+id/btMinus"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20dp"
android:background=
"@drawable/ic_rounded_circle"
android:padding=
"10dp"
android:src=
"@drawable/ic_baseline_minus_24"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tvPrice"
/>
<com.google.android.material.textfield.TextInputLayout
android:id=
"@+id/tiQty"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
app:boxBackgroundColor=
"#fff"
app:layout_constraintBottom_toBottomOf=
"@id/btMinus"
app:layout_constraintStart_toEndOf=
"@id/btMinus"
>
<com.google.android.material.textfield.TextInputEditText
android:id=
"@+id/etQty"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:enabled=
"false"
android:text=
"1"
android:textColor=
"#333"
/>
</com.google.android.material.textfield.TextInputLayout>
<ImageButton
android:id=
"@+id/btPlus"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/ic_rounded_circle"
android:padding=
"10dp"
android:src=
"@drawable/ic_baseline_plus_24"
app:layout_constraintBottom_toBottomOf=
"@id/tiQty"
app:layout_constraintStart_toEndOf=
"@id/tiQty"
/>
<ImageButton
android:id=
"@+id/btDelete"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:backgroundTint=
"#00FFFFFF"
android:src=
"@drawable/ic_baseline_delete_24"
app:layout_constraintBottom_toBottomOf=
"@id/btPlus"
app:layout_constraintEnd_toEndOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
\ 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