TextView setLinkTextColor - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for TextView setLinkTextColor method.

This code example shows how to use the following methods:addLinks, getText, setLinkTextColor
        notesPreview.setVisibility(TextUtils.isEmpty(textToUse) ? View.GONE : View.VISIBLE);
        linkifyDisplayView(); 
    } 
 
    private void linkifyDisplayView() { 
        if(!TextUtils.isEmpty(notesPreview.getText())) {
            notesPreview.setLinkTextColor(Color.rgb(100, 160, 255));
            Linkify.addLinks(notesPreview, Linkify.ALL);
        } 
    } 
 
    @Override 
    protected void afterInflate() { 
        editText = (EditText) getView().findViewById(R.id.notes);
        notesPreview = (TextView) getDisplayView().findViewById(R.id.display_row_edit);
    } 
 
    @Override 
    protected void additionalDialogSetup() { 
        super.additionalDialogSetup(); 
8
CodeRank
This code example shows how to use the following methods:setLinkTextColor, setMovementMethod, setPadding, setText, setTextColor
	public void onCreate(Bundle bundle) {
		super.onCreate(bundle);
		 
		setTitle("Information");
		 
		TextView tv = new TextView(this);
		tv.setTextColor(0xffffffff);
		tv.setLinkTextColor(0xffa3b8fe);
		int p = AndroidUtils.dipToPixel(this, 10);
		tv.setPadding(p, p, p, p);
		tv.setText(Html.fromHtml(getIntent().getStringExtra("info")));
		tv.setMovementMethod(LinkMovementMethod.getInstance());
		 
		ScrollView sv = new ScrollView(this);
		sv.addView(tv);
		 
		setContentView(sv);
	} 
} 
8
CodeRank

Related TextView setLinkTextColor Questions & Answers:

setLinkTextColor Method Overview
Sets the color of links in the text.
See Code Examples for other Android TextView Methods: