示例#1
0
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
    // TODO Auto-generated method stub
    super.onOptionsItemSelected(item);
    Log.i("frank", "onCreateOptionsMenu--item.getItemId():    " + item.getTitleCondensed());
    if (item.getTitleCondensed().toString().contains("删除")) {
      Log.i("frank", "delete");
      removeDlg.show();
    }
    if (item.getTitleCondensed().toString().contains("添加")) {
      Log.i("frank", "ADD");
      addDlg.show();
    }
    if (item.getTitleCondensed().toString().contains("复制到SIM卡")) {
      Log.i("frank", "COPY");
      CopyDlg.show();
    }

    return true;
  }
示例#2
0
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {

    try {
      String split = item.getTitleCondensed().toString();

      String[] newSplit = split.split(" ");

      voltajeView.setText("Voltaje: " + newSplit[0]);

      intensidadView.setText("Intensidad: " + newSplit[1]);

    } catch (Exception e) {

      Log.w("OK", "OK");
    }

    return super.onOptionsItemSelected(item);
  }
示例#3
0
 @Override
 public CharSequence getTitleCondensed() {
   return mNativeItem.getTitleCondensed();
 }