use of org.eyeseetea.malariacare.DashboardActivity in project pictureapp by EyeSeeTea.
the class StockFragment method showHistoricReceiptBalanceFragment.
private void showHistoricReceiptBalanceFragment(int type) {
Activity activity = getActivity();
if (activity != null) {
HistoricReceiptBalanceFragment historicReceiptBalanceFragment = new HistoricReceiptBalanceFragment();
Bundle bundle = new Bundle();
bundle.putInt(HistoricReceiptBalanceFragment.TYPE, type);
historicReceiptBalanceFragment.setArguments(bundle);
replaceFragment(R.id.dashboard_stock_container, historicReceiptBalanceFragment);
int headerString = R.string.fragment_historic_receipt_balance;
if (type == Constants.SURVEY_RESET) {
headerString = R.string.fragment_historic_reset;
}
DashboardHeaderStrategy.getInstance().init(activity, headerString);
if (activity instanceof DashboardActivity) {
((DashboardActivity) activity).initNewReceiptFragment();
}
}
}
use of org.eyeseetea.malariacare.DashboardActivity in project pictureapp by EyeSeeTea.
the class StockFragment method showNewReceiptBalanceFragment.
private void showNewReceiptBalanceFragment(int type) {
Activity activity = getActivity();
if (activity != null) {
NewReceiptBalanceFragment newReceiptBalanceFragment = new NewReceiptBalanceFragment();
Bundle bundle = new Bundle();
bundle.putInt(NewReceiptBalanceFragment.TYPE, type);
newReceiptBalanceFragment.setArguments(bundle);
replaceFragment(R.id.dashboard_stock_container, newReceiptBalanceFragment);
int headerString = R.string.fragment_new_receipt;
if (type == Constants.SURVEY_RESET) {
headerString = R.string.fragment_new_reset;
}
DashboardHeaderStrategy.getInstance().init(activity, headerString);
if (activity instanceof DashboardActivity) {
((DashboardActivity) activity).initNewReceiptFragment();
}
}
}
Aggregations