|
|
@ -185,9 +185,6 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|
|
|
case R.string.menu_operations:
|
|
|
|
case R.string.menu_operations:
|
|
|
|
onMenuOperations();
|
|
|
|
onMenuOperations();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case R.string.menu_contacts:
|
|
|
|
|
|
|
|
onMenuContacts();
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case R.string.menu_setup:
|
|
|
|
case R.string.menu_setup:
|
|
|
|
onMenuSetup();
|
|
|
|
onMenuSetup();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -339,21 +336,20 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|
|
|
nf.format(operations));
|
|
|
|
nf.format(operations));
|
|
|
|
items.add(new DrawerItem(-3, R.string.menu_operations, R.drawable.baseline_list_24, title, operations > 0));
|
|
|
|
items.add(new DrawerItem(-3, R.string.menu_operations, R.drawable.baseline_list_24, title, operations > 0));
|
|
|
|
|
|
|
|
|
|
|
|
items.add(new DrawerItem(-4, R.drawable.baseline_person_24, R.string.menu_contacts));
|
|
|
|
items.add(new DrawerItem(-4, R.drawable.baseline_settings_applications_24, R.string.menu_setup));
|
|
|
|
items.add(new DrawerItem(-5, R.drawable.baseline_settings_applications_24, R.string.menu_setup));
|
|
|
|
items.add(new DrawerItem(-5));
|
|
|
|
items.add(new DrawerItem(-6));
|
|
|
|
items.add(new DrawerItem(-6, R.drawable.baseline_help_24, R.string.menu_legend));
|
|
|
|
items.add(new DrawerItem(-7, R.drawable.baseline_help_24, R.string.menu_legend));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (Helper.getIntentFAQ().resolveActivity(getPackageManager()) != null)
|
|
|
|
if (Helper.getIntentFAQ().resolveActivity(getPackageManager()) != null)
|
|
|
|
items.add(new DrawerItem(-8, R.drawable.baseline_question_answer_24, R.string.menu_faq));
|
|
|
|
items.add(new DrawerItem(-7, R.drawable.baseline_question_answer_24, R.string.menu_faq));
|
|
|
|
|
|
|
|
|
|
|
|
if (BuildConfig.BETA_RELEASE)
|
|
|
|
if (BuildConfig.BETA_RELEASE)
|
|
|
|
items.add(new DrawerItem(-9, R.drawable.baseline_report_problem_24, R.string.menu_issue));
|
|
|
|
items.add(new DrawerItem(-8, R.drawable.baseline_report_problem_24, R.string.menu_issue));
|
|
|
|
|
|
|
|
|
|
|
|
if (Helper.getIntentPrivacy().resolveActivity(getPackageManager()) != null)
|
|
|
|
if (Helper.getIntentPrivacy().resolveActivity(getPackageManager()) != null)
|
|
|
|
items.add(new DrawerItem(-10, R.drawable.baseline_account_box_24, R.string.menu_privacy));
|
|
|
|
items.add(new DrawerItem(-9, R.drawable.baseline_account_box_24, R.string.menu_privacy));
|
|
|
|
|
|
|
|
|
|
|
|
items.add(new DrawerItem(-11, R.drawable.baseline_info_24, R.string.menu_about));
|
|
|
|
items.add(new DrawerItem(-10, R.drawable.baseline_info_24, R.string.menu_about));
|
|
|
|
|
|
|
|
|
|
|
|
boolean pro = (getIntentPro() == null || getIntentPro().resolveActivity(getPackageManager()) != null);
|
|
|
|
boolean pro = (getIntentPro() == null || getIntentPro().resolveActivity(getPackageManager()) != null);
|
|
|
|
boolean invite = (getIntentInvite().resolveActivity(getPackageManager()) != null);
|
|
|
|
boolean invite = (getIntentInvite().resolveActivity(getPackageManager()) != null);
|
|
|
@ -361,19 +357,19 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|
|
|
boolean other = (getIntentOtherApps().resolveActivity(getPackageManager()) != null);
|
|
|
|
boolean other = (getIntentOtherApps().resolveActivity(getPackageManager()) != null);
|
|
|
|
|
|
|
|
|
|
|
|
if (pro || invite || rate || other)
|
|
|
|
if (pro || invite || rate || other)
|
|
|
|
items.add(new DrawerItem(-12));
|
|
|
|
items.add(new DrawerItem(-11));
|
|
|
|
|
|
|
|
|
|
|
|
if (pro)
|
|
|
|
if (pro)
|
|
|
|
items.add(new DrawerItem(-13, R.drawable.baseline_monetization_on_24, R.string.menu_pro));
|
|
|
|
items.add(new DrawerItem(-12, R.drawable.baseline_monetization_on_24, R.string.menu_pro));
|
|
|
|
|
|
|
|
|
|
|
|
if (invite)
|
|
|
|
if (invite)
|
|
|
|
items.add(new DrawerItem(-14, R.drawable.baseline_people_24, R.string.menu_invite));
|
|
|
|
items.add(new DrawerItem(-13, R.drawable.baseline_people_24, R.string.menu_invite));
|
|
|
|
|
|
|
|
|
|
|
|
if (rate)
|
|
|
|
if (rate)
|
|
|
|
items.add(new DrawerItem(-15, R.drawable.baseline_star_24, R.string.menu_rate));
|
|
|
|
items.add(new DrawerItem(-14, R.drawable.baseline_star_24, R.string.menu_rate));
|
|
|
|
|
|
|
|
|
|
|
|
if (other)
|
|
|
|
if (other)
|
|
|
|
items.add(new DrawerItem(-16, R.drawable.baseline_get_app_24, R.string.menu_other));
|
|
|
|
items.add(new DrawerItem(-15, R.drawable.baseline_get_app_24, R.string.menu_other));
|
|
|
|
|
|
|
|
|
|
|
|
drawerArray.set(items);
|
|
|
|
drawerArray.set(items);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -865,15 +861,6 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|
|
|
fragmentTransaction.commit();
|
|
|
|
fragmentTransaction.commit();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void onMenuContacts() {
|
|
|
|
|
|
|
|
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
|
|
|
|
|
|
|
|
getSupportFragmentManager().popBackStack("contacts", FragmentManager.POP_BACK_STACK_INCLUSIVE);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
|
|
|
|
|
|
|
fragmentTransaction.replace(R.id.content_frame, new FragmentContacts()).addToBackStack("contacts");
|
|
|
|
|
|
|
|
fragmentTransaction.commit();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void onMenuSetup() {
|
|
|
|
private void onMenuSetup() {
|
|
|
|
startActivity(new Intent(ActivityView.this, ActivitySetup.class));
|
|
|
|
startActivity(new Intent(ActivityView.this, ActivitySetup.class));
|
|
|
|
}
|
|
|
|
}
|
|
|
|