Esempio n. 1
0
 @Override
 public void onClick(View v) {
   VibroThread vt = VibroThread.getInstance(st.c());
   vt.runVibro(VibroThread.VIBRO_SHORT);
   close();
   switch (v.getId()) {
     case R.id.but_new_template_folder:
       st.kbdCommand(st.CMD_TPL_NEW_FOLDER);
       return;
     case R.id.but_new_template:
       st.kbdCommand(st.CMD_TPL_EDITOR);
       return;
     case R.id.clear:
       GlobDialog gd = new GlobDialog(st.c());
       gd.set(R.string.clipboard_clear, R.string.yes, R.string.no);
       gd.setObserver(
           new st.UniObserver() {
             @Override
             public int OnObserver(Object param1, Object param2) {
               if (((Integer) param1).intValue() == AlertDialog.BUTTON_POSITIVE) {
                 st.stor().clearClipboard();
               }
               return 0;
             }
           });
       gd.showAlert();
       return;
     case R.id.close:
       return;
   }
   MenuEntry me = (MenuEntry) v.getTag();
   if (m_MenuObserver != null) {
     m_MenuObserver.OnObserver(new Integer(me.id), new Boolean(false));
   }
 }
Esempio n. 2
0
 @Override
 public boolean onLongClick(View v) {
   VibroThread vt = VibroThread.getInstance(st.c());
   vt.runVibro(VibroThread.VIBRO_LONG);
   if (!st.has(m_state, STAT_CLIPBOARD)) close();
   MenuEntry me = (MenuEntry) v.getTag();
   m_longClicked = me.id;
   if (m_MenuObserver != null) {
     m_MenuObserver.OnObserver(new Integer(me.id), new Boolean(true));
   }
   return true;
 }