Do wyświetlania hiperłącze na stronie na moim Android app Robię to:Jak zmienić kolor hiperłącza w android
MyProgram.java
link1.setText(Html.fromHtml(linkText1));
link1.setMovementMethod(LinkMovementMethod.getInstance());
TextView link = (TextView) findViewById(R.id.textView2);
String linkText = "Visit the <a href='http://www.mydomain.com'>My Website</a> web page.";
link.setText(Html.fromHtml(linkText));
link.setMovementMethod(LinkMovementMethod.getInstance());
// Place email address
TextView email = (TextView) findViewById(R.id.textView3);
String emailText = "Contact Me: <a href=\"mailto:[email protected]\">[email protected]</a>";
email.setText(Html.fromHtml(emailText));
email.setMovementMethod(LinkMovementMethod.getInstance());
myprogram.XML
<TextView android:text="TextView" android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#000000" android:textSize="30dp"></TextView>
<View
android:layout_width="fill_parent"
android:layout_height="30dp">
</View>
<TextView android:text="TextView" android:id="@+id/textView3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#000000" android:textSize="30dp"></TextView>
Jeśli widzisz w moim XML, próbowałem zmienić kolor na czarny (android: textColor = "# 000000"), ale wciąż nie se e każdą zmianę w hiperłączu. Kolor nadal jest domyślny, tzn. Niebieski
Dowolna pomoc?
dzięki Działało – super