Added cart icon on menu
This commit is contained in:
parent
9dddd4713c
commit
d7be6e4831
@ -4,6 +4,8 @@ import android.os.Bundle
|
||||
import android.support.v7.widget.LinearLayoutManager
|
||||
import android.text.Html
|
||||
import android.util.Log
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import kotlinx.android.synthetic.main.activity_product.*
|
||||
import kotlinx.android.synthetic.main.content_product.*
|
||||
@ -144,4 +146,25 @@ class ProductActivity : BaseActivity() {
|
||||
progressDialog.dismiss()
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
menuInflater.inflate(R.menu.home, menu)
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
return when (item.itemId) {
|
||||
R.id.action_filter -> {
|
||||
|
||||
true
|
||||
}
|
||||
|
||||
R.id.action_search -> {
|
||||
|
||||
true
|
||||
}
|
||||
else -> super.onOptionsItemSelected(item)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
10
app/src/main/res/drawable/baseline_remove_shopping_cart_24.xml
Executable file
10
app/src/main/res/drawable/baseline_remove_shopping_cart_24.xml
Executable file
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#ffffff"
|
||||
android:pathData="M22.73,22.73L2.77,2.77 2,2l-0.73,-0.73L0,2.54l4.39,4.39 2.21,4.66 -1.35,2.45c-0.16,0.28 -0.25,0.61 -0.25,0.96 0,1.1 0.9,2 2,2h7.46l1.38,1.38c-0.5,0.36 -0.83,0.95 -0.83,1.62 0,1.1 0.89,2 1.99,2 0.67,0 1.26,-0.33 1.62,-0.84L21.46,24l1.27,-1.27zM7.42,15c-0.14,0 -0.25,-0.11 -0.25,-0.25l0.03,-0.12 0.9,-1.63h2.36l2,2L7.42,15zM15.55,13c0.75,0 1.41,-0.41 1.75,-1.03l3.58,-6.49c0.08,-0.14 0.12,-0.31 0.12,-0.48 0,-0.55 -0.45,-1 -1,-1L6.54,4l9.01,9zM7,18c-1.1,0 -1.99,0.9 -1.99,2S5.9,22 7,22s2,-0.9 2,-2 -0.9,-2 -2,-2z"/>
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/baseline_shopping_cart_24.xml
Executable file
10
app/src/main/res/drawable/baseline_shopping_cart_24.xml
Executable file
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#ffffff"
|
||||
android:pathData="M7,18c-1.1,0 -1.99,0.9 -1.99,2S5.9,22 7,22s2,-0.9 2,-2 -0.9,-2 -2,-2zM1,2v2h2l3.6,7.59 -1.35,2.45c-0.16,0.28 -0.25,0.61 -0.25,0.96 0,1.1 0.9,2 2,2h12v-2L7.42,15c-0.14,0 -0.25,-0.11 -0.25,-0.25l0.03,-0.12 0.9,-1.63h7.45c0.75,0 1.41,-0.41 1.75,-1.03l3.58,-6.49c0.08,-0.14 0.12,-0.31 0.12,-0.48 0,-0.55 -0.45,-1 -1,-1L5.21,4l-0.94,-2L1,2zM17,18c-1.1,0 -1.99,0.9 -1.99,2s0.89,2 1.99,2 2,-0.9 2,-2 -0.9,-2 -2,-2z"/>
|
||||
</vector>
|
||||
@ -1,31 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="4dp"
|
||||
android:layout_marginRight="12dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/baseline_add_shopping_cart_24"
|
||||
android:tint="#ffffff"
|
||||
/>
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/baseline_shopping_cart_24"
|
||||
android:tint="#ffffff"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:text="1"
|
||||
android:id="@+id/tvCart_counter"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/circlular_menu"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:paddingTop="0dp"
|
||||
android:paddingLeft="0dp"
|
||||
android:layout_gravity="bottom|right"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:text="1"
|
||||
android:id="@+id/tvCart_counter"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/circlular_menu"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:paddingTop="0dp"
|
||||
android:paddingLeft="0dp"
|
||||
android:layout_gravity="bottom|right"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
|
||||
</FrameLayout>
|
||||
@ -9,7 +9,7 @@ public class Refund {
|
||||
private Metadata[] meta_data;
|
||||
private String date_created_gmt;
|
||||
private String id;
|
||||
private Line_item[] line_items;
|
||||
private LineItem[] line_items;
|
||||
private String refunded_payment;
|
||||
|
||||
public String getRefunded_by() {
|
||||
@ -77,11 +77,11 @@ public class Refund {
|
||||
this.refunded_payment = refunded_payment;
|
||||
}
|
||||
|
||||
public Line_item[] getLine_items() {
|
||||
public LineItem[] getLine_items() {
|
||||
return line_items;
|
||||
}
|
||||
|
||||
public void setLine_items(Line_item[] line_items) {
|
||||
public void setLine_items(LineItem[] line_items) {
|
||||
this.line_items = line_items;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user