/*
  * 删除操作和展示操作时候,使drawmenu正常显示;
  * */
 public void redirect(int position) {
   if (list.get(position).getId() == HomeActivity.type) {
     if (list.size() != 1) {
       if (position != list.size() - 1) {
         HomeActivity.type = Integer.parseInt(list.get(position + 1).getId() + "");
         Util.Log_wtf("typeposition+1");
       } else {
         HomeActivity.type = Integer.parseInt(list.get(0).getId() + "");
         HomeActivity.selectPosition = 0;
         Util.Log_wtf("typeposition+1");
       }
     }
   }
 }
 public void redirectForDisplay(int position) {
   int firstPos = findFirstPosition();
   if (firstPos > position) {
     Util.Log_wtf("fordisplay");
     HomeActivity.type = Integer.parseInt(list.get(position).getId() + "");
     return;
   }
   redirect(position);
 }
 private void deleteNote(int position) {
   redirect(position);
   DrawMenu targetMenu = list.get(position);
   Long index = targetMenu.getId();
   Note.deleteAll(Note.class, "type=?", index + "");
   targetMenu.delete();
   Util.Log_wtf(targetMenu.Type);
   updateList();
 }