cart total layout on main activity
This commit is contained in:
15
.idea/misc.xml
generated
15
.idea/misc.xml
generated
@@ -1,8 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="EntryPointsManager">
|
|
||||||
<entry_points version="2.0" />
|
|
||||||
</component>
|
|
||||||
<component name="NullableNotNullManager">
|
<component name="NullableNotNullManager">
|
||||||
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
|
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
|
||||||
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
|
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
|
||||||
@@ -27,17 +24,7 @@
|
|||||||
</value>
|
</value>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||||
<OptionsSetting value="true" id="Add" />
|
|
||||||
<OptionsSetting value="true" id="Remove" />
|
|
||||||
<OptionsSetting value="true" id="Checkout" />
|
|
||||||
<OptionsSetting value="true" id="Update" />
|
|
||||||
<OptionsSetting value="true" id="Status" />
|
|
||||||
<OptionsSetting value="true" id="Edit" />
|
|
||||||
<ConfirmationsSetting value="0" id="Add" />
|
|
||||||
<ConfirmationsSetting value="0" id="Remove" />
|
|
||||||
</component>
|
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="JDK" project-jdk-type="JavaSDK">
|
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
android:screenOrientation="portrait">
|
android:screenOrientation="portrait">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
@@ -38,16 +39,17 @@
|
|||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".activity.MyAddressesActivity"
|
android:name=".activity.MyAddressesActivity"
|
||||||
android:screenOrientation="portrait"/>
|
android:screenOrientation="portrait" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".activity.UpdatePasswordActivity"
|
android:name=".activity.UpdatePasswordActivity"
|
||||||
android:screenOrientation="portrait"/>
|
android:screenOrientation="portrait" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".activity.AddAddressActivity"
|
android:name=".activity.AddAddressActivity"
|
||||||
android:screenOrientation="portrait"/>
|
android:screenOrientation="portrait" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".activity.UpdateProfileActivity"
|
android:name=".activity.UpdateProfileActivity"
|
||||||
android:screenOrientation="portrait"/>
|
android:screenOrientation="portrait" />
|
||||||
|
<activity android:name=".activity.ProductPropertiesActivity"></activity>
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
@@ -125,6 +125,7 @@ public class CreateOrderActivity extends BaseActivity {
|
|||||||
mainActivityIntent.putExtra("isStartWithOrderHistory", true);
|
mainActivityIntent.putExtra("isStartWithOrderHistory", true);
|
||||||
startActivity(mainActivityIntent);
|
startActivity(mainActivityIntent);
|
||||||
SharedPrefsHelper.setCartItemCount(0);
|
SharedPrefsHelper.setCartItemCount(0);
|
||||||
|
SharedPrefsHelper.setCartTotalPrice("0");
|
||||||
finishAffinity();
|
finishAffinity();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import ch.pizzalink.android.api.ApiErrorUtils;
|
|||||||
import ch.pizzalink.android.api.ApiService;
|
import ch.pizzalink.android.api.ApiService;
|
||||||
import ch.pizzalink.android.api.ResponseObject;
|
import ch.pizzalink.android.api.ResponseObject;
|
||||||
import ch.pizzalink.android.helper.DialogHelper;
|
import ch.pizzalink.android.helper.DialogHelper;
|
||||||
|
import ch.pizzalink.android.helper.PriceHelper;
|
||||||
import ch.pizzalink.android.helper.SessionHelper;
|
import ch.pizzalink.android.helper.SessionHelper;
|
||||||
import ch.pizzalink.android.helper.SharedPrefsHelper;
|
import ch.pizzalink.android.helper.SharedPrefsHelper;
|
||||||
import ch.pizzalink.android.helper.ViewHelper;
|
import ch.pizzalink.android.helper.ViewHelper;
|
||||||
@@ -125,6 +126,7 @@ public class LoginActivity extends BaseActivity {
|
|||||||
response.body().getData() != null &&
|
response.body().getData() != null &&
|
||||||
response.body().isSuccess()){
|
response.body().isSuccess()){
|
||||||
SharedPrefsHelper.setCartItemCount(response.body().getData().getProducts().size());
|
SharedPrefsHelper.setCartItemCount(response.body().getData().getProducts().size());
|
||||||
|
SharedPrefsHelper.setCartTotalPrice(PriceHelper.removeCurrencyFromPrice(response.body().getData().getTotals().get(0).getText()));
|
||||||
startActivity(new Intent(LoginActivity.this, MainActivity.class));
|
startActivity(new Intent(LoginActivity.this, MainActivity.class));
|
||||||
finishAffinity();
|
finishAffinity();
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import android.view.View;
|
|||||||
import android.view.animation.Animation;
|
import android.view.animation.Animation;
|
||||||
import android.view.animation.AnimationUtils;
|
import android.view.animation.AnimationUtils;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
@@ -37,6 +38,7 @@ import ch.pizzalink.android.fragment.HistoryFragment;
|
|||||||
import ch.pizzalink.android.fragment.MenuFragment;
|
import ch.pizzalink.android.fragment.MenuFragment;
|
||||||
import ch.pizzalink.android.fragment.ProductFragment;
|
import ch.pizzalink.android.fragment.ProductFragment;
|
||||||
import ch.pizzalink.android.fragment.ProfileFragment;
|
import ch.pizzalink.android.fragment.ProfileFragment;
|
||||||
|
import ch.pizzalink.android.helper.PriceHelper;
|
||||||
import ch.pizzalink.android.helper.SharedPrefsHelper;
|
import ch.pizzalink.android.helper.SharedPrefsHelper;
|
||||||
import ch.pizzalink.android.model.CategoryModel;
|
import ch.pizzalink.android.model.CategoryModel;
|
||||||
import ch.pizzalink.android.view.PizzalinkToolbar;
|
import ch.pizzalink.android.view.PizzalinkToolbar;
|
||||||
@@ -51,6 +53,8 @@ public class MainActivity extends BaseActivity {
|
|||||||
@BindView(R.id.drawerLayout) DrawerLayout drawerLayout;
|
@BindView(R.id.drawerLayout) DrawerLayout drawerLayout;
|
||||||
@BindView(R.id.navigationMenuRecyclerView) RecyclerView navigationMenuRecyclerView;
|
@BindView(R.id.navigationMenuRecyclerView) RecyclerView navigationMenuRecyclerView;
|
||||||
@BindView(R.id.pizzalinkToolbar) PizzalinkToolbar pizzalinkToolbar;
|
@BindView(R.id.pizzalinkToolbar) PizzalinkToolbar pizzalinkToolbar;
|
||||||
|
@BindView(R.id.cartTotalRelativeLayout) RelativeLayout cartTotalRelativeLayout;
|
||||||
|
@BindView(R.id.cartTotalTextView) TextView cartTotalTextView;
|
||||||
@BindView(R.id.bottomNavigationView) BottomNavigationViewEx bottomNavigationView;
|
@BindView(R.id.bottomNavigationView) BottomNavigationViewEx bottomNavigationView;
|
||||||
|
|
||||||
@BindView(R.id.badgeLayout) RelativeLayout badgeLayout;
|
@BindView(R.id.badgeLayout) RelativeLayout badgeLayout;
|
||||||
@@ -176,6 +180,13 @@ public class MainActivity extends BaseActivity {
|
|||||||
shoppingCartImageView.setImageDrawable(whiteCartDrawable);
|
shoppingCartImageView.setImageDrawable(whiteCartDrawable);
|
||||||
shoppingCartTextView.setTextColor(whiteColor);
|
shoppingCartTextView.setTextColor(whiteColor);
|
||||||
|
|
||||||
|
if(!SharedPrefsHelper.getCartTotalPrice().equals("0") &&
|
||||||
|
!SharedPrefsHelper.getCartTotalPrice().equals("0.0") &&
|
||||||
|
!SharedPrefsHelper.getCartTotalPrice().equals("0.00")){
|
||||||
|
cartTotalTextView.setText(PriceHelper.getPriceWithCurreny(SharedPrefsHelper.getCartTotalPrice()));
|
||||||
|
cartTotalRelativeLayout.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case R.id.action_empty:
|
case R.id.action_empty:
|
||||||
@@ -186,6 +197,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
|
|
||||||
currentCategoryId = -1;
|
currentCategoryId = -1;
|
||||||
|
|
||||||
|
cartTotalRelativeLayout.setVisibility(View.GONE);
|
||||||
shoppingCartImageView.setImageDrawable(redCartDrawable);
|
shoppingCartImageView.setImageDrawable(redCartDrawable);
|
||||||
shoppingCartTextView.setTextColor(redColor);
|
shoppingCartTextView.setTextColor(redColor);
|
||||||
|
|
||||||
@@ -199,6 +211,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
|
|
||||||
currentCategoryId = -1;
|
currentCategoryId = -1;
|
||||||
|
|
||||||
|
cartTotalRelativeLayout.setVisibility(View.GONE);
|
||||||
shoppingCartImageView.setImageDrawable(whiteCartDrawable);
|
shoppingCartImageView.setImageDrawable(whiteCartDrawable);
|
||||||
shoppingCartTextView.setTextColor(whiteColor);
|
shoppingCartTextView.setTextColor(whiteColor);
|
||||||
|
|
||||||
@@ -212,6 +225,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
|
|
||||||
currentCategoryId = -1;
|
currentCategoryId = -1;
|
||||||
|
|
||||||
|
cartTotalRelativeLayout.setVisibility(View.GONE);
|
||||||
shoppingCartImageView.setImageDrawable(whiteCartDrawable);
|
shoppingCartImageView.setImageDrawable(whiteCartDrawable);
|
||||||
shoppingCartTextView.setTextColor(whiteColor);
|
shoppingCartTextView.setTextColor(whiteColor);
|
||||||
|
|
||||||
@@ -225,6 +239,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
|
|
||||||
currentCategoryId = -1;
|
currentCategoryId = -1;
|
||||||
|
|
||||||
|
cartTotalRelativeLayout.setVisibility(View.GONE);
|
||||||
shoppingCartImageView.setImageDrawable(whiteCartDrawable);
|
shoppingCartImageView.setImageDrawable(whiteCartDrawable);
|
||||||
shoppingCartTextView.setTextColor(whiteColor);
|
shoppingCartTextView.setTextColor(whiteColor);
|
||||||
|
|
||||||
@@ -418,13 +433,26 @@ public class MainActivity extends BaseActivity {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
private void addBadgeAt(int position, int number) {
|
private void addBadgeAt(int position, int number) {
|
||||||
|
|
||||||
badgeTextView.setText(String.valueOf(number));
|
badgeTextView.setText(String.valueOf(number));
|
||||||
|
|
||||||
if(number <= 0){
|
if(number <= 0){
|
||||||
badgeLayout.setVisibility(View.GONE);
|
badgeLayout.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
badgeLayout.setVisibility(View.VISIBLE);
|
badgeLayout.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(SharedPrefsHelper.getCartTotalPrice().equals("0") ||
|
||||||
|
SharedPrefsHelper.getCartTotalPrice().equals("0.0") ||
|
||||||
|
SharedPrefsHelper.getCartTotalPrice().equals("0.00")){
|
||||||
|
cartTotalRelativeLayout.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
cartTotalTextView.setText(PriceHelper.getPriceWithCurreny(SharedPrefsHelper.getCartTotalPrice()));
|
||||||
|
cartTotalRelativeLayout.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,380 @@
|
|||||||
|
package ch.pizzalink.android.activity;
|
||||||
|
|
||||||
|
import android.support.design.widget.BottomSheetBehavior;
|
||||||
|
import android.support.v7.app.AppCompatActivity;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.support.v7.widget.GridLayoutManager;
|
||||||
|
import android.support.v7.widget.RecyclerView;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
import butterknife.BindString;
|
||||||
|
import butterknife.BindView;
|
||||||
|
import butterknife.OnClick;
|
||||||
|
import ch.pizzalink.android.R;
|
||||||
|
import ch.pizzalink.android.adapter.recycler.ProductCheckboxOptionsRecyclerAdapter;
|
||||||
|
import ch.pizzalink.android.adapter.recycler.ProductRadioOptionsRecyclerAdapter;
|
||||||
|
import ch.pizzalink.android.api.ApiEndPoints;
|
||||||
|
import ch.pizzalink.android.api.ApiErrorUtils;
|
||||||
|
import ch.pizzalink.android.api.ApiService;
|
||||||
|
import ch.pizzalink.android.api.ResponseObject;
|
||||||
|
import ch.pizzalink.android.helper.DialogHelper;
|
||||||
|
import ch.pizzalink.android.helper.ImageLoadHelper;
|
||||||
|
import ch.pizzalink.android.helper.PriceHelper;
|
||||||
|
import ch.pizzalink.android.helper.SessionHelper;
|
||||||
|
import ch.pizzalink.android.helper.SharedPrefsHelper;
|
||||||
|
import ch.pizzalink.android.interfaces.RecyclerItemClickListener;
|
||||||
|
import ch.pizzalink.android.model.AddProductToBasketResponseModel;
|
||||||
|
import ch.pizzalink.android.model.cart.CartInfoModel;
|
||||||
|
import ch.pizzalink.android.model.menu.MenuProductModel;
|
||||||
|
import ch.pizzalink.android.model.menu.MenuProductOptionModel;
|
||||||
|
import ch.pizzalink.android.model.menu.MenuProductOptionValueModel;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Callback;
|
||||||
|
import retrofit2.Response;
|
||||||
|
|
||||||
|
public class ProductPropertiesActivity extends BaseActivity {
|
||||||
|
|
||||||
|
@BindView(R.id.closeImageView) ImageView closeImageView;
|
||||||
|
@BindView(R.id.productImageView) ImageView productImageView;
|
||||||
|
@BindView(R.id.productNameTextView) TextView productNameTextView;
|
||||||
|
@BindView(R.id.productPriceTextView) TextView productPriceTextView;
|
||||||
|
@BindView(R.id.addToCartButton) Button addToCartButton;
|
||||||
|
@BindView(R.id.radioRecyclerHeaderTextView) TextView radioRecyclerHeaderTextView;
|
||||||
|
@BindView(R.id.radioRecyclerView) RecyclerView radioRecyclerView;
|
||||||
|
@BindView(R.id.checkboxRecyclerHeaderTextView) TextView checkboxRecyclerHeaderTextView;
|
||||||
|
@BindView(R.id.checkboxRecyclerView) RecyclerView checkboxRecyclerView;
|
||||||
|
@BindView(R.id.increaseProductCountImageView) ImageView increaseProductCountImageView;
|
||||||
|
@BindView(R.id.deccreaseProductCountImageView) ImageView deccreaseProductCountImageView;
|
||||||
|
@BindView(R.id.productCountTextView) TextView productCountTextView;
|
||||||
|
|
||||||
|
@BindString(R.string.no_options_selected_part) String noOptionsSelectedText;
|
||||||
|
|
||||||
|
private int productCount = 1;
|
||||||
|
|
||||||
|
private MenuProductModel menuProductModel;
|
||||||
|
|
||||||
|
private ArrayList<MenuProductOptionValueModel> productRadioOptionValueList = new ArrayList<>();
|
||||||
|
private ArrayList<MenuProductOptionValueModel> productCheckboxOptionValueList = new ArrayList<>();
|
||||||
|
private ProductRadioOptionsRecyclerAdapter productRadioOptionsRecyclerAdapter;
|
||||||
|
private ProductCheckboxOptionsRecyclerAdapter productCheckboxOptionsRecyclerAdapter;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_product_properties);
|
||||||
|
}
|
||||||
|
|
||||||
|
@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:
|
||||||
|
finish();
|
||||||
|
break;
|
||||||
|
case R.id.increaseProductCountImageView:
|
||||||
|
productCount++;
|
||||||
|
productCountTextView.setText(String.valueOf(productCount));
|
||||||
|
productPriceTextView.setText(
|
||||||
|
PriceHelper.calculatePriceAfterCountChanged(
|
||||||
|
productPriceTextView.getText().toString(), productCount - 1, productCount));
|
||||||
|
break;
|
||||||
|
case R.id.deccreaseProductCountImageView:
|
||||||
|
if(productCount == 1)
|
||||||
|
break;
|
||||||
|
productCount--;
|
||||||
|
productCountTextView.setText(String.valueOf(productCount));
|
||||||
|
productPriceTextView.setText(
|
||||||
|
PriceHelper.calculatePriceAfterCountChanged(
|
||||||
|
productPriceTextView.getText().toString(), productCount + 1, productCount));
|
||||||
|
break;
|
||||||
|
case R.id.addToCartButton:
|
||||||
|
if(checkFields())
|
||||||
|
addProductToCart();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
|
||||||
|
for(MenuProductOptionModel menuProductOptionModel : menuProductModel.getProductOptionList()){
|
||||||
|
for(MenuProductOptionValueModel menuProductOptionValueModel : menuProductOptionModel.getOptionValueModelList()){
|
||||||
|
menuProductOptionValueModel.setSelected(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(MenuProductOptionModel menuProductOptionModel : menuProductModel.getProductOptionList()){
|
||||||
|
for(MenuProductOptionValueModel menuProductOptionValueModel : menuProductOptionModel.getOptionValueModelList()){
|
||||||
|
if(menuProductOptionValueModel.getPrice().equals("0") || menuProductOptionValueModel.getPrice().equals("0.00")){
|
||||||
|
|
||||||
|
//checkbox
|
||||||
|
if(!(menuProductOptionModel.getType().toLowerCase().equals("radio") ||
|
||||||
|
menuProductOptionModel.getType().toLowerCase().equals("select"))){
|
||||||
|
menuProductOptionValueModel.setSelected(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
//radio
|
||||||
|
else if(!isAnyOptionValueSelected(menuProductOptionModel.getOptionValueModelList())){
|
||||||
|
menuProductOptionValueModel.setSelected(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initViews(){
|
||||||
|
setFields();
|
||||||
|
fillRadioAndCheckboxOptionLists();
|
||||||
|
switch (menuProductModel.getProductOptionType()){
|
||||||
|
case RADIO_AND_CHECKBOX:
|
||||||
|
radioRecyclerView.setVisibility(View.VISIBLE);
|
||||||
|
checkboxRecyclerView.setVisibility(View.VISIBLE);
|
||||||
|
radioRecyclerHeaderTextView.setVisibility(View.VISIBLE);
|
||||||
|
checkboxRecyclerHeaderTextView.setVisibility(View.VISIBLE);
|
||||||
|
initRadioRecyclerView();
|
||||||
|
initCheckboxRecyclerView();
|
||||||
|
break;
|
||||||
|
case RADIO:
|
||||||
|
radioRecyclerHeaderTextView.setVisibility(View.VISIBLE);
|
||||||
|
radioRecyclerView.setVisibility(View.VISIBLE);
|
||||||
|
checkboxRecyclerView.setVisibility(View.GONE);
|
||||||
|
checkboxRecyclerHeaderTextView.setVisibility(View.GONE);
|
||||||
|
initRadioRecyclerView();
|
||||||
|
break;
|
||||||
|
case CHECKBOX:
|
||||||
|
radioRecyclerHeaderTextView.setVisibility(View.GONE);
|
||||||
|
radioRecyclerView.setVisibility(View.GONE);
|
||||||
|
checkboxRecyclerHeaderTextView.setVisibility(View.VISIBLE);
|
||||||
|
checkboxRecyclerView.setVisibility(View.VISIBLE);
|
||||||
|
initCheckboxRecyclerView();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMenuProductModel(MenuProductModel menuProductModel){
|
||||||
|
this.menuProductModel = menuProductModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initRadioRecyclerView(){
|
||||||
|
radioRecyclerView.setNestedScrollingEnabled(false);
|
||||||
|
GridLayoutManager gridLayoutManager = new GridLayoutManager(BaseActivity.currentActivity, 1);
|
||||||
|
radioRecyclerView.setLayoutManager(gridLayoutManager);
|
||||||
|
productRadioOptionsRecyclerAdapter = new ProductRadioOptionsRecyclerAdapter(productRadioOptionValueList, new RecyclerItemClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemClick(View view, int position) {
|
||||||
|
if(!productRadioOptionValueList.get(position).isSelected()){
|
||||||
|
for(MenuProductOptionValueModel menuProductOptionValueModel : productRadioOptionValueList){
|
||||||
|
menuProductOptionValueModel.setSelected(false);
|
||||||
|
}
|
||||||
|
productRadioOptionValueList.get(position).setSelected(true);
|
||||||
|
productRadioOptionsRecyclerAdapter.notifyDataSetChanged();
|
||||||
|
productPriceTextView.setText(PriceHelper.calculatePriceAfterRadioOptionValueChanged(
|
||||||
|
productCount, menuProductModel, productRadioOptionValueList.get(position)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
radioRecyclerView.setAdapter(productRadioOptionsRecyclerAdapter);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initCheckboxRecyclerView(){
|
||||||
|
checkboxRecyclerView.setNestedScrollingEnabled(false);
|
||||||
|
GridLayoutManager gridLayoutManager = new GridLayoutManager(BaseActivity.currentActivity, 1);
|
||||||
|
checkboxRecyclerView.setLayoutManager(gridLayoutManager);
|
||||||
|
productCheckboxOptionsRecyclerAdapter = new ProductCheckboxOptionsRecyclerAdapter(productCheckboxOptionValueList, new RecyclerItemClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemClick(View view, int position) {
|
||||||
|
productCheckboxOptionValueList.get(position).setSelected(
|
||||||
|
!productCheckboxOptionValueList.get(position).isSelected());
|
||||||
|
productCheckboxOptionsRecyclerAdapter.notifyItemChanged(position);
|
||||||
|
productPriceTextView.setText(
|
||||||
|
PriceHelper.calculatePriceAfterCheckboxOptionValueChanged(
|
||||||
|
productCount, menuProductModel, productCheckboxOptionValueList));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
checkboxRecyclerView.setAdapter(productCheckboxOptionsRecyclerAdapter);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setFields(){
|
||||||
|
ImageLoadHelper.loadImage(productImageView, menuProductModel.getImageURL());
|
||||||
|
productNameTextView.setText(menuProductModel.getName());
|
||||||
|
productPriceTextView.setText(PriceHelper.getPriceWithCurreny(menuProductModel.getPrice()));
|
||||||
|
productPriceTextView.setText(PriceHelper.getPriceWithCurreny(menuProductModel.getPrice()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void fillRadioAndCheckboxOptionLists(){
|
||||||
|
for(MenuProductOptionModel menuProductOptionModel : menuProductModel.getProductOptionList()){
|
||||||
|
setSelectedPriceShowingOptions(menuProductOptionModel);
|
||||||
|
|
||||||
|
if(menuProductOptionModel.getType().toLowerCase().equals("radio") ||
|
||||||
|
menuProductOptionModel.getType().toLowerCase().equals("select")){
|
||||||
|
radioRecyclerHeaderTextView.setText(menuProductOptionModel.getName());
|
||||||
|
productRadioOptionValueList.addAll(menuProductOptionModel.getOptionValueModelList());
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
checkboxRecyclerHeaderTextView.setText(menuProductOptionModel.getName());
|
||||||
|
productCheckboxOptionValueList.addAll(menuProductOptionModel.getOptionValueModelList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setSelectedPriceShowingOptions(MenuProductOptionModel menuProductOptionModel){
|
||||||
|
for(MenuProductOptionValueModel menuProductOptionValueModel : menuProductOptionModel.getOptionValueModelList()){
|
||||||
|
if(menuProductOptionValueModel.getPrice().equals("0") || menuProductOptionValueModel.getPrice().equals("0.00")){
|
||||||
|
|
||||||
|
//checkbox
|
||||||
|
if(!(menuProductOptionModel.getType().toLowerCase().equals("radio") ||
|
||||||
|
menuProductOptionModel.getType().toLowerCase().equals("select"))){
|
||||||
|
menuProductOptionValueModel.setSelected(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
//radio
|
||||||
|
else if(!isAnyOptionValueSelected(menuProductOptionModel.getOptionValueModelList())){
|
||||||
|
menuProductOptionValueModel.setSelected(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void addProductToCart(){
|
||||||
|
DialogHelper.showLoadingDialog();
|
||||||
|
Call<ResponseObject<AddProductToBasketResponseModel>> call =
|
||||||
|
ApiService.apiInterface.addProductsToBasket(
|
||||||
|
ApiEndPoints.API_ADD_PRODUCTS_TO_BASKET + SessionHelper.getCustomerToken().getToken(),
|
||||||
|
getAddToCartRequestParams());
|
||||||
|
call.enqueue(new Callback<ResponseObject<AddProductToBasketResponseModel>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ResponseObject<AddProductToBasketResponseModel>> call, Response<ResponseObject<AddProductToBasketResponseModel>> response) {
|
||||||
|
DialogHelper.hideLoadingDialog();
|
||||||
|
if(response.isSuccessful() && response.body().getData() != null){
|
||||||
|
if(response.body().isSuccess()){
|
||||||
|
DialogHelper.showDialogWithPositiveButton(BaseActivity.currentActivity, response.body().getData().getSuccessMessage());
|
||||||
|
getCartItemCount();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
DialogHelper.showDialogWithPositiveButton(BaseActivity.currentActivity, response.body().getData().getErrorMessage());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ApiErrorUtils.parseError(response);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ResponseObject<AddProductToBasketResponseModel>> call, Throwable t) {
|
||||||
|
DialogHelper.hideLoadingDialog();
|
||||||
|
DialogHelper.showFailedDialog();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private HashMap<String, Object> getAddToCartRequestParams(){
|
||||||
|
|
||||||
|
HashMap<String, Object> params = new HashMap<>();
|
||||||
|
params.put("product_id", menuProductModel.getId());
|
||||||
|
params.put("quantity", productCount);
|
||||||
|
|
||||||
|
for(MenuProductOptionModel productOptionModel : menuProductModel.getProductOptionList()){
|
||||||
|
|
||||||
|
ArrayList<String> selectedCheckboxOptionList = new ArrayList<>();
|
||||||
|
|
||||||
|
for(MenuProductOptionValueModel productOptionValueModel : productOptionModel.getOptionValueModelList()){
|
||||||
|
|
||||||
|
if(productOptionValueModel.isSelected()){
|
||||||
|
|
||||||
|
if(productOptionModel.getType().equals("checkbox")){
|
||||||
|
selectedCheckboxOptionList.add(productOptionValueModel.getProductOptionValueId());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
params.put("option[" + productOptionModel.getProductOptionId() + "]", productOptionValueModel.getProductOptionValueId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(productOptionModel.getType().equals("checkbox")){
|
||||||
|
params.put("option[" + productOptionModel.getProductOptionId() + "]", selectedCheckboxOptionList);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void getCartItemCount(){
|
||||||
|
Call<ResponseObject<CartInfoModel>> call = ApiService.apiInterface.getCartProducts(
|
||||||
|
SessionHelper.getCustomerToken().getToken());
|
||||||
|
call.enqueue(new Callback<ResponseObject<CartInfoModel>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ResponseObject<CartInfoModel>> call, Response<ResponseObject<CartInfoModel>> response) {
|
||||||
|
DialogHelper.hideLoadingDialog();
|
||||||
|
if(response.isSuccessful() &&
|
||||||
|
response.body().getData() != null &&
|
||||||
|
response.body().isSuccess()){
|
||||||
|
SharedPrefsHelper.setCartItemCount(response.body().getData().getProducts().size());
|
||||||
|
SharedPrefsHelper.setCartTotalPrice(PriceHelper.removeCurrencyFromPrice(response.body().getData().getTotals().get(0).getText()));
|
||||||
|
/*
|
||||||
|
MainActivity mainActivity = (MainActivity) getActivity();
|
||||||
|
mainActivity.setCartItemCount();
|
||||||
|
*/
|
||||||
|
finish();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ResponseObject<CartInfoModel>> call, Throwable t) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private boolean checkFields(){
|
||||||
|
|
||||||
|
if(radioRecyclerView.getVisibility() == View.VISIBLE &&
|
||||||
|
!isSelectedAtLeastOne(productRadioOptionValueList)){
|
||||||
|
DialogHelper.showAlertDialog(BaseActivity.currentActivity,
|
||||||
|
radioRecyclerHeaderTextView.getText().toString() + " " + noOptionsSelectedText);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(checkboxRecyclerView.getVisibility() == View.VISIBLE &&
|
||||||
|
!isSelectedAtLeastOne(productCheckboxOptionValueList)){
|
||||||
|
DialogHelper.showAlertDialog(BaseActivity.currentActivity,
|
||||||
|
checkboxRecyclerHeaderTextView.getText().toString() + " " + noOptionsSelectedText);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isSelectedAtLeastOne(ArrayList<MenuProductOptionValueModel> menuProductOptionValueModels){
|
||||||
|
for(MenuProductOptionValueModel menuProductOptionValueModel : menuProductOptionValueModels){
|
||||||
|
if(menuProductOptionValueModel.isSelected()){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isAnyOptionValueSelected(ArrayList<MenuProductOptionValueModel> menuProductOptionValueModels){
|
||||||
|
for (MenuProductOptionValueModel menuProductOptionValueModel : menuProductOptionValueModels){
|
||||||
|
if(menuProductOptionValueModel.isSelected()){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -25,6 +25,7 @@ import ch.pizzalink.android.api.ResponseObject;
|
|||||||
import ch.pizzalink.android.helper.DialogHelper;
|
import ch.pizzalink.android.helper.DialogHelper;
|
||||||
import ch.pizzalink.android.helper.DisplayHelper;
|
import ch.pizzalink.android.helper.DisplayHelper;
|
||||||
import ch.pizzalink.android.helper.NetworkHelper;
|
import ch.pizzalink.android.helper.NetworkHelper;
|
||||||
|
import ch.pizzalink.android.helper.PriceHelper;
|
||||||
import ch.pizzalink.android.helper.SessionHelper;
|
import ch.pizzalink.android.helper.SessionHelper;
|
||||||
import ch.pizzalink.android.helper.SharedPrefsHelper;
|
import ch.pizzalink.android.helper.SharedPrefsHelper;
|
||||||
import ch.pizzalink.android.model.AppVersionModel;
|
import ch.pizzalink.android.model.AppVersionModel;
|
||||||
@@ -208,6 +209,7 @@ public class SplashActivity extends BaseActivity {
|
|||||||
response.body().getData() != null &&
|
response.body().getData() != null &&
|
||||||
response.body().isSuccess()){
|
response.body().isSuccess()){
|
||||||
SharedPrefsHelper.setCartItemCount(response.body().getData().getProducts().size());
|
SharedPrefsHelper.setCartItemCount(response.body().getData().getProducts().size());
|
||||||
|
SharedPrefsHelper.setCartTotalPrice(PriceHelper.removeCurrencyFromPrice(response.body().getData().getTotals().get(0).getText()));
|
||||||
openActivity(MainActivity.class);
|
openActivity(MainActivity.class);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import ch.pizzalink.android.helper.SessionHelper;
|
|||||||
import ch.pizzalink.android.helper.SharedPrefsHelper;
|
import ch.pizzalink.android.helper.SharedPrefsHelper;
|
||||||
import ch.pizzalink.android.interfaces.RecyclerItemClickListener;
|
import ch.pizzalink.android.interfaces.RecyclerItemClickListener;
|
||||||
import ch.pizzalink.android.model.AddProductToBasketResponseModel;
|
import ch.pizzalink.android.model.AddProductToBasketResponseModel;
|
||||||
|
import ch.pizzalink.android.model.cart.CartInfoModel;
|
||||||
import ch.pizzalink.android.model.menu.MenuProductModel;
|
import ch.pizzalink.android.model.menu.MenuProductModel;
|
||||||
import ch.pizzalink.android.model.menu.MenuProductOptionModel;
|
import ch.pizzalink.android.model.menu.MenuProductOptionModel;
|
||||||
import ch.pizzalink.android.model.menu.MenuProductOptionValueModel;
|
import ch.pizzalink.android.model.menu.MenuProductOptionValueModel;
|
||||||
@@ -280,13 +281,8 @@ public class ProductPropertiesBottomSheetDialog extends BottomSheetDialogFragmen
|
|||||||
DialogHelper.hideLoadingDialog();
|
DialogHelper.hideLoadingDialog();
|
||||||
if(response.isSuccessful() && response.body().getData() != null){
|
if(response.isSuccessful() && response.body().getData() != null){
|
||||||
if(response.body().isSuccess()){
|
if(response.body().isSuccess()){
|
||||||
dismiss();
|
|
||||||
DialogHelper.showDialogWithPositiveButton(BaseActivity.currentActivity, response.body().getData().getSuccessMessage());
|
DialogHelper.showDialogWithPositiveButton(BaseActivity.currentActivity, response.body().getData().getSuccessMessage());
|
||||||
SharedPrefsHelper.setCartItemCount(SharedPrefsHelper.getCartItemCount() + 1);
|
getCartItemCount();
|
||||||
MainActivity mainActivity = (MainActivity) getActivity();
|
|
||||||
mainActivity.setCartItemCount();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DialogHelper.showDialogWithPositiveButton(BaseActivity.currentActivity, response.body().getData().getErrorMessage());
|
DialogHelper.showDialogWithPositiveButton(BaseActivity.currentActivity, response.body().getData().getErrorMessage());
|
||||||
@@ -336,6 +332,30 @@ public class ProductPropertiesBottomSheetDialog extends BottomSheetDialogFragmen
|
|||||||
return params;
|
return params;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void getCartItemCount(){
|
||||||
|
Call<ResponseObject<CartInfoModel>> call = ApiService.apiInterface.getCartProducts(
|
||||||
|
SessionHelper.getCustomerToken().getToken());
|
||||||
|
call.enqueue(new Callback<ResponseObject<CartInfoModel>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ResponseObject<CartInfoModel>> call, Response<ResponseObject<CartInfoModel>> response) {
|
||||||
|
if(response.isSuccessful() &&
|
||||||
|
response.body().getData() != null &&
|
||||||
|
response.body().isSuccess()){
|
||||||
|
SharedPrefsHelper.setCartItemCount(response.body().getData().getProducts().size());
|
||||||
|
SharedPrefsHelper.setCartTotalPrice(PriceHelper.removeCurrencyFromPrice(response.body().getData().getTotals().get(0).getText()));
|
||||||
|
MainActivity mainActivity = (MainActivity) getActivity();
|
||||||
|
mainActivity.setCartItemCount();
|
||||||
|
dismiss();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ResponseObject<CartInfoModel>> call, Throwable t) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private boolean checkFields(){
|
private boolean checkFields(){
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ import ch.pizzalink.android.api.ApiErrorUtils;
|
|||||||
import ch.pizzalink.android.api.ApiService;
|
import ch.pizzalink.android.api.ApiService;
|
||||||
import ch.pizzalink.android.api.ResponseObject;
|
import ch.pizzalink.android.api.ResponseObject;
|
||||||
import ch.pizzalink.android.helper.DialogHelper;
|
import ch.pizzalink.android.helper.DialogHelper;
|
||||||
|
import ch.pizzalink.android.helper.PriceHelper;
|
||||||
import ch.pizzalink.android.helper.SessionHelper;
|
import ch.pizzalink.android.helper.SessionHelper;
|
||||||
import ch.pizzalink.android.helper.SharedPrefsHelper;
|
import ch.pizzalink.android.helper.SharedPrefsHelper;
|
||||||
import ch.pizzalink.android.interfaces.RecyclerItemClickListener;
|
import ch.pizzalink.android.interfaces.RecyclerItemClickListener;
|
||||||
@@ -165,6 +166,7 @@ public class CartFragment extends BaseFragment {
|
|||||||
cartRecyclerAdapter.notifyDataSetChanged();
|
cartRecyclerAdapter.notifyDataSetChanged();
|
||||||
setCartLayoutsVisibility();
|
setCartLayoutsVisibility();
|
||||||
SharedPrefsHelper.setCartItemCount(0);
|
SharedPrefsHelper.setCartItemCount(0);
|
||||||
|
SharedPrefsHelper.setCartTotalPrice("0");
|
||||||
MainActivity mainActivity = (MainActivity) getActivity();
|
MainActivity mainActivity = (MainActivity) getActivity();
|
||||||
mainActivity.setCartItemCount();
|
mainActivity.setCartItemCount();
|
||||||
}
|
}
|
||||||
@@ -247,6 +249,8 @@ public class CartFragment extends BaseFragment {
|
|||||||
response.body().getData() != null &&
|
response.body().getData() != null &&
|
||||||
response.body().isSuccess()){
|
response.body().isSuccess()){
|
||||||
cartProductList.remove(position);
|
cartProductList.remove(position);
|
||||||
|
getCartItemCount();
|
||||||
|
/*
|
||||||
DialogHelper.showOneButtonDialogWithCallback(productRemovedFromCartText, new MaterialDialog.SingleButtonCallback() {
|
DialogHelper.showOneButtonDialogWithCallback(productRemovedFromCartText, new MaterialDialog.SingleButtonCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
|
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
|
||||||
@@ -256,6 +260,7 @@ public class CartFragment extends BaseFragment {
|
|||||||
mainActivity.reopenCartFragment();
|
mainActivity.reopenCartFragment();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ApiErrorUtils.parseError(response);
|
ApiErrorUtils.parseError(response);
|
||||||
@@ -275,4 +280,37 @@ public class CartFragment extends BaseFragment {
|
|||||||
params.put("key", cartProductId);
|
params.put("key", cartProductId);
|
||||||
return params;
|
return params;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void getCartItemCount(){
|
||||||
|
Call<ResponseObject<CartInfoModel>> call = ApiService.apiInterface.getCartProducts(
|
||||||
|
SessionHelper.getCustomerToken().getToken());
|
||||||
|
call.enqueue(new Callback<ResponseObject<CartInfoModel>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ResponseObject<CartInfoModel>> call, final Response<ResponseObject<CartInfoModel>> response) {
|
||||||
|
DialogHelper.hideLoadingDialog();
|
||||||
|
if(response.isSuccessful() &&
|
||||||
|
response.body().getData() != null &&
|
||||||
|
response.body().isSuccess()){
|
||||||
|
|
||||||
|
DialogHelper.showOneButtonDialogWithCallback(productRemovedFromCartText, new MaterialDialog.SingleButtonCallback() {
|
||||||
|
@Override
|
||||||
|
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
|
||||||
|
SharedPrefsHelper.setCartItemCount(response.body().getData().getProducts().size());
|
||||||
|
SharedPrefsHelper.setCartTotalPrice(PriceHelper.removeCurrencyFromPrice(response.body().getData().getTotals().get(0).getText()));
|
||||||
|
MainActivity mainActivity = (MainActivity) getActivity();
|
||||||
|
mainActivity.setCartItemCount();
|
||||||
|
mainActivity.reopenCartFragment();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ResponseObject<CartInfoModel>> call, Throwable t) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ public class CreateOrderResultFragment extends CreateOrderBaseFragment {
|
|||||||
|
|
||||||
private void initViews(){
|
private void initViews(){
|
||||||
SharedPrefsHelper.setCartItemCount(0);
|
SharedPrefsHelper.setCartItemCount(0);
|
||||||
|
SharedPrefsHelper.setCartTotalPrice("0");
|
||||||
previousTextView.setVisibility(View.GONE);
|
previousTextView.setVisibility(View.GONE);
|
||||||
nextTextView.setText(doneOrderText);
|
nextTextView.setText(doneOrderText);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,12 +22,21 @@ public class PriceHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String removeCurrencyFromPrice(String priceWithCurreny){
|
public static String removeCurrencyFromPrice(String priceWithCurreny){
|
||||||
|
/*
|
||||||
try {
|
try {
|
||||||
String currencyText = BaseActivity.currentActivity.getString(R.string.chf);
|
String currencyText = BaseActivity.currentActivity.getString(R.string.chf);
|
||||||
return priceWithCurreny.replace(currencyText, "").trim();
|
String priceWithoutCurrency = priceWithCurreny.replace(currencyText, "");
|
||||||
|
priceWithoutCurrency = priceWithoutCurrency.trim();
|
||||||
|
return priceWithoutCurrency;
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
return priceWithCurreny.trim();
|
return priceWithCurreny.trim();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
String currencyText = BaseActivity.currentActivity.getString(R.string.chf);
|
||||||
|
String priceWithoutCurrency = priceWithCurreny.replace(currencyText, "");
|
||||||
|
priceWithoutCurrency = priceWithoutCurrency.trim();
|
||||||
|
return priceWithoutCurrency;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String calculatePriceAfterCountChanged(String oldPriceString, int oldCount, int newCount){
|
public static String calculatePriceAfterCountChanged(String oldPriceString, int oldCount, int newCount){
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ public class SharedPrefsHelper {
|
|||||||
private static final String PREF_KEY_CUSTOMER_TOKEN = SHARED_PREFS_NAME + "customerToken";
|
private static final String PREF_KEY_CUSTOMER_TOKEN = SHARED_PREFS_NAME + "customerToken";
|
||||||
private static final String PREF_KEY_USER_LOG_IN_STATUS = SHARED_PREFS_NAME + "userLoginStatus";
|
private static final String PREF_KEY_USER_LOG_IN_STATUS = SHARED_PREFS_NAME + "userLoginStatus";
|
||||||
private static final String PREF_KEY_CART_ITEM_COUNT = SHARED_PREFS_NAME + "cartItemCount";
|
private static final String PREF_KEY_CART_ITEM_COUNT = SHARED_PREFS_NAME + "cartItemCount";
|
||||||
|
private static final String PREF_KEY_CART_TOTAL_PRICE = SHARED_PREFS_NAME + "cartTotalPrice";
|
||||||
|
|
||||||
private static SharedPreferences sharedPreferences =
|
private static SharedPreferences sharedPreferences =
|
||||||
BaseActivity.currentActivity
|
BaseActivity.currentActivity
|
||||||
@@ -111,6 +112,15 @@ public class SharedPrefsHelper {
|
|||||||
return sharedPreferences.getInt(PREF_KEY_CART_ITEM_COUNT, 0);
|
return sharedPreferences.getInt(PREF_KEY_CART_ITEM_COUNT, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getCartTotalPrice(){
|
||||||
|
return sharedPreferences.getString(PREF_KEY_CART_TOTAL_PRICE, "0");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setCartTotalPrice(String cartTotalPrice){
|
||||||
|
editor.putString(PREF_KEY_CART_TOTAL_PRICE, cartTotalPrice);
|
||||||
|
editor.apply();
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
public static void saveCategoryList(ArrayList<Category> cats){
|
public static void saveCategoryList(ArrayList<Category> cats){
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@+id/pizzalinkToolbar"
|
android:layout_below="@+id/pizzalinkToolbar"
|
||||||
android:layout_above="@+id/bottomNavigationView">
|
android:layout_above="@+id/cartTotalRelativeLayout">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/fragmentContainer"
|
android:id="@+id/fragmentContainer"
|
||||||
@@ -39,6 +39,38 @@
|
|||||||
|
|
||||||
</android.support.v4.widget.DrawerLayout>
|
</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
|
<com.ittianyu.bottomnavigationviewex.BottomNavigationViewEx
|
||||||
android:id="@+id/bottomNavigationView"
|
android:id="@+id/bottomNavigationView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
233
app/src/main/res/layout/activity_product_properties.xml
Normal file
233
app/src/main/res/layout/activity_product_properties.xml
Normal 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>
|
||||||
@@ -1,205 +1,324 @@
|
|||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<!-- General-->
|
<!-- General-->
|
||||||
<string name="app_name">Pizzalink</string> <!--bu alanı alanını değiştirmyin !!!-->
|
<string name="app_name">Pizzalink</string> <!--bu alanı alanını değiştirmyin !!!-->
|
||||||
<string name="something_went_wrong">Es ist ein Fehler aufgetreten.</string>
|
|
||||||
<string name="alert">Warnung</string>
|
<string name="something_went_wrong">Es ist ein Fehler aufgetreten.</string>
|
||||||
<string name="error_message">Es ist ein Fehler aufgetreten.</string>
|
|
||||||
<string name="bad_request">Bad Request</string>
|
<string name="alert">Warnung</string>
|
||||||
<string name="failed">Connection failed</string>
|
|
||||||
<string name="ok">Ok</string>
|
<string name="error_message">Es ist ein Fehler aufgetreten.</string>
|
||||||
<string name="cancel">Beenden</string>
|
|
||||||
<string name="loading">Bitte warten...</string>
|
<string name="bad_request">Bad Request</string>
|
||||||
<string name="month_name_january">Jan.</string>
|
|
||||||
<string name="month_name_february">Feb.</string>
|
<string name="failed">Connection failed</string>
|
||||||
<string name="month_name_march">Mar.</string>
|
|
||||||
<string name="month_name_april">Apr.</string>
|
<string name="ok">Ok</string>
|
||||||
<string name="month_name_may">May</string>
|
|
||||||
<string name="month_name_jun">June</string>
|
<string name="cancel">Beenden</string>
|
||||||
<string name="month_name_july">July</string>
|
|
||||||
<string name="month_name_august">Aug.</string>
|
<string name="loading">Bitte warten...</string>
|
||||||
<string name="month_name_september">Sept</string>
|
|
||||||
<string name="month_name_october">Oct.</string>
|
<string name="month_name_january">Jan.</string>
|
||||||
<string name="month_name_november">Nov.</string>
|
|
||||||
<string name="month_name_december">Dec.</string>
|
<string name="month_name_february">Feb.</string>
|
||||||
<string name="chf">CHF</string>
|
|
||||||
<string name="empty_description">..</string>
|
<string name="month_name_march">Mar.</string>
|
||||||
<string name="choose">Wählen</string>
|
|
||||||
|
<string name="month_name_april">Apr.</string>
|
||||||
|
|
||||||
|
<string name="month_name_may">May</string>
|
||||||
|
|
||||||
|
<string name="month_name_jun">June</string>
|
||||||
|
|
||||||
|
<string name="month_name_july">July</string>
|
||||||
|
|
||||||
|
<string name="month_name_august">Aug.</string>
|
||||||
|
|
||||||
|
<string name="month_name_september">Sept</string>
|
||||||
|
|
||||||
|
<string name="month_name_october">Oct.</string>
|
||||||
|
|
||||||
|
<string name="month_name_november">Nov.</string>
|
||||||
|
|
||||||
|
<string name="month_name_december">Dec.</string>
|
||||||
|
|
||||||
|
<string name="chf">CHF</string>
|
||||||
|
|
||||||
|
<string name="empty_description">..</string>
|
||||||
|
|
||||||
|
<string name="choose">Wählen</string>
|
||||||
<!-- General-->
|
<!-- General-->
|
||||||
|
|
||||||
<!-- uygulamının ilk açılan ekranı. pizzlink logosunun oldugu ekran -->
|
<!-- uygulamının ilk açılan ekranı. pizzlink logosunun oldugu ekran -->
|
||||||
<!-- SplashActivity -->
|
<!-- SplashActivity -->
|
||||||
<string name="no_network_message">Keine Internetverbindung. Bitte versuchen Sie es später noch einmal.</string>
|
|
||||||
<string name="alert_update_app">Sie müssen die Pizzalink-Applikation aktualisieren, um sie zu verwenden.</string>
|
<string name="no_network_message">Keine Internetverbindung. Bitte versuchen Sie es später noch einmal.</string>
|
||||||
<string name="update_app">AKTUALISIEREN</string>
|
|
||||||
|
<string name="alert_update_app">Sie müssen die Pizzalink-Applikation aktualisieren, um sie zu verwenden.</string>
|
||||||
|
|
||||||
|
<string name="update_app">AKTUALISIEREN</string>
|
||||||
<!-- SplashActivity -->
|
<!-- SplashActivity -->
|
||||||
|
|
||||||
<!-- giriş yap ekranı -->
|
<!-- giriş yap ekranı -->
|
||||||
<!-- LoginActivity-->
|
<!-- LoginActivity-->
|
||||||
<string name="activity_title_login">Einloggen</string>
|
|
||||||
<string name="button_login">EINLOGGEN</string>
|
<string name="activity_title_login">Einloggen</string>
|
||||||
<string name="not_have_an_accaount">Sie haben kein Konto?</string>
|
|
||||||
<string name="register_text">REGISTRIEREN</string>
|
<string name="button_login">EINLOGGEN</string>
|
||||||
<string name="forgot_password_hint">Haben Sie Ihr Passwort vergessen?</string>
|
|
||||||
<string name="reset_password"><b><u>\nPASSWORT ZURÜCKSETZEN</u></b></string>
|
<string name="not_have_an_accaount">Sie haben kein Konto?</string>
|
||||||
|
|
||||||
|
<string name="register_text">REGISTRIEREN</string>
|
||||||
|
|
||||||
|
<string name="forgot_password_hint">Haben Sie Ihr Passwort vergessen?</string>
|
||||||
|
|
||||||
|
<string name="reset_password"><b><u>\nPASSWORT ZURÜCKSETZEN</u></b></string>
|
||||||
<!-- LoginActivity-->
|
<!-- LoginActivity-->
|
||||||
|
|
||||||
<!-- şifremi unuttum ekranı -->
|
<!-- şifremi unuttum ekranı -->
|
||||||
<!-- ForgotPasswordActivity-->
|
<!-- ForgotPasswordActivity-->
|
||||||
<string name="activity_title_forgot_password">Passwort vergessen</string>
|
|
||||||
<string name="reset_password_hint"> Geben sie beim registrieren ihre E-Mail-Adresse ein und folgen Sie den Anweisungen.</string>
|
<string name="activity_title_forgot_password">Passwort vergessen</string>
|
||||||
<string name="reset_password_button">SENDEN</string>
|
|
||||||
<string name="password_reset">Erforderliche Informationen wurden an Ihre E-Mail-Adresse geschickt. Folgen Sie den Anweisungen um Ihr Passwort zurückzusetzen.</string>
|
<string name="reset_password_hint"> Geben sie beim registrieren ihre E-Mail-Adresse ein und folgen Sie den Anweisungen.</string>
|
||||||
|
|
||||||
|
<string name="reset_password_button">SENDEN</string>
|
||||||
|
|
||||||
|
<string name="password_reset">Erforderliche Informationen wurden an Ihre E-Mail-Adresse geschickt. Folgen Sie den Anweisungen um Ihr Passwort zurückzusetzen.</string>
|
||||||
<!-- ForgotPasswordActivity-->
|
<!-- ForgotPasswordActivity-->
|
||||||
|
|
||||||
<!-- kayıt ol ekranı -->
|
<!-- kayıt ol ekranı -->
|
||||||
<!-- RegisterActivity-->
|
<!-- RegisterActivity-->
|
||||||
<string name="activity_title_register">Registrieren</string>
|
|
||||||
<string name="firstname">Vorname</string>
|
<string name="activity_title_register">Registrieren</string>
|
||||||
<string name="lastname">Nachname</string>
|
|
||||||
<string name="telephone">Telefonnummer</string>
|
<string name="firstname">Vorname</string>
|
||||||
<string name="email">E-Mail-Adresse</string>
|
|
||||||
<string name="password">Passwort</string>
|
<string name="lastname">Nachname</string>
|
||||||
<string name="password_again">Passwort (erneut eingeben)</string>
|
|
||||||
<string name="addres_line_1">Adresse</string>
|
<string name="telephone">Telefonnummer</string>
|
||||||
<string name="addres_line_2">Adresse 2</string>
|
|
||||||
<string name="city">Stadt</string>
|
<string name="email">E-Mail-Adresse</string>
|
||||||
<string name="postcode">Postleitzahl</string>
|
|
||||||
<string name="zone">Gebiet</string>
|
<string name="password">Passwort</string>
|
||||||
<string name="country">Land</string>
|
|
||||||
<string name="alert_fill_all_fields">Bitte füllen Sie alle Felder aus.</string>
|
<string name="password_again">Passwort (erneut eingeben)</string>
|
||||||
<string name="alert_invalid_email">Bitte geben sie eine gültige E-Mail-Adresse ein.</string>
|
|
||||||
<string name="alert_passwords_not_matched">Passwörter stimmen nicht überein.</string>
|
<string name="addres_line_1">Adresse</string>
|
||||||
<string name="alert_invalid_post_code">Bitte geben sie eine gültige Postleitzahl ein.</string>
|
|
||||||
<string name="alert_select_country_first">Bitte wählen Sie zuerst ein Land.</string>
|
<string name="addres_line_2">Adresse 2</string>
|
||||||
<string name="button_register">REGISTRIEREN</string>
|
|
||||||
|
<string name="city">Stadt</string>
|
||||||
|
|
||||||
|
<string name="postcode">Postleitzahl</string>
|
||||||
|
|
||||||
|
<string name="zone">Gebiet</string>
|
||||||
|
|
||||||
|
<string name="country">Land</string>
|
||||||
|
|
||||||
|
<string name="alert_fill_all_fields">Bitte füllen Sie alle Felder aus.</string>
|
||||||
|
|
||||||
|
<string name="alert_invalid_email">Bitte geben sie eine gültige E-Mail-Adresse ein.</string>
|
||||||
|
|
||||||
|
<string name="alert_passwords_not_matched">Passwörter stimmen nicht überein.</string>
|
||||||
|
|
||||||
|
<string name="alert_invalid_post_code">Bitte geben sie eine gültige Postleitzahl ein.</string>
|
||||||
|
|
||||||
|
<string name="alert_select_country_first">Bitte wählen Sie zuerst ein Land.</string>
|
||||||
|
|
||||||
|
<string name="button_register">REGISTRIEREN</string>
|
||||||
<!-- RegisterActivity-->
|
<!-- RegisterActivity-->
|
||||||
|
|
||||||
<!-- ana ekrandaki alt menuler -->
|
<!-- ana ekrandaki alt menuler -->
|
||||||
<!-- MainAcitivity -->
|
<!-- MainAcitivity -->
|
||||||
<string name="bottom_nav_menu_item_menu">Menu</string>
|
|
||||||
<string name="bottom_nav_menu_item_cart">Cart</string>
|
<string name="bottom_nav_menu_item_menu">Menu</string>
|
||||||
<string name="bottom_nav_menu_item_history">History</string>
|
|
||||||
<string name="bottom_nav_menu_item_profile">Profile</string>
|
<string name="bottom_nav_menu_item_cart">Cart</string>
|
||||||
<string name="bottom_nav_menu_item_info">Info</string>
|
|
||||||
|
<string name="bottom_nav_menu_item_history">History</string>
|
||||||
|
|
||||||
|
<string name="bottom_nav_menu_item_profile">Profile</string>
|
||||||
|
|
||||||
|
<string name="bottom_nav_menu_item_info">Info</string>
|
||||||
|
<string name="cart_total">ZWISHENSUMME</string>
|
||||||
|
|
||||||
|
|
||||||
<!-- MainAcitivity -->
|
<!-- MainAcitivity -->
|
||||||
|
|
||||||
<!-- ürün sayısı, bouyutu ve içeriklerinin seçilip sepete ekleme işleminin yapıldıgı ekran -->
|
|
||||||
|
<!-- ürün sayısı, bouyutu ve içeriklerinin seçilip sepete ekleme işleminin yapıldıgı ekran -->
|
||||||
<!-- ProductPropertiesBottomSheetDialog -->
|
<!-- ProductPropertiesBottomSheetDialog -->
|
||||||
<string name="add_to_cart">IN DEN WARENKORB LEGEN</string>
|
|
||||||
<string name="count">Count</string>
|
<string name="add_to_cart">IN DEN WARENKORB LEGEN</string>
|
||||||
<string name="no_options_selected_part">is not selected.</string>
|
|
||||||
|
<string name="count">Count</string>
|
||||||
|
|
||||||
|
<string name="no_options_selected_part">is not selected.</string>
|
||||||
<!-- ProductPropertiesBottomSheetDialog -->
|
<!-- ProductPropertiesBottomSheetDialog -->
|
||||||
|
|
||||||
<!-- sepet ekranı -->
|
<!-- sepet ekranı -->
|
||||||
<!-- CartFragment-->
|
<!-- CartFragment-->
|
||||||
<string name="continue_cart">WEITER</string>
|
|
||||||
<string name="clear_cart">LÖSCHEN</string>
|
<string name="continue_cart">WEITER</string>
|
||||||
<string name="no_product_on_cart">Es befindet sich kein Produkt im Warenkorb.</string>
|
|
||||||
<string name="alert_remove_prdocut_from_cart">Möchten Sie das Produkt aus dem Warenkorb entfernen?</string>
|
<string name="clear_cart">LÖSCHEN</string>
|
||||||
<string name="product_removed_from_cart">Produkt wurde aus dem Warenkorb entfernt.</string>
|
|
||||||
<string name="alert_clear_cart">Möchten Sie alle Produkte aus dem Warenkorb entfernen?</string>
|
<string name="no_product_on_cart">Es befindet sich kein Produkt im Warenkorb.</string>
|
||||||
|
|
||||||
|
<string name="alert_remove_prdocut_from_cart">Möchten Sie das Produkt aus dem Warenkorb entfernen?</string>
|
||||||
|
|
||||||
|
<string name="product_removed_from_cart">Produkt wurde aus dem Warenkorb entfernt.</string>
|
||||||
|
|
||||||
|
<string name="alert_clear_cart">Möchten Sie alle Produkte aus dem Warenkorb entfernen?</string>
|
||||||
<!-- CartFragment-->
|
<!-- CartFragment-->
|
||||||
|
|
||||||
<!-- sipariş geçmişi ekranı -->
|
<!-- sipariş geçmişi ekranı -->
|
||||||
<!-- OrderHistoryFragment-->
|
<!-- OrderHistoryFragment-->
|
||||||
<string name="order_history_total">Total :</string>
|
|
||||||
<string name="order_history_date">Date</string>
|
<string name="order_history_total">Total :</string>
|
||||||
<string name="order_history_status">Status</string>
|
|
||||||
|
<string name="order_history_date">Date</string>
|
||||||
|
|
||||||
|
<string name="order_history_status">Status</string>
|
||||||
<!-- OrderHistoryFragment-->
|
<!-- OrderHistoryFragment-->
|
||||||
|
|
||||||
<!-- sipariş oluşturma ekranı -->
|
<!-- sipariş oluşturma ekranı -->
|
||||||
<!-- CreateOrderActivity -->
|
<!-- CreateOrderActivity -->
|
||||||
<string name="activity_title_create_order">Bestellen</string>
|
|
||||||
<string name="next">NEXT</string>
|
<string name="activity_title_create_order">Bestellen</string>
|
||||||
<string name="previous">PREVIOUS</string>
|
|
||||||
<string name="confirm_order">APPROVE</string>
|
<string name="next">NEXT</string>
|
||||||
<string name="done_order">DONE</string>
|
|
||||||
<string-array name="stepperLabels">
|
<string name="previous">PREVIOUS</string>
|
||||||
<item>Versandart</item>
|
|
||||||
<item>Versandadresse</item>
|
<string name="confirm_order">APPROVE</string>
|
||||||
<item>Bezahlverfahren</item>
|
|
||||||
<item>Nachricht</item>
|
<string name="done_order">DONE</string>
|
||||||
<item>Betrag</item>
|
|
||||||
</string-array>
|
<string-array name="stepperLabels">
|
||||||
|
|
||||||
|
<item>Versandart</item>
|
||||||
|
|
||||||
|
<item>Versandadresse</item>
|
||||||
|
|
||||||
|
<item>Bezahlverfahren</item>
|
||||||
|
<item>Nachricht</item>
|
||||||
|
|
||||||
|
<item>Betrag</item>
|
||||||
|
|
||||||
|
</string-array>
|
||||||
<!-- CreateOrderActivity -->
|
<!-- CreateOrderActivity -->
|
||||||
|
|
||||||
<!-- teslimat yöntemi seçme ekranı -->
|
<!-- teslimat yöntemi seçme ekranı -->
|
||||||
<!-- ShippingMethodFragment-->
|
<!-- ShippingMethodFragment-->
|
||||||
<string name="alert_choose_shipping_method">Lütfen bir teslimat yöntemi seçiniz.</string>
|
|
||||||
|
<string name="alert_choose_shipping_method">Lütfen bir teslimat yöntemi seçiniz.</string>
|
||||||
<!-- ShippingMethodFragment-->
|
<!-- ShippingMethodFragment-->
|
||||||
|
|
||||||
<!-- teslimat adresi seçme ekranı -->
|
<!-- teslimat adresi seçme ekranı -->
|
||||||
<!-- ShippingAddressFragment-->
|
<!-- ShippingAddressFragment-->
|
||||||
<string name="alert_choose_shipping_address">Bitte wählen Sie eine Versandadresse aus oder fügen Sie eine neue Versandadresse hinzu.</string>
|
|
||||||
|
<string name="alert_choose_shipping_address">Bitte wählen Sie eine Versandadresse aus oder fügen Sie eine neue Versandadresse hinzu.</string>
|
||||||
<!-- ShippingAddressFragment-->
|
<!-- ShippingAddressFragment-->
|
||||||
|
|
||||||
<!-- ödeme yöntemi seçme ekranı -->
|
<!-- ödeme yöntemi seçme ekranı -->
|
||||||
<!-- PaymentMethodFragment-->
|
<!-- PaymentMethodFragment-->
|
||||||
<string name="alert_choose_payment_method">Bitte wählen Sie ein Bezahlverfahren aus.</string>
|
|
||||||
|
<string name="alert_choose_payment_method">Bitte wählen Sie ein Bezahlverfahren aus.</string>
|
||||||
<!-- PaymentMethodFragment-->
|
<!-- PaymentMethodFragment-->
|
||||||
|
|
||||||
<!-- sipariş notu ekranı -->
|
<!-- sipariş notu ekranı -->
|
||||||
<!-- CreateOrderNoteFragment-->
|
<!-- CreateOrderNoteFragment-->
|
||||||
<string name="order_note">Nachricht (Optional)</string>
|
<string name="order_note">Nachricht (Optional)</string>
|
||||||
<!-- CreateOrderNoteFragment-->
|
<!-- CreateOrderNoteFragment-->
|
||||||
|
|
||||||
<!-- sipariş özet ekranı -->
|
<!-- sipariş özet ekranı -->
|
||||||
<!-- CreateOrderSummaryFragment-->
|
<!-- CreateOrderSummaryFragment-->
|
||||||
<string name="order_person_fullname">TO</string>
|
|
||||||
<string name="order_shipping_method">SHIPPING METHOD</string>
|
<string name="order_person_fullname">TO</string>
|
||||||
<string name="order_shipping_address">SHIPPING ADDRESS</string>
|
|
||||||
<string name="order_payment_method">PAYMENT METHOD</string>
|
<string name="order_shipping_method">SHIPPING METHOD</string>
|
||||||
<string name="order_total">TOTAL</string>
|
|
||||||
<string name="order_notee">NACHRICHT</string>
|
<string name="order_shipping_address">SHIPPING ADDRESS</string>
|
||||||
|
|
||||||
|
<string name="order_payment_method">PAYMENT METHOD</string>
|
||||||
|
|
||||||
|
<string name="order_total">TOTAL</string>
|
||||||
|
<string name="order_notee">NACHRICHT</string>
|
||||||
<!-- CreateOrderSummaryFragment-->
|
<!-- CreateOrderSummaryFragment-->
|
||||||
|
|
||||||
<!-- sipariş sınucu ekranı -->
|
<!-- sipariş sınucu ekranı -->
|
||||||
<!-- CreateOrderResultFragment-->
|
<!-- CreateOrderResultFragment-->
|
||||||
<string name="order_successed">Ihre Bestellung ist erfolgreich. Ihre Bestellübersicht werden in der Bestellungshistorie angezeigt und kann dort verfolgt werden.</string>
|
|
||||||
|
<string name="order_successed">Ihre Bestellung ist erfolgreich. Ihre Bestellübersicht werden in der Bestellungshistorie angezeigt und kann dort verfolgt werden.</string>
|
||||||
<!-- CreateOrderSummaryFragment-->
|
<!-- CreateOrderSummaryFragment-->
|
||||||
|
|
||||||
<!-- profil ekranı -->
|
<!-- profil ekranı -->
|
||||||
<!-- ProfileFragment-->
|
<!-- ProfileFragment-->
|
||||||
<string name="profile_firstname">VORNAME</string>
|
|
||||||
<string name="profile_lastname">NACHNAME</string>
|
<string name="profile_firstname">VORNAME</string>
|
||||||
<string name="profile_telephone">TELEFONNUMMER</string>
|
|
||||||
<string name="profile_email">E-MAIL-ADRESSE</string>
|
<string name="profile_lastname">NACHNAME</string>
|
||||||
<string name="my_addresses">Meine Adressen</string>
|
|
||||||
<string name="update_profile">Profil aktualisieren</string>
|
<string name="profile_telephone">TELEFONNUMMER</string>
|
||||||
<string name="update_password">Passwort aktualisieren</string>
|
|
||||||
<string name="button_logout">Abmelden</string>
|
<string name="profile_email">E-MAIL-ADRESSE</string>
|
||||||
<string name="alert_logout">Möchten Sie sich abmelden?</string>
|
|
||||||
|
<string name="my_addresses">Meine Adressen</string>
|
||||||
|
|
||||||
|
<string name="update_profile">Profil aktualisieren</string>
|
||||||
|
|
||||||
|
<string name="update_password">Passwort aktualisieren</string>
|
||||||
|
|
||||||
|
<string name="button_logout">Abmelden</string>
|
||||||
|
|
||||||
|
<string name="alert_logout">Möchten Sie sich abmelden?</string>
|
||||||
<!-- ProfileFragment-->
|
<!-- ProfileFragment-->
|
||||||
|
|
||||||
<!-- profil bilgilerini güncelleme ekranı -->
|
<!-- profil bilgilerini güncelleme ekranı -->
|
||||||
<!-- UpdateProfilectivity-->
|
<!-- UpdateProfilectivity-->
|
||||||
<string name="activity_title_update_profile">Profil Aktualisieren</string>
|
|
||||||
<string name="profile_updated">Ihr Profil wurde erfolgreich aktualisiert..</string>
|
<string name="activity_title_update_profile">Profil Aktualisieren</string>
|
||||||
|
|
||||||
|
<string name="profile_updated">Ihr Profil wurde erfolgreich aktualisiert..</string>
|
||||||
<!-- UpdateProfilectivity-->
|
<!-- UpdateProfilectivity-->
|
||||||
|
|
||||||
<!-- şifre güncelleme ekranı -->
|
<!-- şifre güncelleme ekranı -->
|
||||||
<!-- UpdatePasswordActivity-->
|
<!-- UpdatePasswordActivity-->
|
||||||
<string name="activity_title_update_password">Passwort Aktualisieren</string>
|
|
||||||
<string name="hint_old_password">Altes Passwort</string>
|
<string name="activity_title_update_password">Passwort Aktualisieren</string>
|
||||||
<string name="hint_new_password">Neues Passwort</string>
|
|
||||||
<string name="hint_confirm_new_password">Neues Passwort (erneut eingeben)</string>
|
<string name="hint_old_password">Altes Passwort</string>
|
||||||
<string name="password_updated">Ihr Passwort wurde erfolgreich aktualisiert.</string>
|
|
||||||
|
<string name="hint_new_password">Neues Passwort</string>
|
||||||
|
|
||||||
|
<string name="hint_confirm_new_password">Neues Passwort (erneut eingeben)</string>
|
||||||
|
|
||||||
|
<string name="password_updated">Ihr Passwort wurde erfolgreich aktualisiert.</string>
|
||||||
<!-- UpdatePasswordActivity-->
|
<!-- UpdatePasswordActivity-->
|
||||||
|
|
||||||
<!-- adreslerini görüntüleme ekranı -->
|
<!-- adreslerini görüntüleme ekranı -->
|
||||||
<!-- MyAddressesActivity-->
|
<!-- MyAddressesActivity-->
|
||||||
<string name="activity_title_my_addresses">Meine Adressen</string>
|
|
||||||
<string name="add_new_address">NEUE ADRESSE HINZUFÜGEN</string>
|
<string name="activity_title_my_addresses">Meine Adressen</string>
|
||||||
<string name="alert_delete_address">Möchten Sie diese Adresse löschen?</string>
|
|
||||||
<string name="address_deleted">Ihre Adresse wurde erfolgreich gelöscht.</string>
|
<string name="add_new_address">NEUE ADRESSE HINZUFÜGEN</string>
|
||||||
|
|
||||||
|
<string name="alert_delete_address">Möchten Sie diese Adresse löschen?</string>
|
||||||
|
|
||||||
|
<string name="address_deleted">Ihre Adresse wurde erfolgreich gelöscht.</string>
|
||||||
<!-- MyAddressesActivity-->
|
<!-- MyAddressesActivity-->
|
||||||
|
|
||||||
<!-- yeni adres ekleme ekranı -->
|
<!-- yeni adres ekleme ekranı -->
|
||||||
<!-- AddAddressActivity-->
|
<!-- AddAddressActivity-->
|
||||||
<string name="activity_title_add_address">Neue Adresse hinzufügen</string>
|
|
||||||
<string name="add">HINZUFÜGEN</string>
|
<string name="activity_title_add_address">Neue Adresse hinzufügen</string>
|
||||||
<string name="new_address_added">Adresse wurde erfolgreich hinzugefügt.</string>
|
|
||||||
|
<string name="add">HINZUFÜGEN</string>
|
||||||
|
|
||||||
|
<string name="new_address_added">Adresse wurde erfolgreich hinzugefügt.</string>
|
||||||
<!-- AddAddressActivity-->
|
<!-- AddAddressActivity-->
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user