# AutoSpannableTextView **Repository Path**: fzyme_admin/AutoSpannableTextView ## Basic Information - **Project Name**: AutoSpannableTextView - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-06-21 - **Last Updated**: 2021-06-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # AutoSpannableTextView Support some of the key words can be clicked with the underline TextView
Step1: ```xml //key word with color and underline, and split with ','(en) //word and underline's color //underline with true and false //start with image 's TextView //default ```
Step2: ```xml //style1 //style2 ``` Step3: ```java //style1 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(); } } }); //style2 setStartImageText(tvStartImage.getText()); ``` ![](https://github.com/wangshaolei/UnderLineLinkTextView/blob/master/img/1.png) ![](https://github.com/wangshaolei/UnderLineLinkTextView/blob/master/img/2.png) ![](https://github.com/wangshaolei/UnderLineLinkTextView/blob/master/img/3.png)