2
TextView
インスタンスでsetMovementMethod(LinkMovementMethod.getInstance())
を使用していますが、タッチしたときにテキストがちらついています。これには何か解決策はありますか?LinkMovementMethodを使用しているときにテキストがちらつく
TextView
インスタンスでsetMovementMethod(LinkMovementMethod.getInstance())
を使用していますが、タッチしたときにテキストがちらついています。これには何か解決策はありますか?LinkMovementMethodを使用しているときにテキストがちらつく
@android:color/primary_text_dark_nodisable
またはandroid:color/secondary_text_dark_nodisable
をテキストビューのテキスト色として使用します。あなたは、どちらかのXMLでこれを行うことができます。
<TextView
android:textColor="@android:color/secondary_text_dark_nodisable"
/>
またはプログラム:
textView.setTextColor(activity.getResources().getColor(android.R.color.primary_text_dark_nodisable));
[リソース#GETCOLOR](http://developer.android.com/reference/android/content/res/Resources。 html#getColor%28int%29)は、複合体[ColorStateList](http://developer.android.com/reference/android/content/res/ColorStateList.html)からデフォルトの色のみを返します。したがって、与えられた例では、primary_text_darkまたはprimary_text_dark_nodisableを使用したかどうかは関係ありません。 ColorStateListを取得するには、代わりに[Resources#getColorStateList](http://developer.android.com/reference/android/content/res/Resources.html#getColorStateList%28int%29)を使用する必要があります。 – devconsole