android.widget.TextView.setHighlightColor()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(307)

本文整理了Java中android.widget.TextView.setHighlightColor()方法的一些代码示例,展示了TextView.setHighlightColor()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextView.setHighlightColor()方法的具体详情如下:
包路径:android.widget.TextView
类名称:TextView
方法名:setHighlightColor

TextView.setHighlightColor介绍

暂无

代码示例

代码示例来源:origin: Cleveroad/AdaptiveTableLayout

@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
  super.onViewCreated(view, savedInstanceState);
  SpannableString ss = new SpannableString(getString(R.string.pick_csv_or_demo_file));
  ClickableSpan clickableSpan = new ClickableSpan() {
    @Override
    public void onClick(View textView) {
      if (PermissionHelper.checkOrRequest(CsvPickerFragment.this, REQUEST_CODE_PERMISSION_READ_EXTERNAL_STORAGE_DEMO,
          Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
        createDemoFile();
      }
    }
    @Override
    public void updateDrawState(TextPaint ds) {
      super.updateDrawState(ds);
      ds.setUnderlineText(false);
    }
  };
  ss.setSpan(clickableSpan, START_CHARACTER, END_CHARACTER, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
  tvPickFile.setText(ss);
  tvPickFile.setMovementMethod(LinkMovementMethod.getInstance());
  tvPickFile.setHighlightColor(Color.TRANSPARENT);
}

代码示例来源:origin: rey5137/material

v.setHighlightColor(appearance.getColor(attr, 0));

代码示例来源:origin: rey5137/material

v.setHighlightColor(appearance.getColor(attr, 0));
v.setHighlightColor(a.getColor(attr, 0));

代码示例来源:origin: armcha/AutoLinkTextView

@Override
public void setHighlightColor(int color) {
  super.setHighlightColor(Color.TRANSPARENT);
}

代码示例来源:origin: AlexMofer/ProjectX

@Override
public void setHighlightColor(int color) {
  mHighlightColor = color;
  super.setHighlightColor(color);
}

代码示例来源:origin: flipkart-incubator/proteus

@Override
public void setColor(T view, int color) {
 view.setHighlightColor(color);
}

代码示例来源:origin: LightSun/data-mediator

@Override
  protected void apply(Property prop, View view, Object newValue) {
    ((TextView)view).setHighlightColor((Integer) newValue);
  }
}

代码示例来源:origin: huangfangyi/FanXin

public void run() {
    ((TextView) widget).setHighlightColor(context
        .getResources().getColor(
            android.R.color.transparent));
  }
}, 1000);

代码示例来源:origin: huangfangyi/FanXin

public void run() {
  ((TextView) widget)
      .setHighlightColor(context.getResources()
          .getColor(android.R.color.transparent));
}

代码示例来源:origin: huangfangyi/FanXin

public void run() {
  ((TextView) widget)
      .setHighlightColor(context.getResources()
          .getColor(android.R.color.transparent));
}

代码示例来源:origin: huangfangyi/FanXin

public void run() {
  ((TextView) widget).setHighlightColor(context
      .getResources().getColor(
          android.R.color.transparent));
}

代码示例来源:origin: huangfangyi/FanXin

public void run() {
  ((TextView) widget).setHighlightColor(getResources()
      .getColor(android.R.color.transparent));
}

代码示例来源:origin: huangfangyi/FanXin

public void run() {
  ((TextView) widget).setHighlightColor(context
      .getResources().getColor(
          android.R.color.transparent));
}

代码示例来源:origin: huangfangyi/FanXin

@Override
public void onClick(final View widget) {
  if (widget instanceof TextView) {
    ((TextView) widget).setHighlightColor(context.getResources()
        .getColor(android.R.color.darker_gray));
    new Handler().postDelayed(new Runnable() {
      public void run() {
        ((TextView) widget)
            .setHighlightColor(context.getResources()
                .getColor(android.R.color.transparent));
      }
    }, 1000);
  }
  context.startActivity(new Intent(context, MyWebViewActivity.class)
      .putExtra("url", url));
}

代码示例来源:origin: huangfangyi/YiChat

public void run() {
    ((TextView) widget).setHighlightColor(getResources().getColor(android.R.color.transparent));
  }
}, 500);

代码示例来源:origin: huangfangyi/FanXin

public void run() {
  ((TextView) widget).setHighlightColor(getResources()
      .getColor(android.R.color.transparent));
}

代码示例来源:origin: huangfangyi/FanXin

@Override
public void onClick(final View widget) {
  if (widget instanceof TextView) {
    ((TextView) widget).setHighlightColor(context.getResources()
        .getColor(android.R.color.darker_gray));
    new Handler().postDelayed(new Runnable() {
      public void run() {
        ((TextView) widget).setHighlightColor(context
            .getResources().getColor(
                android.R.color.transparent));
      }
    }, 1000);
  }
  context.startActivity(new Intent(context, MyWebViewActivity.class)
      .putExtra("url", url));
}

代码示例来源:origin: huangfangyi/FanXin

@Override
public void onClick(final View widget) {
  if (widget instanceof TextView) {
    ((TextView) widget).setHighlightColor(getResources().getColor(
        android.R.color.darker_gray));
    new Handler().postDelayed(new Runnable() {
      public void run() {
        ((TextView) widget).setHighlightColor(getResources()
            .getColor(android.R.color.transparent));
      }
    }, 1000);
  }
  startActivity(new Intent(SocialDetailActivity.this,
      MyWebViewActivity.class).putExtra("url", url));
}

代码示例来源:origin: googlesamples/android-unsplash

@Override
public void onAnimationEnd(Animator animation) {
  textView.getOverlay().remove(drawable);
  textView.setTextColor(textColors);
  textView.setHintTextColor(hintColors);
  textView.setHighlightColor(highlightColor);
  textView.setLinkTextColor(linkColors);
}

代码示例来源:origin: DroidsOnRoids/Workcation

@Override
public void onAnimationEnd(Animator animation) {
  textView.getOverlay().remove(drawable);
  textView.setTextColor(textColors);
  textView.setHintTextColor(hintColors);
  textView.setHighlightColor(highlightColor);
  textView.setLinkTextColor(linkColors);
}

相关文章

TextView类方法