예제 #1
0
  private void onFormattingButtonClicked(ToggleButton toggleButton) {
    String tag = toggleButton.getTag().toString();

    if (mWebView.getVisibility() == View.VISIBLE) {
      mWebView.execJavaScriptFromString("ZSSEditor.set" + StringUtils.capitalize(tag) + "();");
    } else {
      applyFormattingHtmlMode(toggleButton, tag);
    }
  }
 @Override
 public void onClick(View view) {
   if (view instanceof ToggleButton) {
     ToggleButton toggleButton = (ToggleButton) view;
     int position = (Integer) toggleButton.getTag();
     if (dataList != null && mOnItemClickListener != null && position < dataList.size()) {
       mOnItemClickListener.onItemClick(
           toggleButton, position, toggleButton.isChecked(), chooseBt);
     }
   }
 }