Exemplo n.º 1
0
 @Override
 public void onClick(View v) {
   switch (v.getId()) {
     case R.id.fbNewExit:
       multiple_actions.collapse();
       getActivity().startActivityForResult(new Intent(getActivity(), ExitActivity.class), 1);
       break;
     case R.id.fbNewEntry:
       multiple_actions.collapse();
       getActivity().startActivityForResult(new Intent(getActivity(), EntryActivity.class), 1);
       break;
   }
 }
Exemplo n.º 2
0
 public void send(View view) {
   TextView textView = (TextView) findViewById(R.id.some_text);
   int id = view.getId();
   FloatingActionsMenu parentMenu = (FloatingActionsMenu) view.getParent();
   switch (id) {
     case R.id.from_curr1:
       currentFromCurrency = countries[0];
       break;
     case R.id.from_curr2:
       currentFromCurrency = countries[1];
       break;
     case R.id.from_curr3:
       currentFromCurrency = countries[2];
       break;
     case R.id.to_curr1:
       currentToCurrency = countries[0];
       break;
     case R.id.to_curr2:
       currentToCurrency = countries[1];
       break;
     case R.id.to_curr3:
       currentToCurrency = countries[2];
       break;
     default:
       break;
   }
   currentRate = rates.get(currentToCurrency) / rates.get(currentFromCurrency);
   update();
   parentMenu.collapse();
   onWindowFocusChanged(true);
 }
Exemplo n.º 3
0
 public void toggle() {
   if (mExpanded) {
     collapse();
   } else {
     expand();
   }
 }