Skip to content

Commit

Permalink
Implement checkout UI
Browse files Browse the repository at this point in the history
  • Loading branch information
andraantariksa committed Apr 21, 2022
1 parent 033e799 commit 48d81fc
Show file tree
Hide file tree
Showing 22 changed files with 449 additions and 146 deletions.
9 changes: 6 additions & 3 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class CouponsActivity : AppCompatActivity() {

val dividerItemDecoration = DividerItemDecoration(this, DividerItemDecoration.VERTICAL)
dividerItemDecoration.setDrawable(
ContextCompat.getDrawable(this, R.drawable.divider8dp)!!
ContextCompat.getDrawable(this, R.drawable.spacer8dp)!!
);
binding.recyclerViewCoupons.apply {
addItemDecoration(dividerItemDecoration)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class HistoryOrderFragment : Fragment() {
val dividerItemDecoration =
DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL)
dividerItemDecoration.setDrawable(
ContextCompat.getDrawable(requireContext(), R.drawable.divider8dp)!!
ContextCompat.getDrawable(requireContext(), R.drawable.spacer8dp)!!
);
binding.recyclerViewHistoryOrder.apply {
addItemDecoration(dividerItemDecoration)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ class StoreFragment : Fragment() {
val dividerItemDecoration =
DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL)
dividerItemDecoration.setDrawable(
ContextCompat.getDrawable(requireContext(), R.drawable.divider8dp)!!
ContextCompat.getDrawable(requireContext(), R.drawable.spacer8dp)!!
);

binding.apply {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package id.shaderboi.koffie.ui.main.store.adapter

import android.graphics.Paint
import android.graphics.Typeface
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
Expand Down Expand Up @@ -40,7 +41,10 @@ class ProductsAdapter(
textViewPrice.text = numberFormatter.format(product.price)
product.discount?.let { discount ->
textViewDiscounted.text = numberFormatter.format(product.price - discount)
textViewPrice.paintFlags = textViewPrice.paintFlags or Paint.STRIKE_THRU_TEXT_FLAG
textViewPrice.apply {
setTypeface(null, Typeface.NORMAL)
paintFlags = textViewPrice.paintFlags or Paint.STRIKE_THRU_TEXT_FLAG
}
}

Picasso.get()
Expand Down
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/horizontal_divider8dp.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<inset xmlns:android="http:https://schemas.android.com/apk/res/android"
android:insetTop="4dp"
android:insetBottom="4dp">
<shape>
<size android:height="1dp" />
<solid android:color="@color/onBackground" />
</shape>
</inset>
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 48d81fc

Please sign in to comment.