cart total layout on main activity

This commit is contained in:
cimenmus
2017-11-19 19:49:33 +03:00
parent 1dc2d6094f
commit d7a5df0ce1
15 changed files with 1013 additions and 149 deletions

View File

@@ -21,7 +21,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/pizzalinkToolbar"
android:layout_above="@+id/bottomNavigationView">
android:layout_above="@+id/cartTotalRelativeLayout">
<FrameLayout
android:id="@+id/fragmentContainer"
@@ -39,6 +39,38 @@
</android.support.v4.widget.DrawerLayout>
<RelativeLayout
android:id="@+id/cartTotalRelativeLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:layout_above="@+id/bottomNavigationView"
android:visibility="visible">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/navy"
fontPath="fonts/Quicksand-Bold.ttf"
android:layout_gravity="center_horizontal"
android:text="@string/cart_total"
android:padding="16dp"
android:layout_centerVertical="true"/>
<TextView
android:id="@+id/cartTotalTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="16dp"
android:layout_centerVertical="true"
android:textColor="@color/red"
android:layout_gravity="center_horizontal"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
fontPath="fonts/Quicksand-Bold.ttf"/>
</RelativeLayout>
<com.ittianyu.bottomnavigationviewex.BottomNavigationViewEx
android:id="@+id/bottomNavigationView"
android:layout_width="match_parent"

View File

@@ -0,0 +1,233 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MissingPrefix"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/white">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:padding="12dp"
android:src="@drawable/ic_back"
android:visibility="gone"/>
<!-- android:background="@color/cart_dialog_background" -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@color/white">
<ImageView
android:id="@+id/closeImageView"
android:layout_width="36dp"
android:layout_height="36dp"
android:src="@drawable/ic_cancel"
android:layout_gravity="right|end"
android:padding="12dp"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/productImageView"
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_marginLeft="12dp"
android:layout_marginStart="12dp"
android:layout_marginRight="12dp"
android:layout_marginEnd="12dp"
android:layout_gravity="center_horizontal" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginRight="12dp"
android:layout_centerVertical="true"
android:layout_marginEnd="12dp"
android:layout_toRightOf="@+id/productImageView"
android:layout_toEndOf="@+id/productImageView">
<TextView
android:id="@+id/productNameTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/navy"
android:textSize="18sp"
android:padding="12sp"
android:text="Pizza Formaggio"
fontPath="fonts/Quicksand-Bold.ttf"
android:layout_gravity="center"
android:gravity="center" />
<TextView
android:id="@+id/productPriceTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/red"
android:text="CHF 25.00"
android:textSize="18sp"
android:paddingBottom="12dp"
android:paddingLeft="12dp"
android:paddingStart="12dp"
android:paddingRight="12dp"
android:paddingEnd="12dp"
fontPath="fonts/Quicksand-Bold.ttf"
android:layout_gravity="center"
android:gravity="center" />
</LinearLayout>
</RelativeLayout>
<Button
android:id="@+id/addToCartButton"
android:layout_width="match_parent"
android:layout_height="48dp"
android:text="@string/add_to_cart"
style="@style/PizzalinkRedButton"
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
fontPath="fonts/Quicksand-Bold.ttf"
android:text="@string/count"
android:paddingTop="12dp"
android:paddingLeft="12dp"
android:paddingStart="12dp"
android:paddingRight="12dp"
android:paddingEnd="12dp"
android:textSize="16sp"
android:textColor="@color/navy"/>
<RelativeLayout
android:id="@+id/ProductCountLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_margin="12dp">
<ImageView
android:id="@+id/deccreaseProductCountImageView"
android:layout_width="24dp"
android:layout_height="24dp"
android:padding="4dp"
android:src="@drawable/ic_decrease"
android:layout_marginRight="4dp"
android:layout_marginEnd="4dp"
android:layout_alignParentBottom="true"/>
<TextView
android:id="@+id/productCountTextView"
android:layout_width="24dp"
android:gravity="center"
android:layout_height="wrap_content"
android:text="1"
android:includeFontPadding="false"
android:lineSpacingExtra="0dp"
android:textSize="24sp"
fontPath="fonts/Quicksand-Bold.ttf"
android:layout_toRightOf="@+id/deccreaseProductCountImageView"
android:layout_toEndOf="@+id/deccreaseProductCountImageView"
android:layout_alignParentBottom="true"
android:textColor="@color/navy"/>
<ImageView
android:id="@+id/increaseProductCountImageView"
android:layout_width="24dp"
android:layout_height="24dp"
android:padding="4dp"
android:layout_gravity="center_vertical"
android:layout_toRightOf="@+id/productCountTextView"
android:layout_toEndOf="@+id/productCountTextView"
android:src="@drawable/ic_increase"
android:layout_alignParentBottom="true"
android:layout_marginLeft="4dp"
android:layout_marginStart="4dp" />
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:background="@color/navy"
android:layout_marginLeft="12dp"
android:layout_marginStart="12dp"
android:layout_marginRight="12dp"
android:layout_marginEnd="12dp"/>
<TextView
android:id="@+id/radioRecyclerHeaderTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
fontPath="fonts/Quicksand-Bold.ttf"
android:padding="12dp"
android:visibility="gone"
android:text="Size"
android:textSize="16sp"
android:textColor="@color/navy"/>
<android.support.v7.widget.RecyclerView
android:id="@+id/radioRecyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"/>
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:background="@color/navy"
android:layout_marginLeft="12dp"
android:layout_marginStart="12dp"
android:layout_marginRight="12dp"
android:layout_marginEnd="12dp"/>
<TextView
android:id="@+id/checkboxRecyclerHeaderTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
fontPath="fonts/Quicksand-Bold.ttf"
android:padding="12dp"
android:visibility="gone"
android:textSize="16sp"
android:textColor="@color/navy"/>
<android.support.v7.widget.RecyclerView
android:id="@+id/checkboxRecyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"/>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</LinearLayout>
</LinearLayout>