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
e1fb7923
Commit
e1fb7923
authored
Aug 24, 2020
by
iman Fauzi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into cart
parents
fa2fe6d3
aeb47069
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
1342 additions
and
50 deletions
+1342
-50
Project.xml
.idea/codeStyles/Project.xml
+24
-0
dbnavigator.xml
.idea/dbnavigator.xml
+458
-0
misc.xml
.idea/misc.xml
+1
-1
build.gradle
app/build.gradle
+9
-0
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+2
-2
MainActivity.java
app/src/main/java/com/yono/messeripos/MainActivity.java
+10
-4
SplashScreen.java
app/src/main/java/com/yono/messeripos/SplashScreen.java
+8
-0
CartAdapter.java
...rc/main/java/com/yono/messeripos/adapter/CartAdapter.java
+31
-0
CategoryAdapter.java
...ain/java/com/yono/messeripos/adapter/CategoryAdapter.java
+31
-0
ProductAdapter.java
...main/java/com/yono/messeripos/adapter/ProductAdapter.java
+31
-0
ApiHelper.java
app/src/main/java/com/yono/messeripos/api/ApiHelper.java
+14
-0
Client.java
app/src/main/java/com/yono/messeripos/api/client/Client.java
+9
-0
CategoryServise.java
...java/com/yono/messeripos/api/service/CategoryServise.java
+15
-0
ProductService.java
.../java/com/yono/messeripos/api/service/ProductService.java
+17
-0
CartDaos.java
app/src/main/java/com/yono/messeripos/daos/CartDaos.java
+8
-0
LocalDatabase.java
...main/java/com/yono/messeripos/database/LocalDatabase.java
+17
-0
CartModels.java
app/src/main/java/com/yono/messeripos/models/CartModels.java
+27
-0
CategoryModels.java
.../main/java/com/yono/messeripos/models/CategoryModels.java
+27
-0
MainViewModels.java
.../main/java/com/yono/messeripos/models/MainViewModels.java
+73
-0
ProductCartModels.java
...in/java/com/yono/messeripos/models/ProductCartModels.java
+139
-0
ProductModels.java
...c/main/java/com/yono/messeripos/models/ProductModels.java
+46
-3
UsersModels.java
...src/main/java/com/yono/messeripos/models/UsersModels.java
+27
-0
DataResponse.java
.../main/java/com/yono/messeripos/response/DataResponse.java
+3
-2
zoom_in.xml
app/src/main/res/anim/zoom_in.xml
+13
-0
activity_login.xml
app/src/main/res/layout/activity_login.xml
+10
-0
activity_main.xml
app/src/main/res/layout/activity_main.xml
+21
-38
activity_splash.xml
app/src/main/res/layout/activity_splash.xml
+1
-0
appbar_dashboard.xml
app/src/main/res/layout/appbar_dashboard.xml
+35
-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 @
e1fb7923
<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>
<codeStyleSettings
language=
"XML"
>
<indentOptions>
<option
name=
"CONTINUATION_INDENT_SIZE"
value=
"4"
/>
...
...
.idea/dbnavigator.xml
0 → 100644
View file @
e1fb7923
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"DBNavigator.Project.DataEditorManager"
>
<record-view-column-sorting-type
value=
"BY_INDEX"
/>
<value-preview-text-wrapping
value=
"true"
/>
<value-preview-pinned
value=
"false"
/>
</component>
<component
name=
"DBNavigator.Project.DataExportManager"
>
<export-instructions>
<create-header
value=
"true"
/>
<quote-values-containing-separator
value=
"true"
/>
<quote-all-values
value=
"false"
/>
<value-separator
value=
""
/>
<file-name
value=
""
/>
<file-location
value=
""
/>
<scope
value=
"GLOBAL"
/>
<destination
value=
"FILE"
/>
<format
value=
"EXCEL"
/>
<charset
value=
"windows-1252"
/>
</export-instructions>
</component>
<component
name=
"DBNavigator.Project.DatabaseBrowserManager"
>
<autoscroll-to-editor
value=
"false"
/>
<autoscroll-from-editor
value=
"true"
/>
<show-object-properties
value=
"true"
/>
<loaded-nodes
/>
</component>
<component
name=
"DBNavigator.Project.DatabaseFileManager"
>
<open-files
/>
</component>
<component
name=
"DBNavigator.Project.EditorStateManager"
>
<last-used-providers
/>
</component>
<component
name=
"DBNavigator.Project.MethodExecutionManager"
>
<method-browser
/>
<execution-history>
<group-entries
value=
"true"
/>
<execution-inputs
/>
</execution-history>
<argument-values-cache
/>
</component>
<component
name=
"DBNavigator.Project.ObjectDependencyManager"
>
<last-used-dependency-type
value=
"INCOMING"
/>
</component>
<component
name=
"DBNavigator.Project.ObjectQuickFilterManager"
>
<last-used-operator
value=
"EQUAL"
/>
<filters
/>
</component>
<component
name=
"DBNavigator.Project.ScriptExecutionManager"
clear-outputs=
"true"
>
<recently-used-interfaces
/>
</component>
<component
name=
"DBNavigator.Project.Settings"
>
<connections
/>
<browser-settings>
<general>
<display-mode
value=
"TABBED"
/>
<navigation-history-size
value=
"100"
/>
<show-object-details
value=
"false"
/>
</general>
<filters>
<object-type-filter>
<object-type
name=
"SCHEMA"
enabled=
"true"
/>
<object-type
name=
"USER"
enabled=
"true"
/>
<object-type
name=
"ROLE"
enabled=
"true"
/>
<object-type
name=
"PRIVILEGE"
enabled=
"true"
/>
<object-type
name=
"CHARSET"
enabled=
"true"
/>
<object-type
name=
"TABLE"
enabled=
"true"
/>
<object-type
name=
"VIEW"
enabled=
"true"
/>
<object-type
name=
"MATERIALIZED_VIEW"
enabled=
"true"
/>
<object-type
name=
"NESTED_TABLE"
enabled=
"true"
/>
<object-type
name=
"COLUMN"
enabled=
"true"
/>
<object-type
name=
"INDEX"
enabled=
"true"
/>
<object-type
name=
"CONSTRAINT"
enabled=
"true"
/>
<object-type
name=
"DATASET_TRIGGER"
enabled=
"true"
/>
<object-type
name=
"DATABASE_TRIGGER"
enabled=
"true"
/>
<object-type
name=
"SYNONYM"
enabled=
"true"
/>
<object-type
name=
"SEQUENCE"
enabled=
"true"
/>
<object-type
name=
"PROCEDURE"
enabled=
"true"
/>
<object-type
name=
"FUNCTION"
enabled=
"true"
/>
<object-type
name=
"PACKAGE"
enabled=
"true"
/>
<object-type
name=
"TYPE"
enabled=
"true"
/>
<object-type
name=
"TYPE_ATTRIBUTE"
enabled=
"true"
/>
<object-type
name=
"ARGUMENT"
enabled=
"true"
/>
<object-type
name=
"DIMENSION"
enabled=
"true"
/>
<object-type
name=
"CLUSTER"
enabled=
"true"
/>
<object-type
name=
"DBLINK"
enabled=
"true"
/>
</object-type-filter>
</filters>
<sorting>
<object-type
name=
"COLUMN"
sorting-type=
"NAME"
/>
<object-type
name=
"FUNCTION"
sorting-type=
"NAME"
/>
<object-type
name=
"PROCEDURE"
sorting-type=
"NAME"
/>
<object-type
name=
"ARGUMENT"
sorting-type=
"POSITION"
/>
</sorting>
<default-editors>
<object-type
name=
"VIEW"
editor-type=
"SELECTION"
/>
<object-type
name=
"PACKAGE"
editor-type=
"SELECTION"
/>
<object-type
name=
"TYPE"
editor-type=
"SELECTION"
/>
</default-editors>
</browser-settings>
<navigation-settings>
<lookup-filters>
<lookup-objects>
<object-type
name=
"SCHEMA"
enabled=
"true"
/>
<object-type
name=
"USER"
enabled=
"false"
/>
<object-type
name=
"ROLE"
enabled=
"false"
/>
<object-type
name=
"PRIVILEGE"
enabled=
"false"
/>
<object-type
name=
"CHARSET"
enabled=
"false"
/>
<object-type
name=
"TABLE"
enabled=
"true"
/>
<object-type
name=
"VIEW"
enabled=
"true"
/>
<object-type
name=
"MATERIALIZED VIEW"
enabled=
"true"
/>
<object-type
name=
"NESTED TABLE"
enabled=
"false"
/>
<object-type
name=
"COLUMN"
enabled=
"false"
/>
<object-type
name=
"INDEX"
enabled=
"true"
/>
<object-type
name=
"CONSTRAINT"
enabled=
"true"
/>
<object-type
name=
"DATASET TRIGGER"
enabled=
"true"
/>
<object-type
name=
"DATABASE TRIGGER"
enabled=
"true"
/>
<object-type
name=
"SYNONYM"
enabled=
"false"
/>
<object-type
name=
"SEQUENCE"
enabled=
"true"
/>
<object-type
name=
"PROCEDURE"
enabled=
"true"
/>
<object-type
name=
"FUNCTION"
enabled=
"true"
/>
<object-type
name=
"PACKAGE"
enabled=
"true"
/>
<object-type
name=
"TYPE"
enabled=
"true"
/>
<object-type
name=
"TYPE ATTRIBUTE"
enabled=
"false"
/>
<object-type
name=
"ARGUMENT"
enabled=
"false"
/>
<object-type
name=
"DIMENSION"
enabled=
"false"
/>
<object-type
name=
"CLUSTER"
enabled=
"false"
/>
<object-type
name=
"DBLINK"
enabled=
"true"
/>
</lookup-objects>
<force-database-load
value=
"false"
/>
<prompt-connection-selection
value=
"true"
/>
<prompt-schema-selection
value=
"true"
/>
</lookup-filters>
</navigation-settings>
<dataset-grid-settings>
<general>
<enable-zooming
value=
"true"
/>
<enable-column-tooltip
value=
"true"
/>
</general>
<sorting>
<nulls-first
value=
"true"
/>
<max-sorting-columns
value=
"4"
/>
</sorting>
<tracking-columns>
<columnNames
value=
""
/>
<visible
value=
"true"
/>
<editable
value=
"false"
/>
</tracking-columns>
</dataset-grid-settings>
<dataset-editor-settings>
<text-editor-popup>
<active
value=
"false"
/>
<active-if-empty
value=
"false"
/>
<data-length-threshold
value=
"100"
/>
<popup-delay
value=
"1000"
/>
</text-editor-popup>
<values-actions-popup>
<show-popup-button
value=
"true"
/>
<element-count-threshold
value=
"1000"
/>
<data-length-threshold
value=
"250"
/>
</values-actions-popup>
<general>
<fetch-block-size
value=
"100"
/>
<fetch-timeout
value=
"30"
/>
<trim-whitespaces
value=
"true"
/>
<convert-empty-strings-to-null
value=
"true"
/>
<select-content-on-cell-edit
value=
"true"
/>
<large-value-preview-active
value=
"true"
/>
</general>
<filters>
<prompt-filter-dialog
value=
"true"
/>
<default-filter-type
value=
"BASIC"
/>
</filters>
<qualified-text-editor
text-length-threshold=
"300"
>
<content-types>
<content-type
name=
"Text"
enabled=
"true"
/>
<content-type
name=
"Properties"
enabled=
"true"
/>
<content-type
name=
"XML"
enabled=
"true"
/>
<content-type
name=
"DTD"
enabled=
"true"
/>
<content-type
name=
"HTML"
enabled=
"true"
/>
<content-type
name=
"XHTML"
enabled=
"true"
/>
<content-type
name=
"Java"
enabled=
"true"
/>
<content-type
name=
"SQL"
enabled=
"true"
/>
<content-type
name=
"PL/SQL"
enabled=
"true"
/>
<content-type
name=
"JSON"
enabled=
"true"
/>
<content-type
name=
"JSON5"
enabled=
"true"
/>
<content-type
name=
"Groovy"
enabled=
"true"
/>
<content-type
name=
"AIDL"
enabled=
"true"
/>
<content-type
name=
"YAML"
enabled=
"true"
/>
<content-type
name=
"Manifest"
enabled=
"true"
/>
</content-types>
</qualified-text-editor>
<record-navigation>
<navigation-target
value=
"VIEWER"
/>
</record-navigation>
</dataset-editor-settings>
<code-editor-settings>
<general>
<show-object-navigation-gutter
value=
"false"
/>
<show-spec-declaration-navigation-gutter
value=
"true"
/>
<enable-spellchecking
value=
"true"
/>
<enable-reference-spellchecking
value=
"false"
/>
</general>
<confirmations>
<save-changes
value=
"false"
/>
<revert-changes
value=
"true"
/>
</confirmations>
</code-editor-settings>
<code-completion-settings>
<filters>
<basic-filter>
<filter-element
type=
"RESERVED_WORD"
id=
"keyword"
selected=
"true"
/>
<filter-element
type=
"RESERVED_WORD"
id=
"function"
selected=
"true"
/>
<filter-element
type=
"RESERVED_WORD"
id=
"parameter"
selected=
"true"
/>
<filter-element
type=
"RESERVED_WORD"
id=
"datatype"
selected=
"true"
/>
<filter-element
type=
"RESERVED_WORD"
id=
"exception"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"schema"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"role"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"user"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"privilege"
selected=
"true"
/>
<user-schema>
<filter-element
type=
"OBJECT"
id=
"table"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"view"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"materialized view"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"index"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"constraint"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"trigger"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"synonym"
selected=
"false"
/>
<filter-element
type=
"OBJECT"
id=
"sequence"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"procedure"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"function"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"package"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"type"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"dimension"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"cluster"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"dblink"
selected=
"true"
/>
</user-schema>
<public-schema>
<filter-element
type=
"OBJECT"
id=
"table"
selected=
"false"
/>
<filter-element
type=
"OBJECT"
id=
"view"
selected=
"false"
/>
<filter-element
type=
"OBJECT"
id=
"materialized view"
selected=
"false"
/>
<filter-element
type=
"OBJECT"
id=
"index"
selected=
"false"
/>
<filter-element
type=
"OBJECT"
id=
"constraint"
selected=
"false"
/>
<filter-element
type=
"OBJECT"
id=
"trigger"
selected=
"false"
/>
<filter-element
type=
"OBJECT"
id=
"synonym"
selected=
"false"
/>
<filter-element
type=
"OBJECT"
id=
"sequence"
selected=
"false"
/>
<filter-element
type=
"OBJECT"
id=
"procedure"
selected=
"false"
/>
<filter-element
type=
"OBJECT"
id=
"function"
selected=
"false"
/>
<filter-element
type=
"OBJECT"
id=
"package"
selected=
"false"
/>
<filter-element
type=
"OBJECT"
id=
"type"
selected=
"false"
/>
<filter-element
type=
"OBJECT"
id=
"dimension"
selected=
"false"
/>
<filter-element
type=
"OBJECT"
id=
"cluster"
selected=
"false"
/>
<filter-element
type=
"OBJECT"
id=
"dblink"
selected=
"false"
/>
</public-schema>
<any-schema>
<filter-element
type=
"OBJECT"
id=
"table"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"view"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"materialized view"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"index"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"constraint"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"trigger"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"synonym"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"sequence"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"procedure"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"function"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"package"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"type"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"dimension"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"cluster"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"dblink"
selected=
"true"
/>
</any-schema>
</basic-filter>
<extended-filter>
<filter-element
type=
"RESERVED_WORD"
id=
"keyword"
selected=
"true"
/>
<filter-element
type=
"RESERVED_WORD"
id=
"function"
selected=
"true"
/>
<filter-element
type=
"RESERVED_WORD"
id=
"parameter"
selected=
"true"
/>
<filter-element
type=
"RESERVED_WORD"
id=
"datatype"
selected=
"true"
/>
<filter-element
type=
"RESERVED_WORD"
id=
"exception"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"schema"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"user"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"role"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"privilege"
selected=
"true"
/>
<user-schema>
<filter-element
type=
"OBJECT"
id=
"table"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"view"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"materialized view"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"index"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"constraint"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"trigger"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"synonym"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"sequence"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"procedure"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"function"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"package"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"type"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"dimension"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"cluster"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"dblink"
selected=
"true"
/>
</user-schema>
<public-schema>
<filter-element
type=
"OBJECT"
id=
"table"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"view"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"materialized view"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"index"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"constraint"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"trigger"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"synonym"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"sequence"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"procedure"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"function"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"package"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"type"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"dimension"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"cluster"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"dblink"
selected=
"true"
/>
</public-schema>
<any-schema>
<filter-element
type=
"OBJECT"
id=
"table"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"view"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"materialized view"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"index"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"constraint"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"trigger"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"synonym"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"sequence"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"procedure"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"function"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"package"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"type"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"dimension"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"cluster"
selected=
"true"
/>
<filter-element
type=
"OBJECT"
id=
"dblink"
selected=
"true"
/>
</any-schema>
</extended-filter>
</filters>
<sorting
enabled=
"true"
>
<sorting-element
type=
"RESERVED_WORD"
id=
"keyword"
/>
<sorting-element
type=
"RESERVED_WORD"
id=
"datatype"
/>
<sorting-element
type=
"OBJECT"
id=
"column"
/>
<sorting-element
type=
"OBJECT"
id=
"table"
/>
<sorting-element
type=
"OBJECT"
id=
"view"
/>
<sorting-element
type=
"OBJECT"
id=
"materialized view"
/>
<sorting-element
type=
"OBJECT"
id=
"index"
/>
<sorting-element
type=
"OBJECT"
id=
"constraint"
/>
<sorting-element
type=
"OBJECT"
id=
"trigger"
/>
<sorting-element
type=
"OBJECT"
id=
"synonym"
/>
<sorting-element
type=
"OBJECT"
id=
"sequence"
/>
<sorting-element
type=
"OBJECT"
id=
"procedure"
/>
<sorting-element
type=
"OBJECT"
id=
"function"
/>
<sorting-element
type=
"OBJECT"
id=
"package"
/>
<sorting-element
type=
"OBJECT"
id=
"type"
/>
<sorting-element
type=
"OBJECT"
id=
"dimension"
/>
<sorting-element
type=
"OBJECT"
id=
"cluster"
/>
<sorting-element
type=
"OBJECT"
id=
"dblink"
/>
<sorting-element
type=
"OBJECT"
id=
"schema"
/>
<sorting-element
type=
"OBJECT"
id=
"role"
/>
<sorting-element
type=
"OBJECT"
id=
"user"
/>
<sorting-element
type=
"RESERVED_WORD"
id=
"function"
/>
<sorting-element
type=
"RESERVED_WORD"
id=
"parameter"
/>
</sorting>
<format>
<enforce-code-style-case
value=
"true"
/>
</format>
</code-completion-settings>
<execution-engine-settings>
<statement-execution>
<fetch-block-size
value=
"100"
/>
<execution-timeout
value=
"20"
/>
<debug-execution-timeout
value=
"600"
/>
<focus-result
value=
"false"
/>
<prompt-execution
value=
"false"
/>
</statement-execution>
<script-execution>
<command-line-interfaces
/>
<execution-timeout
value=
"300"
/>
</script-execution>
<method-execution>
<execution-timeout
value=
"30"
/>
<debug-execution-timeout
value=
"600"
/>
<parameter-history-size
value=
"10"
/>
</method-execution>
</execution-engine-settings>
<operation-settings>
<transactions>
<uncommitted-changes>
<on-project-close
value=
"ASK"
/>
<on-disconnect
value=
"ASK"
/>
<on-autocommit-toggle
value=
"ASK"
/>
</uncommitted-changes>
<multiple-uncommitted-changes>
<on-commit
value=
"ASK"
/>
<on-rollback
value=
"ASK"
/>
</multiple-uncommitted-changes>
</transactions>
<session-browser>
<disconnect-session
value=
"ASK"
/>
<kill-session
value=
"ASK"
/>
<reload-on-filter-change
value=
"false"
/>
</session-browser>
<compiler>
<compile-type
value=
"KEEP"
/>
<compile-dependencies
value=
"ASK"
/>
<always-show-controls
value=
"false"
/>
</compiler>
<debugger>
<debugger-type
value=
"ASK"
/>
<use-generic-runners
value=
"true"
/>
</debugger>
</operation-settings>
<ddl-file-settings>
<extensions>
<mapping
file-type-id=
"VIEW"
extensions=
"vw"
/>
<mapping
file-type-id=
"TRIGGER"
extensions=
"trg"
/>
<mapping
file-type-id=
"PROCEDURE"
extensions=
"prc"
/>
<mapping
file-type-id=
"FUNCTION"
extensions=
"fnc"
/>
<mapping
file-type-id=
"PACKAGE"
extensions=
"pkg"
/>
<mapping
file-type-id=
"PACKAGE_SPEC"
extensions=
"pks"
/>
<mapping
file-type-id=
"PACKAGE_BODY"
extensions=
"pkb"
/>
<mapping
file-type-id=
"TYPE"
extensions=
"tpe"
/>
<mapping
file-type-id=
"TYPE_SPEC"
extensions=
"tps"
/>
<mapping
file-type-id=
"TYPE_BODY"
extensions=
"tpb"
/>
</extensions>
<general>
<lookup-ddl-files
value=
"true"
/>
<create-ddl-files
value=
"false"
/>
<synchronize-ddl-files
value=
"true"
/>
<use-qualified-names
value=
"false"
/>
<make-scripts-rerunnable
value=
"true"
/>
</general>
</ddl-file-settings>
<general-settings>
<regional-settings>
<date-format
value=
"MEDIUM"
/>
<number-format
value=
"UNGROUPED"
/>
<locale
value=
"SYSTEM_DEFAULT"
/>
<use-custom-formats
value=
"false"
/>
</regional-settings>
<environment>
<environment-types>
<environment-type
id=
"development"
name=
"Development"
description=
"Development environment"
color=
"-2430209/-12296320"
readonly-code=
"false"
readonly-data=
"false"
/>
<environment-type
id=
"integration"
name=
"Integration"
description=
"Integration environment"
color=
"-2621494/-12163514"
readonly-code=
"true"
readonly-data=
"false"
/>
<environment-type
id=
"production"
name=
"Production"
description=
"Productive environment"
color=
"-11574/-10271420"
readonly-code=
"true"
readonly-data=
"true"
/>
<environment-type
id=
"other"
name=
"Other"
description=
""
color=
"-1576/-10724543"
readonly-code=
"false"
readonly-data=
"false"
/>
</environment-types>
<visibility-settings>
<connection-tabs
value=
"true"
/>
<dialog-headers
value=
"true"
/>
<object-editor-tabs
value=
"true"
/>
<script-editor-tabs
value=
"false"
/>
<execution-result-tabs
value=
"true"
/>
</visibility-settings>
</environment>
</general-settings>
</component>
<component
name=
"DBNavigator.Project.StatementExecutionManager"
>
<execution-variables
/>
</component>
</project>
\ No newline at end of file
.idea/misc.xml
View file @
e1fb7923
<?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/build.gradle
View file @
e1fb7923
...
...
@@ -25,6 +25,10 @@ android {
enabled
=
true
}
viewBinding
{
enabled
=
true
}
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
targetCompatibility
JavaVersion
.
VERSION_1_8
...
...
@@ -41,6 +45,11 @@ dependencies {
implementation
'com.squareup.retrofit2:converter-gson:2.9.0'
implementation
'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation
'com.github.bumptech.glide:glide:4.3.1'
def
room_version
=
"2.2.5"
implementation
"androidx.room:room-runtime:$room_version"
annotationProcessor
"androidx.room:room-compiler:$room_version"
testImplementation
'junit:junit:4.12'
androidTestImplementation
'androidx.test.ext:junit:1.1.1'
androidTestImplementation
'androidx.test.espresso:espresso-core:3.2.0'
...
...
app/src/main/AndroidManifest.xml
View file @
e1fb7923
...
...
@@ -10,7 +10,7 @@
android:label=
"@string/app_name"
android:roundIcon=
"@mipmap/ic_launcher"
android:supportsRtl=
"true"
android:theme=
"@style/AppTheme"
>
android:theme=
"@style/AppTheme
.appbar
"
>
<activity
android:name=
".PaymentActivity"
android:theme=
"@style/AppTheme.appbar"
></activity>
<activity
android:name=
".CartActivity"
android:theme=
"@style/AppTheme.appbar"
/>
<activity
android:name=
".SplashScreen"
>
...
...
@@ -20,7 +20,7 @@
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</activity>
<activity
android:name=
".MainActivity"
>
<activity
android:name=
".MainActivity"
android:theme=
"@style/AppTheme.appbar"
>
</activity>
...
...
app/src/main/java/com/yono/messeripos/MainActivity.java
View file @
e1fb7923
...
...
@@ -7,24 +7,26 @@ 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
;
import
androidx.core.content.ContextCompat
;
import
androidx.lifecycle.ViewModelProviders
;
import
com.google.android.material.appbar.MaterialToolbar
;
import
com.yono.messeripos.models.MainViewModels
;
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
);
...
...
@@ -37,13 +39,17 @@ 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
));
}
return
true
;
}
});
MainViewModels
mainViewModels
=
ViewModelProviders
.
of
(
this
).
get
(
MainViewModels
.
class
);
mainViewModels
.
getProduct
();
mainViewModels
.
getCategory
();
}
}
\ No newline at end of file
app/src/main/java/com/yono/messeripos/SplashScreen.java
View file @
e1fb7923
...
...
@@ -4,14 +4,22 @@ import android.content.Intent;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.os.Looper
;
import
android.view.animation.Animation
;
import
android.view.animation.AnimationUtils
;
import
android.widget.ImageView
;
import
androidx.appcompat.app.AppCompatActivity
;
public
class
SplashScreen
extends
AppCompatActivity
{
ImageView
img
;
@Override
public
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_splash
);
img
=
findViewById
(
R
.
id
.
image_splash
);
Animation
animation
=
AnimationUtils
.
loadAnimation
(
getApplicationContext
(),
R
.
anim
.
zoom_in
);
img
.
startAnimation
(
animation
);
new
Handler
(
Looper
.
getMainLooper
()).
postDelayed
(()->{
startActivity
(
new
Intent
(
SplashScreen
.
this
,
MainActivity
.
class
));
...
...
app/src/main/java/com/yono/messeripos/adapter/CartAdapter.java
0 → 100644
View file @
e1fb7923
package
com
.
yono
.
messeripos
.
adapter
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
androidx.annotation.NonNull
;
import
androidx.recyclerview.widget.RecyclerView
;
public
class
CartAdapter
extends
RecyclerView
.
Adapter
<
CartAdapter
.
MyViewHolder
>
{
@NonNull
@Override
public
CartAdapter
.
MyViewHolder
onCreateViewHolder
(
@NonNull
ViewGroup
parent
,
int
viewType
)
{
return
null
;
}
@Override
public
void
onBindViewHolder
(
@NonNull
CartAdapter
.
MyViewHolder
holder
,
int
position
)
{
}
@Override
public
int
getItemCount
()
{
return
0
;
}
public
class
MyViewHolder
extends
RecyclerView
.
ViewHolder
{
public
MyViewHolder
(
@NonNull
View
itemView
)
{
super
(
itemView
);
}
}
}
app/src/main/java/com/yono/messeripos/adapter/CategoryAdapter.java
0 → 100644
View file @
e1fb7923
package
com
.
yono
.
messeripos
.
adapter
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
androidx.annotation.NonNull
;
import
androidx.recyclerview.widget.RecyclerView
;
public
class
CategoryAdapter
extends
RecyclerView
.
Adapter
<
CategoryAdapter
.
MyViewHolder
>
{
@NonNull
@Override
public
CategoryAdapter
.
MyViewHolder
onCreateViewHolder
(
@NonNull
ViewGroup
parent
,
int
viewType
)
{
return
null
;
}
@Override
public
void
onBindViewHolder
(
@NonNull
CategoryAdapter
.
MyViewHolder
holder
,
int
position
)
{
}
@Override
public
int
getItemCount
()
{
return
0
;
}
public
class
MyViewHolder
extends
RecyclerView
.
ViewHolder
{
public
MyViewHolder
(
@NonNull
View
itemView
)
{
super
(
itemView
);
}
}
}
app/src/main/java/com/yono/messeripos/adapter/ProductAdapter.java
0 → 100644
View file @
e1fb7923
package
com
.
yono
.
messeripos
.
adapter
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
androidx.annotation.NonNull
;
import
androidx.recyclerview.widget.RecyclerView
;
public
class
ProductAdapter
extends
RecyclerView
.
Adapter
<
ProductAdapter
.
MyViewHolder
>
{
@NonNull
@Override
public
ProductAdapter
.
MyViewHolder
onCreateViewHolder
(
@NonNull
ViewGroup
parent
,
int
viewType
)
{
return
null
;
}
@Override
public
void
onBindViewHolder
(
@NonNull
ProductAdapter
.
MyViewHolder
holder
,
int
position
)
{
}
@Override
public
int
getItemCount
()
{
return
0
;
}
public
class
MyViewHolder
extends
RecyclerView
.
ViewHolder
{
public
MyViewHolder
(
@NonNull
View
itemView
)
{
super
(
itemView
);
}
}
}
app/src/main/java/com/yono/messeripos/api/ApiHelper.java
View file @
e1fb7923
package
com
.
yono
.
messeripos
.
api
;
import
retrofit2.Retrofit
;
import
retrofit2.converter.gson.GsonConverterFactory
;
public
class
ApiHelper
{
public
static
final
String
BASE_URL
=
"https://rest-api-meser.herokuapp.com/"
;
public
static
final
String
VERSI_API_1
=
"api/v1/"
;
public
static
Retrofit
request
(
String
baseUrl
){
Retrofit
retrofit
=
new
Retrofit
.
Builder
()
.
baseUrl
(
baseUrl
)
.
addConverterFactory
(
GsonConverterFactory
.
create
())
.
build
();
return
retrofit
;
}
}
app/src/main/java/com/yono/messeripos/api/client/Client.java
0 → 100644
View file @
e1fb7923
package
com
.
yono
.
messeripos
.
api
.
client
;
import
com.yono.messeripos.api.ApiHelper
;
public
class
Client
{
public
<
T
>
T
Client
(
Class
<
T
>
service
){
return
ApiHelper
.
request
(
ApiHelper
.
BASE_URL
).
create
(
service
);
}
}
app/src/main/java/com/yono/messeripos/api/service/CategoryServise.java
0 → 100644
View file @
e1fb7923
package
com
.
yono
.
messeripos
.
api
.
service
;
import
com.yono.messeripos.api.ApiHelper
;
import
com.yono.messeripos.models.CategoryModels
;
import
com.yono.messeripos.response.DataResponse
;
import
java.util.List
;
import
retrofit2.Call
;
import
retrofit2.http.GET
;
public
interface
CategoryServise
{
@GET
(
ApiHelper
.
VERSI_API_1
+
"categories"
)
Call
<
DataResponse
<
List
<
CategoryModels
>>>
getCategory
();
}
app/src/main/java/com/yono/messeripos/api/service/ProductService.java
0 → 100644
View file @
e1fb7923
package
com
.
yono
.
messeripos
.
api
.
service
;
import
com.yono.messeripos.api.ApiHelper
;
import
com.yono.messeripos.models.CategoryModels
;
import
com.yono.messeripos.models.ProductModels
;
import
com.yono.messeripos.response.DataResponse
;
import
java.util.List
;
import
retrofit2.Call
;
import
retrofit2.http.GET
;
public
interface
ProductService
{
@GET
(
ApiHelper
.
VERSI_API_1
+
"products-join"
)
Call
<
DataResponse
<
List
<
ProductModels
<
CategoryModels
>>>>
getProducts
();
}
app/src/main/java/com/yono/messeripos/daos/CartDaos.java
0 → 100644
View file @
e1fb7923
package
com
.
yono
.
messeripos
.
daos
;
import
androidx.room.Dao
;
@Dao
public
interface
CartDaos
{
}
app/src/main/java/com/yono/messeripos/database/LocalDatabase.java
0 → 100644
View file @
e1fb7923
package
com
.
yono
.
messeripos
.
database
;
import
androidx.room.Database
;
import
androidx.room.RoomDatabase
;
import
com.yono.messeripos.daos.CartDaos
;
import
com.yono.messeripos.models.ProductCartModels
;
@Database
(
entities
=
{
ProductCartModels
.
class
},
version
=
1
,
exportSchema
=
false
)
public
abstract
class
LocalDatabase
extends
RoomDatabase
{
public
abstract
CartDaos
cartDaos
();
private
static
volatile
LocalDatabase
INSTANCE
;
private
static
final
int
NUMBER_OF_THREADS
=
407
;
}
app/src/main/java/com/yono/messeripos/models/CartModels.java
0 → 100644
View file @
e1fb7923
package
com
.
yono
.
messeripos
.
models
;
import
com.google.gson.annotations.SerializedName
;
public
class
CartModels
<
T
>
{
@SerializedName
(
"id"
)
private
String
idOrders
;
@SerializedName
(
"products"
)
private
T
dataOrders
;
public
String
getIdOrders
()
{
return
idOrders
;
}
public
void
setIdOrders
(
String
idOrders
)
{
this
.
idOrders
=
idOrders
;
}
public
T
getDataOrders
()
{
return
dataOrders
;
}
public
void
setDataOrders
(
T
dataOrders
)
{
this
.
dataOrders
=
dataOrders
;
}
}
app/src/main/java/com/yono/messeripos/models/CategoryModels.java
0 → 100644
View file @
e1fb7923
package
com
.
yono
.
messeripos
.
models
;
import
com.google.gson.annotations.SerializedName
;
public
class
CategoryModels
{
@SerializedName
(
"id"
)
private
int
idCategory
;
@SerializedName
(
"name"
)
private
String
nameCategory
;
public
int
getIdCategory
()
{
return
idCategory
;
}
public
void
setIdCategory
(
int
idCategory
)
{
this
.
idCategory
=
idCategory
;
}
public
String
getNameCategory
()
{
return
nameCategory
;
}
public
void
setNameCategory
(
String
nameCategory
)
{
this
.
nameCategory
=
nameCategory
;
}
}
app/src/main/java/com/yono/messeripos/models/MainViewModels.java
0 → 100644
View file @
e1fb7923
package
com
.
yono
.
messeripos
.
models
;
import
android.util.Log
;
import
androidx.lifecycle.MutableLiveData
;
import
androidx.lifecycle.ViewModel
;
import
com.google.gson.Gson
;
import
com.yono.messeripos.api.client.Client
;
import
com.yono.messeripos.api.service.CategoryServise
;
import
com.yono.messeripos.api.service.ProductService
;
import
com.yono.messeripos.response.DataResponse
;
import
java.util.ArrayList
;
import
java.util.List
;
import
retrofit2.Call
;
import
retrofit2.Callback
;
import
retrofit2.Response
;
public
class
MainViewModels
extends
ViewModel
{
MutableLiveData
<
DataResponse
<
List
<
ProductModels
<
List
<
CategoryModels
>>>>>
productList
;
MutableLiveData
<
DataResponse
<
List
<
CategoryModels
>>>
categoryList
;
Client
client
=
new
Client
();
public
MainViewModels
(){
productList
=
new
MutableLiveData
<>();}
public
MutableLiveData
<
DataResponse
<
List
<
ProductModels
<
List
<
CategoryModels
>>>>>
getProduct
(){
getProductList
();
return
productList
;
}
public
MutableLiveData
<
DataResponse
<
List
<
CategoryModels
>>>
getCategory
(){
getCategoryList
();
return
categoryList
;
}
private
void
getProductList
()
{
ProductService
productService
=
client
.
Client
(
ProductService
.
class
);
productService
.
getProducts
().
enqueue
(
new
Callback
<
DataResponse
<
List
<
ProductModels
<
CategoryModels
>>>>()
{
@Override
public
void
onResponse
(
Call
<
DataResponse
<
List
<
ProductModels
<
CategoryModels
>>>>
call
,
Response
<
DataResponse
<
List
<
ProductModels
<
CategoryModels
>>>>
response
)
{
String
js
=
new
Gson
().
toJson
(
response
.
body
());
Log
.
d
(
"Get Data"
,
"Response "
+
js
);
}
@Override
public
void
onFailure
(
Call
<
DataResponse
<
List
<
ProductModels
<
CategoryModels
>>>>
call
,
Throwable
t
)
{
Log
.
e
(
"Error get product"
,
"Response "
+
t
.
getMessage
());
}
});
}
private
void
getCategoryList
(){
CategoryServise
categoryServise
=
client
.
Client
(
CategoryServise
.
class
);
categoryServise
.
getCategory
().
enqueue
(
new
Callback
<
DataResponse
<
List
<
CategoryModels
>>>()
{
@Override
public
void
onResponse
(
Call
<
DataResponse
<
List
<
CategoryModels
>>>
call
,
Response
<
DataResponse
<
List
<
CategoryModels
>>>
response
)
{
String
js
=
new
Gson
().
toJson
(
response
.
body
());
Log
.
d
(
"Get Data Category"
,
"Response "
+
js
);
}
@Override
public
void
onFailure
(
Call
<
DataResponse
<
List
<
CategoryModels
>>>
call
,
Throwable
t
)
{
Log
.
e
(
"Error get product"
,
"Response "
+
t
.
getMessage
());
}
});
}
}
app/src/main/java/com/yono/messeripos/models/ProductCartModels.java
0 → 100644
View file @
e1fb7923
package
com
.
yono
.
messeripos
.
models
;
import
android.os.Parcel
;
import
android.os.Parcelable
;
import
androidx.room.Entity
;
import
androidx.room.PrimaryKey
;
import
com.google.gson.annotations.SerializedName
;
@Entity
(
tableName
=
"carts"
)
public
class
ProductCartModels
implements
Parcelable
{
@PrimaryKey
(
autoGenerate
=
true
)
@SerializedName
(
"id"
)
private
long
id
;
@SerializedName
(
"id_orders"
)
private
int
id_orders
;
@SerializedName
(
"quantity"
)
private
long
quantity_orders
;
@SerializedName
(
"product_id"
)
private
int
id_product_orders
;
@SerializedName
(
"product_name"
)
private
String
product_name_orders
;
@SerializedName
(
"price"
)
private
long
price_orders
;
@SerializedName
(
"grand_total"
)
private
int
grand_total_orders
;
public
ProductCartModels
(
long
id
,
int
id_orders
,
long
quantity_orders
,
int
id_product_orders
,
String
product_name_orders
,
long
price_orders
,
int
grand_total_orders
)
{
this
.
id
=
id
;
this
.
id_orders
=
id_orders
;
this
.
quantity_orders
=
quantity_orders
;
this
.
id_product_orders
=
id_product_orders
;
this
.
product_name_orders
=
product_name_orders
;
this
.
price_orders
=
price_orders
;
this
.
grand_total_orders
=
grand_total_orders
;
}
protected
ProductCartModels
(
Parcel
in
)
{
id
=
in
.
readLong
();
id_orders
=
in
.
readInt
();
quantity_orders
=
in
.
readLong
();
id_product_orders
=
in
.
readInt
();
product_name_orders
=
in
.
readString
();
price_orders
=
in
.
readLong
();
grand_total_orders
=
in
.
readInt
();
}
public
static
final
Creator
<
ProductCartModels
>
CREATOR
=
new
Creator
<
ProductCartModels
>()
{
@Override
public
ProductCartModels
createFromParcel
(
Parcel
in
)
{
return
new
ProductCartModels
(
in
);
}
@Override
public
ProductCartModels
[]
newArray
(
int
size
)
{
return
new
ProductCartModels
[
size
];
}
};
@Override
public
int
describeContents
()
{
return
0
;
}
@Override
public
void
writeToParcel
(
Parcel
parcel
,
int
i
)
{
parcel
.
writeLong
(
id
);
parcel
.
writeInt
(
id_orders
);
parcel
.
writeLong
(
quantity_orders
);
parcel
.
writeLong
(
price_orders
);
parcel
.
writeString
(
product_name_orders
);
parcel
.
writeInt
(
grand_total_orders
);
}
public
long
getId
()
{
return
id
;
}
public
void
setId
(
long
id
)
{
this
.
id
=
id
;
}
public
int
getId_orders
()
{
return
id_orders
;
}
public
void
setId_orders
(
int
id_orders
)
{
this
.
id_orders
=
id_orders
;
}
public
long
getQuantity_orders
()
{
return
quantity_orders
;
}
public
void
setQuantity_orders
(
long
quantity_orders
)
{
this
.
quantity_orders
=
quantity_orders
;
}
public
int
getId_product_orders
()
{
return
id_product_orders
;
}
public
void
setId_product_orders
(
int
id_product_orders
)
{
this
.
id_product_orders
=
id_product_orders
;
}
public
String
getProduct_name_orders
()
{
return
product_name_orders
;
}
public
void
setProduct_name_orders
(
String
product_name_orders
)
{
this
.
product_name_orders
=
product_name_orders
;
}
public
long
getPrice_orders
()
{
return
price_orders
;
}
public
void
setPrice_orders
(
long
price_orders
)
{
this
.
price_orders
=
price_orders
;
}
public
int
getGrand_total_orders
()
{
return
grand_total_orders
;
}
public
void
setGrand_total_orders
(
int
grand_total_orders
)
{
this
.
grand_total_orders
=
grand_total_orders
;
}
}
app/src/main/java/com/yono/messeripos/models/ProductModels.java
View file @
e1fb7923
...
...
@@ -2,11 +2,11 @@ package com.yono.messeripos.models;
import
com.google.gson.annotations.SerializedName
;
public
class
ProductModels
{
@SerializedName
(
"id
_product
"
)
public
class
ProductModels
<
T
>
{
@SerializedName
(
"id"
)
private
int
idProduct
;
@SerializedName
(
"
product_
name"
)
@SerializedName
(
"name"
)
private
String
productName
;
@SerializedName
(
"price"
)
...
...
@@ -14,4 +14,47 @@ public class ProductModels {
@SerializedName
(
"stock"
)
private
int
stockProduct
;
@SerializedName
(
"category"
)
private
T
categoryProduct
;
public
int
getIdProduct
()
{
return
idProduct
;
}
public
void
setIdProduct
(
int
idProduct
)
{
this
.
idProduct
=
idProduct
;
}
public
String
getProductName
()
{
return
productName
;
}
public
void
setProductName
(
String
productName
)
{
this
.
productName
=
productName
;
}
public
int
getPriceProduct
()
{
return
priceProduct
;
}
public
void
setPriceProduct
(
int
priceProduct
)
{
this
.
priceProduct
=
priceProduct
;
}
public
int
getStockProduct
()
{
return
stockProduct
;
}
public
void
setStockProduct
(
int
stockProduct
)
{
this
.
stockProduct
=
stockProduct
;
}
public
T
getCategoryProduct
()
{
return
categoryProduct
;
}
public
void
setCategoryProduct
(
T
categoryProduct
)
{
this
.
categoryProduct
=
categoryProduct
;
}
}
app/src/main/java/com/yono/messeripos/models/UsersModels.java
0 → 100644
View file @
e1fb7923
package
com
.
yono
.
messeripos
.
models
;
import
com.google.gson.annotations.SerializedName
;
public
class
UsersModels
{
@SerializedName
(
"username"
)
private
String
usernameUsers
;
@SerializedName
(
"password"
)
private
String
passwordUsers
;
public
String
getUsernameUsers
()
{
return
usernameUsers
;
}
public
void
setUsernameUsers
(
String
usernameUsers
)
{
this
.
usernameUsers
=
usernameUsers
;
}
public
String
getPasswordUsers
()
{
return
passwordUsers
;
}
public
void
setPasswordUsers
(
String
passwordUsers
)
{
this
.
passwordUsers
=
passwordUsers
;
}
}
app/src/main/java/com/yono/messeripos/response/DataResponse.java
View file @
e1fb7923
package
com
.
yono
.
messeripos
.
response
;
import
androidx.appcompat.app.AppCompatActivity
;
import
com.google.gson.annotations.SerializedName
;
public
class
DataResponse
<
T
>
{
...
...
@@ -7,13 +9,12 @@ public class DataResponse<T> {
@SerializedName
(
"status"
)
private
Boolean
statusData
;
@SerializedName
(
"message
s
"
)
@SerializedName
(
"message"
)
private
String
messageData
;
@SerializedName
(
"data"
)
private
T
data
;
public
Boolean
getStatusData
()
{
return
statusData
;
}
...
...
app/src/main/res/anim/zoom_in.xml
0 → 100644
View file @
e1fb7923
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<scale
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:duration=
"1000"
android:fromXScale=
"2"
android:fromYScale=
"2"
android:pivotX=
"50%"
android:pivotY=
"50%"
android:toXScale=
"4"
android:toYScale=
"4"
>
</scale>
</set>
app/src/main/res/layout/activity_login.xml
0 → 100644
View file @
e1fb7923
<?xml version="1.0" encoding="utf-8"?>
<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=
"@color/colorPrimaryDark"
>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/activity_main.xml
View file @
e1fb7923
...
...
@@ -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
android:id=
"@+id/topAppBar"
<include
android:id=
"@+id/topBar"
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>
</com.google.android.material.appbar.AppBarLayout>
<include
android:id=
"@+id/category"
android:layout_marginTop=
"10dp"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:layout_constraintTop_toBottomOf=
"@+id/topBar"
layout=
"@layout/item_category"
/>
<!-- 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"
>
<!-- 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/activity_splash.xml
View file @
e1fb7923
...
...
@@ -6,6 +6,7 @@
android:background=
"@color/colorPrimaryDark"
>
<ImageView
android:id=
"@+id/image_splash"
android:layout_width=
"100dp"
android:layout_height=
"100dp"
android:src=
"@drawable/ic_meser_icon"
...
...
app/src/main/res/layout/appbar_dashboard.xml
0 → 100644
View file @
e1fb7923
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.appbar.AppBarLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:paddingStart=
"15dp"
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<com.google.android.material.appbar.MaterialToolbar
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"
/>
</com.google.android.material.appbar.MaterialToolbar>
</com.google.android.material.appbar.AppBarLayout>
app/src/main/res/layout/item_category.xml
0 → 100644
View file @
e1fb7923
<?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 @
e1fb7923
<?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=
"@color/colorPrimary"
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