Skip to content

Support some of the key words can be clicked with the underline TextView

License

Notifications You must be signed in to change notification settings

SwiftyWang/UnderLineLinkTextView

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

UnderLineLinkTextView

Support Maven:

allprojects {
		repositories {
			...
			maven { url "https://jitpack.io" }
		}
	}
dependencies {
	compile 'com.github.SwiftyWang:UnderLineLinkTextView:2.02'
}

Support some of the key words can be clicked with the underline TextView

    <declare-styleable name="AutoLinkStyleTextView">
        <attr name="link_text_value" format="string|reference"/>
        <attr name="link_text_color" format="color|reference"/>
        <attr name="link_text_bg_color" format="color|reference"/>
        <attr name="link_text_click_bg_color" format="color|reference"/>
        <attr name="link_text_click_bg_auto_invalidate" format="boolean"/>
        <attr name="link_has_under_line" format="boolean"/>
    </declare-styleable>

use, for example:
```xml ``` ```java autoLinkStyleTextView.setOnClickCallBack(new AutoLinkStyleTextView.ClickCallBack() { @Override public void onClick(int position) { if (position == 0) { Toast.makeText(MainActivity.this, "购买须知", Toast.LENGTH_SHORT).show(); } else if (position == 1) { Toast.makeText(MainActivity.this, "用户条款", Toast.LENGTH_SHORT).show(); } } }); ``` ![](https://github.com/wangshaolei/UnderLineLinkTextView/blob/master/img/1.png) ![](https://github.com/wangshaolei/UnderLineLinkTextView/blob/master/img/2.png)

About

Support some of the key words can be clicked with the underline TextView

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Java 100.0%