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
799b9512
Commit
799b9512
authored
Aug 26, 2020
by
Muhammad Suryono
Browse files
Options
Browse Files
Download
Plain Diff
Fix merge with dashboard fadli and iman daiman abadan
parents
6ea65ccb
38ca79bc
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
230 additions
and
16 deletions
+230
-16
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+10
-5
CartActivity.java
app/src/main/java/com/yono/messeripos/CartActivity.java
+11
-1
FormProductActivity.java
...rc/main/java/com/yono/messeripos/FormProductActivity.java
+29
-1
InvoiceActivity.java
app/src/main/java/com/yono/messeripos/InvoiceActivity.java
+14
-0
PaymentActivity.java
app/src/main/java/com/yono/messeripos/PaymentActivity.java
+4
-3
bill.png
app/src/main/res/drawable/bill.png
+0
-0
activity_invoice.xml
app/src/main/res/layout/activity_invoice.xml
+59
-0
activity_payment.xml
app/src/main/res/layout/activity_payment.xml
+99
-3
payment_list.xml
app/src/main/res/layout/payment_list.xml
+3
-3
strings.xml
app/src/main/res/values/strings.xml
+1
-0
No files found.
app/src/main/AndroidManifest.xml
View file @
799b9512
...
...
@@ -3,8 +3,8 @@
package=
"com.yono.messeripos"
>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.READ_EXTERNAL_STORAGE"
/>
<uses-permission
android:name=
"android.permission.WRITE_EXTERNAL_STORAGE"
/>
<uses-permission
android:name=
"android.permission.READ_EXTERNAL_STORAGE"
/>
<uses-permission
android:name=
"android.permission.WRITE_EXTERNAL_STORAGE"
/>
<uses-feature
android:name=
"android.hardware.camera"
...
...
@@ -17,14 +17,19 @@
android:roundIcon=
"@mipmap/ic_launcher"
android:supportsRtl=
"true"
android:theme=
"@style/AppTheme.appbar"
>
<activity
android:name=
".LoginActivity"
android:theme=
"@style/AppTheme.appbar"
/>
<activity
android:name=
".InvoiceActivity"
></activity>
<activity
android:name=
".LoginActivity"
android:theme=
"@style/AppTheme.appbar"
/>
<activity
android:name=
".PaymentActivity"
android:theme=
"@style/AppTheme.appbar"
/>
<activity
android:name=
".CartActivity"
android:theme=
"@style/AppTheme.appbar"
/>
<activity
android:name=
".ProductActivity"
android:theme=
"@style/AppTheme.appbar"
/>
<activity
android:name=
".ProductActivity"
android:theme=
"@style/AppTheme.appbar"
/>
<activity
android:name=
".SplashScreen"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
...
...
@@ -44,7 +49,7 @@
android:grantUriPermissions=
"true"
>
<meta-data
android:name=
"android.support.FILE_PROVIDER_PATHS"
android:resource=
"@xml/path"
/>
android:resource=
"@xml/path"
/>
</provider>
<meta-data
...
...
app/src/main/java/com/yono/messeripos/CartActivity.java
View file @
799b9512
...
...
@@ -102,7 +102,6 @@ public class CartActivity extends AppCompatActivity {
}
});
btnCheckout
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
...
...
@@ -128,6 +127,17 @@ public class CartActivity extends AppCompatActivity {
}
});
btnCheckout
=
findViewById
(
R
.
id
.
btCheckout
);
//
btnCheckout
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
startActivity
(
new
Intent
(
CartActivity
.
this
,
PaymentActivity
.
class
));
finish
();
}
});
}
}
...
...
app/src/main/java/com/yono/messeripos/FormProductActivity.java
View file @
799b9512
...
...
@@ -13,9 +13,12 @@ import android.os.PersistableBundle;
import
android.provider.MediaStore
;
import
android.provider.Settings
;
import
android.util.Log
;
import
android.view.View
;
import
android.view.Window
;
import
android.view.WindowManager
;
import
android.widget.ImageView
;
import
android.widget.AdapterView
;
import
android.widget.ArrayAdapter
;
import
android.widget.Spinner
;
import
android.widget.Toast
;
import
androidx.annotation.NonNull
;
...
...
@@ -33,6 +36,7 @@ import com.yono.messeripos.models.ProductModels;
import
java.io.File
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.List
;
public
class
FormProductActivity
extends
AppCompatActivity
{
...
...
@@ -42,6 +46,12 @@ public class FormProductActivity extends AppCompatActivity {
private
static
final
int
REQUEST_IMAGE_CAPTURE
=
1
;
private
static
final
int
REQUEST_PERMISSIONS
=
448
;
private
boolean
isUpdate
=
false
;
private
Spinner
splistCategory
;
String
kondisi_spin
;
private
String
[]
default_category
=
{
"--pilih category--"
,
};
@Override
public
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
...
...
@@ -66,6 +76,23 @@ public class FormProductActivity extends AppCompatActivity {
binding
.
cvProduct
.
setOnClickListener
(
view
->
openFile
());
binding
.
btnAdd
.
setOnClickListener
(
view
->
saveProduct
());
//spinner
final
ArrayAdapter
<
String
>
adapter
=
new
ArrayAdapter
<>(
this
,
android
.
R
.
layout
.
simple_spinner_item
,
default_category
);
splistCategory
=
findViewById
(
R
.
id
.
listCategory
);
splistCategory
.
setAdapter
(
adapter
);
splistCategory
.
setOnItemSelectedListener
(
new
AdapterView
.
OnItemSelectedListener
()
{
@Override
public
void
onItemSelected
(
AdapterView
<?>
adapterView
,
View
view
,
int
i
,
long
l
)
{
kondisi_spin
=
splistCategory
.
getSelectedItem
().
toString
();
}
@Override
public
void
onNothingSelected
(
AdapterView
<?>
adapterView
)
{
}
});
}
...
...
@@ -152,4 +179,5 @@ public class FormProductActivity extends AppCompatActivity {
cursor
.
close
();
return
result
;
}
}
app/src/main/java/com/yono/messeripos/InvoiceActivity.java
0 → 100644
View file @
799b9512
package
com
.
yono
.
messeripos
;
import
androidx.appcompat.app.AppCompatActivity
;
import
android.os.Bundle
;
public
class
InvoiceActivity
extends
AppCompatActivity
{
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_invoice
);
}
}
\ No newline at end of file
app/src/main/java/com/yono/messeripos/PaymentActivity.java
View file @
799b9512
...
...
@@ -4,6 +4,7 @@ import androidx.appcompat.app.AppCompatActivity;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
android.content.Intent
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.view.View
;
...
...
@@ -22,9 +23,8 @@ import java.util.ArrayList;
public
class
PaymentActivity
extends
AppCompatActivity
{
private
ArrayList
<
PaymentResponse
>
paymentResponses
=
new
ArrayList
<>();
Button
btnPay
;
public
static
String
methodPay
=
""
;
private
Button
btnPay
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
...
...
@@ -71,4 +71,5 @@ public class PaymentActivity extends AppCompatActivity {
}
});
}
}
\ No newline at end of file
}
app/src/main/res/drawable/bill.png
0 → 100644
View file @
799b9512
13.9 KB
app/src/main/res/layout/activity_invoice.xml
0 → 100644
View file @
799b9512
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
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_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/ic_launcher_new_icon_background"
tools:context=
".InvoiceActivity"
>
<com.google.android.material.textfield.TextInputLayout
android:id=
"@+id/tilInvoice"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
tools:ignore=
"MissingConstraints"
>
<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:textSize=
"24sp"
app:layout_constraintStart_toStartOf=
"parent"
android:text=
"Invoice"
android:textColor=
"@color/colorWhite"
app:layout_constraintTop_toTopOf=
"parent"
/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.card.MaterialCardView
android:id=
"@+id/cvInvoice"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:padding=
"12sp"
app:cardCornerRadius=
"20dp"
app:layout_constraintTop_toBottomOf=
"@+id/tilInvoice"
tools:ignore=
"MissingConstraints"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"600dp"
>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.button.MaterialButton
android:id=
"@+id/btCheckout"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"@string/title_checkout"
android:padding=
"15dp"
android:textSize=
"16sp"
android:layout_margin=
"10dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/activity_payment.xml
View file @
799b9512
...
...
@@ -12,15 +12,111 @@
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
/>
<com.google.android.material.card.MaterialCardView
android:id=
"@+id/cvInvoice"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:padding=
"12dp"
android:layout_margin=
"16dp"
app:cardCornerRadius=
"20dp"
android:scrollbars=
"vertical"
app:layout_constraintTop_toBottomOf=
"@+id/appbar"
tools:ignore=
"MissingConstraints"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"300dp"
>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tvBilling"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"16dp"
android:fontFamily=
"@font/roboto"
android:textAlignment=
"center"
android:textSize=
"24sp"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
tools:text=
"@string/hint_billing"
/>
<ImageView
android:id=
"@+id/image_splash"
android:layout_width=
"50dp"
android:layout_height=
"50dp"
android:src=
"@drawable/bill"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tvBilling"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tvBillingProduct"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"16dp"
android:fontFamily=
"@font/roboto"
android:textAlignment=
"center"
android:textSize=
"14sp"
app:layout_constraintTop_toBottomOf=
"@+id/image_splash"
tools:text=
"@string/hint_product_name"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tvBillingPrice"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"16dp"
android:fontFamily=
"@font/roboto"
android:textAlignment=
"center"
android:textSize=
"14sp"
app:layout_constraintTop_toBottomOf=
"@+id/tvBillingProduct"
tools:text=
"@string/hint_price"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tvBillingQuantity"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"16dp"
android:fontFamily=
"@font/roboto"
android:textAlignment=
"center"
android:textSize=
"14sp"
app:layout_constraintTop_toBottomOf=
"@+id/tvBillingPrice"
tools:text=
"@string/hint_quantity"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tvBillingCategory"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"16dp"
android:fontFamily=
"@font/roboto"
android:textAlignment=
"center"
android:textSize=
"14sp"
app:layout_constraintTop_toBottomOf=
"@+id/tvBillingQuantity"
tools:text=
"@string/hint_category"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tvBillingDesc"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"16dp"
android:fontFamily=
"@font/roboto"
android:textAlignment=
"center"
android:textSize=
"14sp"
app:layout_constraintTop_toBottomOf=
"@+id/tvBillingCategory"
tools:text=
"@string/hint_description"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rvPayment"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
a
pp:layout_constraintTop_toBottomOf=
"@id/appba
r"
/>
a
ndroid:overScrollMode=
"neve
r"
app:layout_constraintTop_toBottomOf=
"@id/cvInvoice"
/>
<com.google.android.material.button.MaterialButton
android:id=
"@+id/btnPay"
...
...
app/src/main/res/layout/payment_list.xml
View file @
799b9512
...
...
@@ -32,7 +32,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"
wrap_content
"
android:layout_height=
"
60dp
"
android:padding=
"15dp"
>
<View
...
...
@@ -49,8 +49,8 @@
<ImageView
android:id=
"@+id/ivLogo"
android:layout_width=
"1
31
dp"
android:layout_height=
"
39
dp"
android:layout_width=
"1
20
dp"
android:layout_height=
"
40
dp"
android:src=
"@drawable/ic_bni_logo"
app:logo_bank=
"@{logo}"
app:layout_constraintStart_toStartOf=
"parent"
...
...
app/src/main/res/values/strings.xml
View file @
799b9512
...
...
@@ -22,5 +22,6 @@
<string
name=
"price"
>
Price
</string>
<string
name=
"stock"
>
Stock
</string>
<string
name=
"add"
>
Add
</string>
<string
name=
"hint_billing"
>
Billing
</string>
</resources>
\ 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