Esempio n. 1
0
 @Override
 protected void configureMenu11(Menu menu, int count, AbsListView lv) {
   super.configureMenu11(menu, count, lv);
   switch (lv.getId()) {
     case R.id.list:
       SparseBooleanArray checkedItemPositions = mListView.getCheckedItemPositions();
       boolean hasForeignExchangeTransfer = false, hasPlan = false;
       for (int i = 0; i < checkedItemPositions.size(); i++) {
         if (checkedItemPositions.valueAt(i)
             && isForeignExchangeTransfer(checkedItemPositions.keyAt(i))) {
           hasForeignExchangeTransfer = true;
           break;
         }
       }
       for (int i = 0; i < checkedItemPositions.size(); i++) {
         if (checkedItemPositions.valueAt(i) && isPlan(checkedItemPositions.keyAt(i))) {
           hasPlan = true;
           break;
         }
       }
       configureMenuInternal(menu, count, hasForeignExchangeTransfer, hasPlan);
       break;
     case R.id.calendar_gridview:
       requirePlanMonthFragment().configureMenu11(menu, count, lv);
   }
 }
Esempio n. 2
0
 @Override
 protected void inflateHelper(Menu menu, int listId) {
   switch (listId) {
     case R.id.list:
       super.inflateHelper(menu, listId);
       break;
     case R.id.calendar_gridview:
       getActivity().getMenuInflater().inflate(R.menu.planlist_context, menu);
   }
 }
Esempio n. 3
0
 @Override
 protected void configureMenuLegacy(Menu menu, ContextMenu.ContextMenuInfo menuInfo, int listId) {
   super.configureMenuLegacy(menu, menuInfo, listId);
   switch (listId) {
     case R.id.list:
       AdapterContextMenuInfo info = (AdapterContextMenuInfo) menuInfo;
       configureMenuInternal(
           menu, 1, isForeignExchangeTransfer(info.position), isPlan(info.position));
       break;
     case R.id.calendar_gridview:
       requirePlanMonthFragment().configureMenuLegacy(menu, menuInfo);
   }
 }
Esempio n. 4
0
 @Override
 public void onSaveInstanceState(Bundle outState) {
   super.onSaveInstanceState(outState);
   Icepick.saveInstanceState(this, outState);
 }
Esempio n. 5
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setHasOptionsMenu(true);
   Icepick.restoreInstanceState(this, savedInstanceState);
 }