create order
This commit is contained in:
@@ -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(){
|
||||
|
||||
Reference in New Issue
Block a user