bug fix part 1
This commit is contained in:
@@ -49,6 +49,7 @@ import retrofit2.Response;
|
|||||||
|
|
||||||
public class ProductPropertiesBottomSheetDialog extends BottomSheetDialogFragment {
|
public class ProductPropertiesBottomSheetDialog extends BottomSheetDialogFragment {
|
||||||
|
|
||||||
|
@BindView(R.id.closeImageView) ImageView closeImageView;
|
||||||
@BindView(R.id.productImageView) ImageView productImageView;
|
@BindView(R.id.productImageView) ImageView productImageView;
|
||||||
@BindView(R.id.productNameTextView) TextView productNameTextView;
|
@BindView(R.id.productNameTextView) TextView productNameTextView;
|
||||||
@BindView(R.id.productPriceTextView) TextView productPriceTextView;
|
@BindView(R.id.productPriceTextView) TextView productPriceTextView;
|
||||||
@@ -91,11 +92,15 @@ public class ProductPropertiesBottomSheetDialog extends BottomSheetDialogFragmen
|
|||||||
mBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
|
mBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@OnClick({R.id.increaseProductCountImageView,
|
@OnClick({R.id.closeImageView,
|
||||||
|
R.id.increaseProductCountImageView,
|
||||||
R.id.deccreaseProductCountImageView,
|
R.id.deccreaseProductCountImageView,
|
||||||
R.id.addToCartButton})
|
R.id.addToCartButton})
|
||||||
public void onCLick(View view){
|
public void onCLick(View view){
|
||||||
switch (view.getId()){
|
switch (view.getId()){
|
||||||
|
case R.id.closeImageView:
|
||||||
|
dismiss();
|
||||||
|
break;
|
||||||
case R.id.increaseProductCountImageView:
|
case R.id.increaseProductCountImageView:
|
||||||
productCount++;
|
productCount++;
|
||||||
productCountTextView.setText(String.valueOf(productCount));
|
productCountTextView.setText(String.valueOf(productCount));
|
||||||
|
|||||||
@@ -15,35 +15,44 @@
|
|||||||
android:src="@drawable/ic_back"
|
android:src="@drawable/ic_back"
|
||||||
android:visibility="gone"/>
|
android:visibility="gone"/>
|
||||||
|
|
||||||
<RelativeLayout
|
<!-- android:background="@color/cart_dialog_background" -->
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/cart_dialog_background">
|
android:orientation="vertical"
|
||||||
|
android:background="@color/white">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/productImageView"
|
android:id="@+id/closeImageView"
|
||||||
android:layout_width="144dp"
|
android:layout_width="36dp"
|
||||||
android:layout_height="144dp"
|
android:layout_height="36dp"
|
||||||
android:layout_marginTop="-48dp"
|
android:src="@drawable/ic_cancel"
|
||||||
android:layout_marginBottom="36dp"
|
android:layout_gravity="right|end"
|
||||||
android:layout_marginLeft="12dp"
|
android:padding="12dp"/>
|
||||||
android:layout_marginStart="12dp"
|
|
||||||
android:layout_marginRight="12dp"
|
|
||||||
android:layout_marginEnd="12dp"
|
|
||||||
android:layout_gravity="center_horizontal" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_marginRight="12dp"
|
|
||||||
android:layout_toRightOf="@+id/productImageView"
|
|
||||||
android:layout_toEndOf="@+id/productImageView">
|
|
||||||
|
|
||||||
<RelativeLayout
|
<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_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/background_cart_dialog_price">
|
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
|
<TextView
|
||||||
android:id="@+id/productNameTextView"
|
android:id="@+id/productNameTextView"
|
||||||
@@ -51,18 +60,11 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@color/navy"
|
android:textColor="@color/navy"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
|
android:padding="12sp"
|
||||||
android:text="Pizza Formaggio"
|
android:text="Pizza Formaggio"
|
||||||
fontPath="fonts/Quicksand-Bold.ttf"
|
fontPath="fonts/Quicksand-Bold.ttf"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:gravity="center"
|
android:gravity="center" />
|
||||||
android:layout_centerVertical="true"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="48dp">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/productPriceTextView"
|
android:id="@+id/productPriceTextView"
|
||||||
@@ -70,7 +72,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@color/red"
|
android:textColor="@color/red"
|
||||||
android:text="CHF 25.00"
|
android:text="CHF 25.00"
|
||||||
android:textSize="16sp"
|
android:textSize="18sp"
|
||||||
android:paddingBottom="12dp"
|
android:paddingBottom="12dp"
|
||||||
android:paddingLeft="12dp"
|
android:paddingLeft="12dp"
|
||||||
android:paddingStart="12dp"
|
android:paddingStart="12dp"
|
||||||
@@ -78,22 +80,22 @@
|
|||||||
android:paddingEnd="12dp"
|
android:paddingEnd="12dp"
|
||||||
fontPath="fonts/Quicksand-Bold.ttf"
|
fontPath="fonts/Quicksand-Bold.ttf"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:gravity="center"
|
android:gravity="center" />
|
||||||
android:layout_centerVertical="true"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
</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"/>
|
||||||
|
|
||||||
<Button
|
</LinearLayout>
|
||||||
android:id="@+id/addToCartButton"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
android:layout_marginTop="-24dp"
|
|
||||||
android:text="@string/add_to_cart"
|
|
||||||
style="@style/PizzalinkRedButton" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
Reference in New Issue
Block a user