cart screen
This commit is contained in:
4
app/src/main/res/drawable/ic_cancel_2.xml
Normal file
4
app/src/main/res/drawable/ic_cancel_2.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<vector android:height="24dp" android:viewportHeight="51.976"
|
||||
android:viewportWidth="51.976" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#ec1649" android:pathData="M44.37,7.6c-10.14,-10.14 -26.63,-10.14 -36.77,0c-10.14,10.14 -10.14,26.63 0,36.77s26.63,10.14 36.77,0C54.51,34.24 54.51,17.74 44.37,7.6zM36.24,36.24c-0.78,0.78 -2.05,0.78 -2.83,0l-7.43,-7.43l-7.78,7.78c-0.78,0.78 -2.05,0.78 -2.83,0c-0.78,-0.78 -0.78,-2.05 0,-2.83l7.78,-7.78l-7.43,-7.43c-0.78,-0.78 -0.78,-2.05 0,-2.83c0.78,-0.78 2.05,-0.78 2.83,0l7.43,7.43l7.07,-7.07c0.78,-0.78 2.05,-0.78 2.83,0c0.78,0.78 0.78,2.05 0,2.83l-7.07,7.07l7.43,7.43C37.02,34.19 37.02,35.46 36.24,36.24z"/>
|
||||
</vector>
|
||||
@@ -1,16 +1,100 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/cartFragmentMainLayout"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/actvity_default_background_color_1">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:id="@+id/noProductsOnCartTextView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Cart Fragment"
|
||||
android:layout_centerInParent="true"
|
||||
android:textColor="@color/black"/>
|
||||
android:text="@string/no_product_on_cart"
|
||||
android:textColor="@color/black"
|
||||
android:gravity="center_horizontal"
|
||||
android:textSize="16sp"
|
||||
android:padding="24dp"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/cartRecyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@+id/cartDividerSpace"/>
|
||||
|
||||
<android.support.v4.widget.Space
|
||||
android:id="@+id/cartDividerSpace"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="12dp"
|
||||
android:background="@color/red"
|
||||
android:layout_above="@+id/cartInfoLayout"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/cartInfoLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/white"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingStart="24dp"
|
||||
android:paddingRight="24dp"
|
||||
android:paddingEnd="24dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cartTotalLabelTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/black"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="TOTAL"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cartProductTotalTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="CHF 50.00"
|
||||
android:textSize="18sp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:textColor="@color/black"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/clearCartButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginRight="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="@string/clear_cart"
|
||||
style="@style/PizzalinkButtonWithoutMargin"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/continueCartButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:text="@string/continue_cart"
|
||||
style="@style/PizzalinkButtonWithoutMargin"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
70
app/src/main/res/layout/row_cart.xml
Normal file
70
app/src/main/res/layout/row_cart.xml
Normal file
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v7.widget.CardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
app:cardCornerRadius="4dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:layout_marginEnd="12dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cartProductNameTotalTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Pizza Formaggio"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/black"
|
||||
android:padding="12dp"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/removeProductFromCartImageView"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:padding="6dp"
|
||||
android:src="@drawable/ic_cancel_2"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cartProductInfoTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Gross"
|
||||
android:textColor="@color/black"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingRight="12dp"
|
||||
android:paddingEnd="12dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cartProductTotalTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="CHF 25.00"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
android:padding="12dp"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
@@ -49,8 +49,8 @@
|
||||
android:id="@+id/cancelOrderImageView"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:padding="10dp"
|
||||
android:src="@drawable/ic_cancel"
|
||||
android:padding="6dp"
|
||||
android:src="@drawable/ic_cancel_2"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true" />
|
||||
|
||||
@@ -280,7 +280,7 @@
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
style="@style/AddCartButton"
|
||||
style="@style/ContinueCartButton"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="Add to Cart" />
|
||||
|
||||
|
||||
@@ -81,6 +81,12 @@
|
||||
<string name="order_history_status">Status</string>
|
||||
<!-- OrderHistoryFragment-->
|
||||
|
||||
<!-- CartFragment-->
|
||||
<string name="continue_cart">DEVAM</string>
|
||||
<string name="clear_cart">TEMİZLE</string>
|
||||
<string name="no_product_on_cart">Sepetinizde ürün bulunmamaktadır.</string>
|
||||
<!-- CartFragment-->
|
||||
|
||||
<string name="alert">Uyarı</string>
|
||||
<string name="error_message">Bir hata oluştu.</string>
|
||||
<string name="no_network_message">İnternet bağlanıtısı yok. Lütfen daha sonra tekrar deneyiniz.</string>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<item name="windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="AddCartButton">
|
||||
<style name="ContinueCartButton">
|
||||
<item name="android:background">@drawable/background_button_add_cart</item>
|
||||
<item name="android:textColor">@color/white</item>
|
||||
<item name="android:textSize">12sp</item>
|
||||
@@ -21,7 +21,14 @@
|
||||
<item name="android:textAllCaps">false</item>
|
||||
</style>
|
||||
|
||||
<style name="PizzalinkButton">
|
||||
<style name="PizzalinkButtonWithoutMargin">
|
||||
<item name="android:background">@drawable/background_button_enabled</item>
|
||||
<item name="android:textColor">@color/red</item>
|
||||
<item name="android:textSize">12sp</item>
|
||||
<item name="android:textAllCaps">false</item>
|
||||
</style>
|
||||
|
||||
<style name="PizzalinkButton" parent="PizzalinkButtonWithoutMargin">
|
||||
<item name="android:background">@drawable/background_button_enabled</item>
|
||||
<item name="android:textColor">@color/red</item>
|
||||
<item name="android:layout_marginLeft">24dp</item>
|
||||
|
||||
Reference in New Issue
Block a user