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
f562c45b
Commit
f562c45b
authored
Aug 26, 2020
by
iman Fauzi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix button redirect to payment
parent
037f62b8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
CartActivity.java
app/src/main/java/com/yono/messeripos/CartActivity.java
+11
-11
CartAdapter.java
...rc/main/java/com/yono/messeripos/adapter/CartAdapter.java
+2
-0
No files found.
app/src/main/java/com/yono/messeripos/CartActivity.java
View file @
f562c45b
...
@@ -18,6 +18,7 @@ import android.view.Window;
...
@@ -18,6 +18,7 @@ import android.view.Window;
import
android.view.WindowManager
;
import
android.view.WindowManager
;
import
android.widget.Adapter
;
import
android.widget.Adapter
;
import
android.widget.ArrayAdapter
;
import
android.widget.ArrayAdapter
;
import
android.widget.Button
;
import
android.widget.Filter
;
import
android.widget.Filter
;
import
android.widget.ImageButton
;
import
android.widget.ImageButton
;
import
android.widget.TextView
;
import
android.widget.TextView
;
...
@@ -57,6 +58,7 @@ public class CartActivity extends AppCompatActivity {
...
@@ -57,6 +58,7 @@ public class CartActivity extends AppCompatActivity {
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_cart
);
setContentView
(
R
.
layout
.
activity_cart
);
Button
btnCheckout
;
Window
w
=
getWindow
();
Window
w
=
getWindow
();
w
.
setFlags
(
WindowManager
.
LayoutParams
.
FLAG_LAYOUT_NO_LIMITS
,
WindowManager
.
LayoutParams
.
FLAG_LAYOUT_NO_LIMITS
);
w
.
setFlags
(
WindowManager
.
LayoutParams
.
FLAG_LAYOUT_NO_LIMITS
,
WindowManager
.
LayoutParams
.
FLAG_LAYOUT_NO_LIMITS
);
...
@@ -70,6 +72,7 @@ public class CartActivity extends AppCompatActivity {
...
@@ -70,6 +72,7 @@ public class CartActivity extends AppCompatActivity {
recyclerView
=
findViewById
(
R
.
id
.
rvCart
);
recyclerView
=
findViewById
(
R
.
id
.
rvCart
);
cartAdapter
=
new
CartAdapter
();
cartAdapter
=
new
CartAdapter
();
btnCheckout
=
findViewById
(
R
.
id
.
btCheckout
);
LinearLayoutManager
llm
=
new
LinearLayoutManager
(
this
);
LinearLayoutManager
llm
=
new
LinearLayoutManager
(
this
);
recyclerView
.
setLayoutManager
(
llm
);
recyclerView
.
setLayoutManager
(
llm
);
...
@@ -112,7 +115,6 @@ public class CartActivity extends AppCompatActivity {
...
@@ -112,7 +115,6 @@ public class CartActivity extends AppCompatActivity {
@Override
@Override
public
void
onCheckout
(
ProductCartModels
productCartModels
)
{
public
void
onCheckout
(
ProductCartModels
productCartModels
)
{
}
}
});
});
...
@@ -149,15 +151,14 @@ public class CartActivity extends AppCompatActivity {
...
@@ -149,15 +151,14 @@ public class CartActivity extends AppCompatActivity {
// countTotal();
// countTotal();
// }
// }
// });
// });
//
// btnCheckout.setOnClickListener(new View.OnClickListener() {
btnCheckout
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
// @Override
@Override
// public void onClick(View view) {
public
void
onClick
(
View
view
)
{
// startActivity(new Intent(CartActivity.this, PaymentActivity.class));
startActivity
(
new
Intent
(
CartActivity
.
this
,
PaymentActivity
.
class
));
// finish();
}
// }
});
// });
}
// }
//
//
// private void countTotal() {
// private void countTotal() {
// int price = prices;
// int price = prices;
...
@@ -175,7 +176,6 @@ public class CartActivity extends AppCompatActivity {
...
@@ -175,7 +176,6 @@ public class CartActivity extends AppCompatActivity {
// return NumberFormat.getCurrencyInstance(ID);
// return NumberFormat.getCurrencyInstance(ID);
// }
// }
}
}
}
/**
/**
...
...
app/src/main/java/com/yono/messeripos/adapter/CartAdapter.java
View file @
f562c45b
...
@@ -109,6 +109,8 @@ public class CartAdapter extends RecyclerView.Adapter<CartAdapter.MyViewHolder>
...
@@ -109,6 +109,8 @@ public class CartAdapter extends RecyclerView.Adapter<CartAdapter.MyViewHolder>
binding
.
btMinus
.
setOnClickListener
(
view
->
{
binding
.
btMinus
.
setOnClickListener
(
view
->
{
listener
.
onUpdateQuantityMinus
(
cartModels
);
listener
.
onUpdateQuantityMinus
(
cartModels
);
});
});
}
}
}
}
}
}
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