给TextView添加下划线,并且下划线的颜色和长度与TextView相匹配
xml中:
<TextView android:id="@+id/website_wstation" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="@dimen/font_size_smallest" android:textColor="#1583e2" android:layout_below="@+id/address2_wstation" />
java中:
TextView websiteUser;
websiteUser = (TextView)findViewById(R.id.website_wstation);
websiteUser.getPaint().setFlags(Paint. UNDERLINE_TEXT_FLAG );