This commit is contained in:
2017-11-14 10:44:22 +03:00
16 changed files with 638 additions and 409 deletions

View File

@@ -110,14 +110,14 @@ public class MenuProductRecyclerAdapter extends RecyclerView.Adapter<RecyclerVie
case HOLDER_MENU_PRODUCT :
MenuProductViewHolder menuProductViewHolder = (MenuProductViewHolder) holder;
ImageLoadHelper.loadImage(menuProductViewHolder.productImageView, menuProductList.get(position).getImageURL());
menuProductViewHolder.productNameTextView.setText(menuProductList.get(position).getName());
TextHelper.setTextFromHTML(menuProductViewHolder.productNameTextView, menuProductList.get(position).getName());
menuProductViewHolder.productPriceTextView.setText(
PriceHelper.getPriceWithCurreny(menuProductList.get(position).getPrice()));
TextHelper.setTextFromHTML(menuProductViewHolder.productIngredientsTextView, menuProductList.get(position).getDescription());
if(isDescriptionVisible){
menuProductViewHolder.productIngredientsLayout.setVisibility(View.VISIBLE);
menuProductViewHolder.productIngredientsTextView.setText(menuProductList.get(position).getDescription());
TextHelper.setTextFromHTML(menuProductViewHolder.productIngredientsTextView, menuProductList.get(position).getDescription());
}
else {
menuProductViewHolder.productIngredientsLayout.setVisibility(View.GONE);

View File

@@ -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));

View File

@@ -18,6 +18,7 @@ import com.afollestad.materialdialogs.MaterialDialog;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Locale;
import butterknife.BindColor;
import butterknife.BindString;
@@ -189,7 +190,7 @@ public class CartFragment extends BaseFragment {
}
private void setCartTotalFields(){
cartTotalLabelTextView.setText(cartInfoModel.getTotals().get(0).getTitle());
cartTotalLabelTextView.setText(cartInfoModel.getTotals().get(0).getTitle().toUpperCase(Locale.GERMAN));
cartProductTotalTextView.setText(cartInfoModel.getTotals().get(0).getText());
}

View File

