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
dc6f7bcb
Commit
dc6f7bcb
authored
Aug 24, 2020
by
Muhammad Suryono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge dashboard
parent
d61428bf
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
794 additions
and
42 deletions
+794
-42
Project.xml
.idea/codeStyles/Project.xml
+48
-0
dbnavigator.xml
.idea/dbnavigator.xml
+458
-0
misc.xml
.idea/misc.xml
+1
-1
MainActivity.java
app/src/main/java/com/yono/messeripos/MainActivity.java
+4
-5
activity_main.xml
app/src/main/res/layout/activity_main.xml
+19
-36
appbar_dashboard.xml
app/src/main/res/layout/appbar_dashboard.xml
+29
-0
item_category.xml
app/src/main/res/layout/item_category.xml
+150
-0
item_list.xml
app/src/main/res/layout/item_list.xml
+85
-0
No files found.
.idea/codeStyles/Project.xml
View file @
dc6f7bcb
<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"
/>
<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>
<codeStyleSettings
language=
"XML"
>
<indentOptions>
<option
name=
"CONTINUATION_INDENT_SIZE"
value=
"4"
/>
...
...
.idea/dbnavigator.xml
0 → 100644
View file @
dc6f7bcb
This diff is collapsed.
Click to expand it.
.idea/misc.xml
View file @
dc6f7bcb
<?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 @
dc6f7bcb
...
...
@@ -7,7 +7,6 @@ import android.view.MenuItem;
import
android.view.View
;
import
android.view.Window
;
import
android.view.WindowManager
;
import
android.widget.Toast
;
import
androidx.appcompat.app.AppCompatActivity
;
import
androidx.appcompat.widget.Toolbar
;
...
...
@@ -22,19 +21,20 @@ import com.yono.messeripos.models.MainViewModels;
import
com.yono.messeripos.models.ProductModels
;
import
com.yono.messeripos.response.DataResponse
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
MainActivity
extends
AppCompatActivity
{
MaterialToolbar
toolbar
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_main
);
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
KITKAT
){
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
);
w
.
getDecorView
().
setSystemUiVisibility
(
View
.
SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
);
...
...
@@ -47,7 +47,6 @@ public class MainActivity extends AppCompatActivity {
@Override
public
boolean
onMenuItemClick
(
MenuItem
item
)
{
int
id
=
item
.
getItemId
();
if
(
id
==
R
.
id
.
menu_cart
){
startActivity
(
new
Intent
(
getApplicationContext
(),
CartActivity
.
class
));
}
...
...
app/src/main/res/layout/activity_main.xml
View file @
dc6f7bcb
...
...
@@ -6,52 +6,35 @@
android:layout_height=
"match_parent"
tools:context=
".MainActivity"
>
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<com.google.android.material.appbar.AppBarLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingStart=
"15dp"
>
<com.google.android.material.appbar.MaterialToolbar
<include
android:id=
"@+id/topAppBar"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:menu=
"@menu/home"
android:elevation=
"0dp"
app:navigationIcon=
"@drawable/ic_meser"
android:layout_marginTop=
"30dp"
style=
"@style/Widget.MaterialComponents.Toolbar.Primary"
>
<EditText
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:textColor=
"#fff"
android:hint=
"Search"
android:paddingStart=
"10dp"
android:textColorHint=
"#fff"
android:outlineSpotShadowColor=
"#fff"
android:textColorHighlight=
"#fff"
android:drawableStart=
"@drawable/ic_baseline_search_24"
/>
layout=
"@layout/appbar_dashboard"
>
</include>
</com.google.android.material.appbar.MaterialToolbar>
<include
android:id=
"@+id/category"
</com.google.android.material.appbar.AppBarLayout>
<!-- Note: A RecyclerView can also be used -->
<androidx.core.widget.NestedScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
app:layout_behavior=
"@string/appbar_scrolling_view_behavior"
>
android:layout_height=
"wrap_content"
app:layout_constraintTop_toBottomOf=
"@+id/topAppBar"
layout=
"@layout/item_category"
/>
<!-- Scrollable content -->
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rvProduct"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:overScrollMode=
"never"
android:padding=
"12sp"
app:layoutManager=
"androidx.recyclerview.widget.GridLayoutManager"
app:spanCount=
"2"
app:layout_constraintTop_toBottomOf=
"@id/category"
tools:listitem=
"@layout/item_list"
/>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/appbar_dashboard.xml
0 → 100644
View file @
dc6f7bcb
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.appbar.MaterialToolbar
android:id=
"@+id/topAppBar"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:elevation=
"0dp"
style=
"@style/Widget.MaterialComponents.Toolbar.Primary"
xmlns:android=
"http://schemas.android.com/apk/res/android"
app:menu=
"@menu/home"
app:navigationIcon=
"@drawable/ic_meser"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<com.google.android.material.textfield.TextInputLayout
android:id=
"@+id/tilSearch"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<com.google.android.material.textfield.TextInputEditText
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:drawableStart=
"@drawable/ic_baseline_search_24"
android:hint=
"Search"
android:imeOptions=
"actionSearch"
android:textColor=
"#fff"
android:textColorHighlight=
"#fff"
android:textColorHint=
"#fff"
/>
</com.google.android.material.textfield.TextInputLayout>
</com.google.android.material.appbar.MaterialToolbar>
app/src/main/res/layout/item_category.xml
0 → 100644
View file @
dc6f7bcb
<?xml version="1.0" encoding="utf-8"?>
<HorizontalScrollView
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_height=
"60dp"
android:layout_width=
"match_parent"
android:scrollbars=
"none"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:paddingStart=
"10dp"
android:paddingTop=
"5dp"
android:paddingEnd=
"10dp"
android:orientation=
"horizontal"
>
<com.google.android.material.card.MaterialCardView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:backgroundTint=
"@color/ic_launcher_background"
app:cardCornerRadius=
"15dp"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<ImageView
android:id=
"@+id/image_cat"
android:layout_width=
"30dp"
android:layout_height=
"50dp"
android:src=
"@drawable/ic_meser"
android:layout_marginStart=
"10dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.06"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.0"
tools:ignore=
"MissingConstraints"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:fontFamily=
"@font/roboto"
android:text=
"Food"
android:textStyle=
"bold"
android:textSize=
"20sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/image_cat"
app:layout_constraintTop_toTopOf=
"parent"
android:layout_marginStart=
"10dp"
android:layout_marginEnd=
"40dp"
tools:ignore=
"MissingConstraints"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:backgroundTint=
"@color/ic_launcher_background"
android:layout_marginStart=
"20dp"
app:cardCornerRadius=
"15dp"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<ImageView
android:id=
"@+id/image_cat1"
android:layout_width=
"30dp"
android:layout_height=
"50dp"
android:src=
"@drawable/ic_meser"
android:layout_marginStart=
"10dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.06"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.0"
tools:ignore=
"MissingConstraints"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:fontFamily=
"@font/roboto"
android:text=
"Food"
android:textStyle=
"bold"
android:textSize=
"20sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/image_cat1"
app:layout_constraintTop_toTopOf=
"parent"
android:layout_marginStart=
"10dp"
android:layout_marginEnd=
"40dp"
tools:ignore=
"MissingConstraints"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:backgroundTint=
"@color/ic_launcher_background"
android:layout_marginStart=
"20dp"
app:cardCornerRadius=
"15dp"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<ImageView
android:id=
"@+id/image_cat2"
android:layout_width=
"30dp"
android:layout_height=
"50dp"
android:src=
"@drawable/ic_meser"
android:layout_marginStart=
"10dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.06"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.0"
tools:ignore=
"MissingConstraints"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:fontFamily=
"@font/roboto"
android:text=
"Food"
android:textStyle=
"bold"
android:textSize=
"20sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/image_cat2"
app:layout_constraintTop_toTopOf=
"parent"
android:layout_marginStart=
"10dp"
android:layout_marginEnd=
"40dp"
tools:ignore=
"MissingConstraints"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
</LinearLayout>
</HorizontalScrollView>
\ No newline at end of file
app/src/main/res/layout/item_list.xml
0 → 100644
View file @
dc6f7bcb
<?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=
"product"
type=
"com.yono.messeripos.models.ProductModels"
/>
</data>
<com.google.android.material.card.MaterialCardView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_margin=
"@dimen/cardview_default_radius"
android:padding=
"@dimen/cardview_default_elevation"
app:cardCornerRadius=
"@dimen/cardview_default_radius"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<ImageView
android:id=
"@+id/ivMeser"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:adjustViewBounds=
"true"
tools:src=
"@tools:sample/avatars"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tvQuantity"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_above=
"@id/tvProduct"
android:layout_alignParentEnd=
"true"
android:background=
"#fff"
android:fontFamily=
"monospace"
android:padding=
"@dimen/material_emphasis_medium"
android:textColor=
"@android:color/white"
android:textSize=
"12sp"
android:textStyle=
"bold"
tools:text=
"10"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tvProduct"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/ivMeser"
android:fontFamily=
"@font/roboto"
android:gravity=
"center"
android:padding=
"@dimen/material_emphasis_high_type"
android:textAllCaps=
"true"
android:textColor=
"@color/ic_launcher_background"
android:textSize=
"12sp"
android:textStyle=
"bold"
tools:text=
"@tools:sample/full_names"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tvPrice"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tvProduct"
android:fontFamily=
"@font/roboto"
android:gravity=
"end"
android:paddingStart=
"@dimen/material_emphasis_medium"
android:paddingEnd=
"@dimen/material_emphasis_disabled"
android:textColor=
"@drawable/ic_launcher_background"
android:textSize=
"12sp"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tvDescription"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tvPrice"
android:fontFamily=
"@font/roboto"
android:padding=
"@dimen/material_emphasis_high_type"
android:textColor=
"@android:color/darker_gray"
android:textSize=
"12sp"
tools:text=
"@tools:sample/lorem"
/>
</RelativeLayout>
</com.google.android.material.card.MaterialCardView>
</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