@Override
          public void onClick(DialogInterface dialog, int which) {
            String tag = tagEditText.getText().toString().trim();
            if (!tag.isEmpty()) {
              tagView.setText(tag);
            }
          }
Show a dialog for user to change the tag, empty text is not allowed.
xlog-sample/src/main/java/com/elvishew/xlogsample/MainActivity.java