@@ -17,6 +17,11 @@ public class DisplayHelper {
return displayMetrics.widthPixels;
}
public static int getScreenHeightInPixel(){
DisplayMetrics displayMetrics = BaseActivity.currentActivity.getResources().getDisplayMetrics();
return displayMetrics.heightPixels;
}
public static int dpToPx(int dp) {
DisplayMetrics displayMetrics = BaseActivity.currentActivity.getResources().getDisplayMetrics();
return Math.round(dp * (displayMetrics.xdpi / DisplayMetrics.DENSITY_DEFAULT));

View File

@@ -20,13 +20,35 @@
app:showBackIcon="true"
app:titleTextColor="@color/navy" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/addAddressToolbar">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/background_wood" />
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
app:cardCornerRadius="4dp"
android:layout_margin="12dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/addAddressToolbar">
android:layout_above="@+id/addNewAddressButton">
<LinearLayout
android:layout_width="match_parent"
@@ -89,3 +111,9 @@
android:layout_alignParentBottom="true" />
</RelativeLayout>
</android.support.v7.widget.CardView>
</RelativeLayout>
</RelativeLayout>

View File

@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical"
android:focusable="true"
android:focusableInTouchMode="true"
tools:context="ch.pizzalink.android.activity.CreateOrderActivity">
<ch.pizzalink.android.view.PizzalinkToolbar
@@ -18,6 +19,31 @@
app:showBackIcon="true"
app:titleTextColor="@color/navy" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/orderToolbar">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/background_wood" />
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
app:cardCornerRadius="4dp"
android:layout_margin="12dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical"
tools:context="ch.pizzalink.android.activity.CreateOrderActivity">
<LinearLayout
android:id="@+id/stepIndicatorLayout"
android:layout_width="match_parent"
@@ -45,3 +71,10 @@
android:background="@color/actvity_default_background_color_1" />
</LinearLayout>
</android.support.v7.widget.CardView>
</RelativeLayout>
</RelativeLayout>

View File

@@ -17,11 +17,32 @@
app:showBackIcon="true"
app:titleTextColor="@color/navy" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/myAddressesToolbar">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/background_wood" />
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
app:cardCornerRadius="4dp"
android:layout_margin="12dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/myAddressesRecyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/myAddressesToolbar"
android:layout_above="@+id/addNewAddressButton"/>
<Button
@@ -35,3 +56,9 @@
android:layout_alignParentBottom="true"/>
</RelativeLayout>
</android.support.v7.widget.CardView>
</RelativeLayout>
</RelativeLayout>

View File

@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical"
android:focusable="true"
android:focusableInTouchMode="true"
tools:context="ch.pizzalink.android.activity.UpdatePasswordActivity">
@@ -20,6 +19,29 @@
app:showBackIcon="true"
app:titleTextColor="@color/navy" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/updatePasswordToolbar">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/background_wood" />
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
app:cardCornerRadius="4dp"
android:layout_margin="12dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ch.pizzalink.android.view.PizzalinkEditText
android:id="@+id/oldPasswordPizzalinkEditText"
android:layout_width="match_parent"
@@ -58,3 +80,10 @@
android:text="@string/update_app" />
</LinearLayout>
</android.support.v7.widget.CardView>
</RelativeLayout>
</RelativeLayout>

View File

@@ -19,11 +19,32 @@
app:showBackIcon="true"
app:titleTextColor="@color/navy" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/updateProfileToolbar">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/background_wood" />
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
app:cardCornerRadius="4dp"
android:layout_margin="12dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_below="@+id/updateProfileToolbar"
android:layout_above="@+id/updateProfileButton">
<ch.pizzalink.android.view.PizzalinkEditText
@@ -71,3 +92,9 @@
android:layout_alignParentBottom="true" />
</RelativeLayout>
</android.support.v7.widget.CardView>
</RelativeLayout>
</RelativeLayout>

View File

@@ -65,8 +65,8 @@
android:id="@+id/cartTotalLabelTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAllCaps="true"
android:textColor="@color/navy"
fontPath="fonts/Quicksand-Bold.ttf"
android:layout_gravity="center_horizontal"
android:text="TOTAL"/>

View File

@@ -1,7 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MissingPrefix"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/background_wood" />
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
app:cardCornerRadius="4dp"
android:layout_margin="12dp">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
@@ -41,7 +61,11 @@
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@drawable/shadow"/>
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp"
android:background="@color/navy"/>
<RelativeLayout
android:id="@+id/myAddressesLayout"
@@ -55,6 +79,7 @@
android:text="@string/my_addresses"
android:layout_marginTop="4dp"
android:textColor="@color/navy"
fontPath="fonts/Quicksand-Bold.ttf"
android:layout_centerVertical="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
@@ -69,7 +94,7 @@
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:src="@drawable/ic_back"
android:tint="@color/venus"
android:tint="@color/navy"
android:padding="6dp"
android:rotation="180"/>
@@ -78,7 +103,11 @@
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@drawable/shadow"/>
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp"
android:background="@color/navy"/>
<RelativeLayout
android:id="@+id/updateProfileLayout"
@@ -90,13 +119,11 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/update_profile"
android:layout_marginTop="4dp"
fontPath="fonts/Quicksand-Bold.ttf"
android:textColor="@color/navy"
android:layout_centerVertical="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_toLeftOf="@+id/arrow2"
android:layout_toStartOf="@+id/arrow2"/>
android:layout_alignParentStart="true" />
<ImageView
android:id="@+id/arrow2"
@@ -106,7 +133,7 @@
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:src="@drawable/ic_back"
android:tint="@color/venus"
android:tint="@color/navy"
android:padding="6dp"
android:rotation="180"/>
@@ -115,8 +142,11 @@
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@drawable/shadow"/>
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp"
android:background="@color/navy"/>
<RelativeLayout
android:id="@+id/updatePasswordLayout"
@@ -129,6 +159,7 @@
android:layout_height="wrap_content"
android:text="@string/update_password"
android:layout_marginTop="4dp"
fontPath="fonts/Quicksand-Bold.ttf"
android:textColor="@color/navy"
android:layout_centerVertical="true"
android:layout_alignParentLeft="true"
@@ -144,7 +175,7 @@
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:src="@drawable/ic_back"
android:tint="@color/venus"
android:tint="@color/navy"
android:padding="6dp"
android:rotation="180"/>
@@ -153,7 +184,11 @@
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@drawable/shadow"/>
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp"
android:background="@color/navy"/>
<RelativeLayout
android:id="@+id/logoutLayout"
@@ -165,18 +200,19 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_logout"
fontPath="fonts/Quicksand-Bold.ttf"
android:layout_marginTop="4dp"
android:textColor="@color/navy"
android:layout_centerVertical="true" />
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@drawable/shadow"/>
</LinearLayout>
</ScrollView>
</android.support.v7.widget.CardView>
</RelativeLayout>

View File

@@ -1,14 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
android:scaleType="centerCrop"
android:src="@drawable/background_wood" />
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
app:cardCornerRadius="4dp"
android:layout_margin="12dp">
<WebView
android:id="@+id/storeInfoWebView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="match_parent"
android:padding="12dp"/>
</android.support.v7.widget.CardView>
</RelativeLayout>

View File

@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MissingPrefix"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/white">
@@ -15,17 +15,29 @@
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/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="144dp"
android:layout_height="144dp"
android:layout_marginTop="-48dp"
android:layout_marginBottom="36dp"
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_marginLeft="12dp"
android:layout_marginStart="12dp"
android:layout_marginRight="12dp"
@@ -37,32 +49,22 @@
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">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@drawable/background_cart_dialog_price">
<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"
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,10 +80,7 @@
android:paddingEnd="12dp"
fontPath="fonts/Quicksand-Bold.ttf"
android:layout_gravity="center"
android:gravity="center"
android:layout_centerVertical="true"/>
</RelativeLayout>
android:gravity="center" />
</LinearLayout>
@@ -91,9 +90,12 @@
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" />
style="@style/PizzalinkRedButton"
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"

View File

@@ -13,17 +13,17 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/order_person_fullname"
android:textColor="@color/heater"
android:textColor="@color/navy"
android:textSize="12sp"
fontPath="fonts/Quicksand-Bold.ttf" />
<TextView
android:id="@+id/infoTextView"
fontPath="fonts/Quicksand-Bold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Aytaç Cici"
android:layout_marginTop="4dp"
fontPath="fonts/Quicksand-Bold.ttf"
android:textColor="@color/navy"/>
android:text="Aytaç Cici"
android:textColor="@color/red" />
</LinearLayout>

View File

@@ -28,6 +28,7 @@
</RelativeLayout>
<!-- android:background="@color/transparent_white" -->
<ImageView
android:id="@+id/productImageView"
android:layout_width="160dp"
@@ -37,7 +38,7 @@
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:layout_marginStart="12dp"
android:background="@color/transparent_white"/>
android:background="@color/white"/>
<RelativeLayout
android:id="@+id/productIngredientsLayout"

View File

@@ -1,11 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
<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="wrap_content"
android:orientation="vertical"
android:background="@color/white">
<RelativeLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:padding="12dp">
android:padding="16dp">
<TextView
android:id="@+id/addressTextView"
@@ -18,6 +25,8 @@
android:layout_toLeftOf="@+id/deleteAddressImageView"
android:layout_toStartOf="@+id/deleteAddressImageView"
android:layout_centerVertical="true"
android:text="Test Address"
fontPath="fonts/Quicksand-Bold.ttf"
android:textColor="@color/navy" />
<ImageView
@@ -31,3 +40,14 @@
android:layout_alignParentEnd="true"/>
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp"
android:background="@color/navy"/>
</LinearLayout>