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