create order

This commit is contained in:
2017-10-18 00:05:12 +03:00
parent 9ff89fbb47
commit 8d5806deed
31 changed files with 1500 additions and 9 deletions

View File

@@ -52,6 +52,7 @@ public class MainActivity extends BaseActivity {
private FragmentManager fragmentManager;
private String currentFragmentName = "";
private int currentCategoryId = -1;
private boolean isStartWithOrderHistory;
private ArrayList<CategoryModel> categoryList = new ArrayList<>();
private NavigationMenuRecyclerAdapter navigationMenuRecyclerAdapter;
private Badge badge;
@@ -63,9 +64,14 @@ public class MainActivity extends BaseActivity {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ButterKnife.bind(this);
getDataFromIntent();
initViews();
}
private void getDataFromIntent(){
isStartWithOrderHistory = getIntent().getBooleanExtra("isStartWithOrderHistory", false);
}
private void initViews(){
initNavigationDrawer();
initBottomNavigationView();
@@ -75,7 +81,12 @@ public class MainActivity extends BaseActivity {
private void showStartScreen(){
fragmentManager = getSupportFragmentManager();
openProductsScreen(categoryList.get(2));
if(isStartWithOrderHistory){
bottomNavigationView.setCurrentItem(2);
}
else {
openProductsScreen(categoryList.get(2));
}
}
private void initBottomNavigationView(){