- default category indext changed to dynamic
- splash screen design changed - getShiipngmethodsArray(), getPaymentMethodsArray(), addOrder2() service urls changed
This commit is contained in:
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
BIN
.idea/caches/gradle_models.ser
generated
BIN
.idea/caches/gradle_models.ser
generated
Binary file not shown.
@@ -168,7 +168,7 @@ public class MainActivity extends BaseActivity {
|
||||
bottomNavigationView.setCurrentItem(2);
|
||||
}
|
||||
else {
|
||||
openProductsScreen(categoryList.get(ApiConstants.NAVIGATION_MENU_DEFAULT_CATEGORY_INDEX));
|
||||
openProductsScreen(getDefaultCategory());
|
||||
}
|
||||
}
|
||||
private void initBottomNavigationView(){
|
||||
@@ -193,7 +193,7 @@ public class MainActivity extends BaseActivity {
|
||||
currentFragmentName = MenuFragment.FRAGMENT_NAME;
|
||||
*/
|
||||
|
||||
openProductsScreen(categoryList.get(ApiConstants.NAVIGATION_MENU_DEFAULT_CATEGORY_INDEX));
|
||||
openProductsScreen(getDefaultCategory());
|
||||
|
||||
shoppingCartImageView.setImageDrawable(grayCartDrawable);
|
||||
shoppingCartTextView.setTextColor(grayColor);
|
||||
@@ -545,4 +545,15 @@ public class MainActivity extends BaseActivity {
|
||||
}
|
||||
}
|
||||
|
||||
private CategoryModel getDefaultCategory(){
|
||||
CategoryModel defaultCategory = null;
|
||||
for(CategoryModel categoryModel: categoryList){
|
||||
if(categoryModel.isDefault()){
|
||||
defaultCategory = categoryModel;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return defaultCategory;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -47,7 +47,6 @@ import retrofit2.Response;
|
||||
|
||||
public class SplashActivity extends BaseActivity {
|
||||
|
||||
@BindView(R.id.pizzappSplashLogoImageView) ImageView pizzappSplashLogoImageView;
|
||||
@BindView(R.id.campaignBannerRecyclerView) RecyclerView campaignBannerRecyclerView;
|
||||
@BindView(R.id.postCodeTextView) TextView postCodeTextView;
|
||||
|
||||
@@ -146,14 +145,6 @@ public class SplashActivity extends BaseActivity {
|
||||
campaignBannerList.addAll(response.body().getData());
|
||||
sortCampaignBannerList();
|
||||
campaignBannerRecyclerAdapter.notifyDataSetChanged();
|
||||
if(campaignBannerList.isEmpty()){
|
||||
pizzappSplashLogoImageView.setVisibility(View.VISIBLE);
|
||||
campaignBannerRecyclerView.setVisibility(View.GONE);
|
||||
}
|
||||
else {
|
||||
pizzappSplashLogoImageView.setVisibility(View.GONE);
|
||||
campaignBannerRecyclerView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
else {
|
||||
ApiErrorUtils.parseError(response);
|
||||
|
||||
@@ -44,5 +44,4 @@ public class ApiConstants {
|
||||
public static final String ONESIGNAL_NOTIFICATION_TAG_KEY = "notificationAllowed";
|
||||
public static final String ONESIGNAL_NOTIFICATION_TAG_VALUE = "true";
|
||||
|
||||
public static final int NAVIGATION_MENU_DEFAULT_CATEGORY_INDEX = 4;
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@ public class ApiEndPoints {
|
||||
public static final String API_GET_CLEAR_CART = PREFIX + "clearBasket" + SUFFIX;
|
||||
public static final String API_GET_PRODUCTS_BY_CATEGORY = PREFIX + "getProductsByCategory" + SUFFIX;
|
||||
public static final String API_GET_PRODUCT = PREFIX + "getProduct" + SUFFIX;
|
||||
public static final String API_GET_SHIPPING_METHODS = PREFIX + "getShippingMethodsArray" + SUFFIX;
|
||||
public static final String API_GET_SHIPPING_METHODS = PREFIX + "getShippingMethods" + SUFFIX;
|
||||
public static final String API_GET_CUSTOMER_ADDRESSES = PREFIX + "getAddresses" + SUFFIX;
|
||||
public static final String API_GET_PAYMENT_METHODS = PREFIX + "getPaymentMethodsArray" + SUFFIX;
|
||||
public static final String API_GET_PAYMENT_METHODS = PREFIX + "getPaymentMethods" + SUFFIX;
|
||||
public static final String API_CHECK_UPDATE = PREFIX + "checkUpdate" + SUFFIX;
|
||||
public static final String API_FORGOT_PASSWORD = PREFIX + "forgotPassword" + SUFFIX;
|
||||
public static final String API_GET_CITY_LIST = PREFIX + "getCities" + SUFFIX;
|
||||
@@ -39,7 +39,7 @@ public class ApiEndPoints {
|
||||
public static final String API_ADD_PRODUCTS_TO_BASKET = PREFIX + "addProductsToBasket" + SUFFIX + "&token=";
|
||||
public static final String API_ADD_NEW_ADDRESS = PREFIX + "addAddress" + SUFFIX + "&token=";
|
||||
public static final String API_DELETE_ADDRESS = PREFIX + "deleteAddress" + SUFFIX + "&token=";
|
||||
public static final String API_CREATE_ORDER = PREFIX + "addOrder2" + SUFFIX + "&token=";
|
||||
public static final String API_CREATE_ORDER = PREFIX + "addOrder" + SUFFIX + "&token=";
|
||||
public static final String API_UPDATE_PASSWORD = PREFIX + "passwordUpdate" + SUFFIX + "&token=";
|
||||
public static final String API_UPDATE_PROFILE = PREFIX + "updateCustomerInfo" + SUFFIX + "&token=";
|
||||
public static final String API_REMOVE_RPODUCT_FORM_CART = PREFIX + "removeProductFromBasket" + SUFFIX + "&token=";
|
||||
|
||||
@@ -27,6 +27,10 @@ public class CategoryModel implements Serializable{
|
||||
@SerializedName("is_special")
|
||||
private boolean specialCategory;
|
||||
|
||||
@Expose
|
||||
@SerializedName("is_default")
|
||||
private boolean isDefault;
|
||||
|
||||
@Expose
|
||||
@SerializedName("product_id")
|
||||
private String specialProductId;
|
||||
@@ -102,4 +106,8 @@ public class CategoryModel implements Serializable{
|
||||
public void setSpecialProductId(String specialProductId) {
|
||||
this.specialProductId = specialProductId;
|
||||
}
|
||||
|
||||
public boolean isDefault() {
|
||||
return isDefault;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,23 +23,15 @@
|
||||
android:src="@drawable/pizzaleu_splash_logo"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_margin="16dp"
|
||||
android:scaleType="fitXY"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/campaignBannerRecyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@+id/splashButtonsLayout"
|
||||
tools:listitem="@layout/row_campaign_banner"/>
|
||||
android:scaleType="fitXY" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/splashButtonsLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/pizzappSplashLogoImageView"
|
||||
android:orientation="vertical"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_alignParentBottom="true">
|
||||
android:layout_margin="8dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/choosePostCodeLayout"
|
||||
@@ -91,4 +83,12 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/campaignBannerRecyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/splashButtonsLayout"
|
||||
android:layout_alignParentBottom="true"
|
||||
tools:listitem="@layout/row_campaign_banner"/>
|
||||
|
||||
</RelativeLayout>
|
||||
Reference in New Issue
Block a user