AppCompat 主题不适用于 TextView android:autoLink="phone"
AppCompat theme not applied to TextView android:autoLink="phone"
我正在将应用程序从 Holo 主题转换为 AppCompat Material 使用 AppCompat v23 库进行设计。我有一个带 android:autoLink="phone"
的 TextView,因此用户可以点击 TextView 以启动对 TextView 中显示的 phone 号码的呼叫。
当我在 Lollipop phone 上转到 activity 时,我注意到超链接正在使用默认的 material 等级颜色,而不是使用我主题中的颜色。是否可以应用 android:autoLink="phone"
为 TextView 设置主题颜色?
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autoLink="phone"
tools:text="(904) 867-5309" />
我没用过Xamarin,但我觉得和原生的逻辑是一样的android。您可以在 TextView
上添加行 android:textColorLink="yourcolorhere"
并且颜色会改变
尝试使用 android.support.v7.widget.AppCompatTextView
我正在将应用程序从 Holo 主题转换为 AppCompat Material 使用 AppCompat v23 库进行设计。我有一个带 android:autoLink="phone"
的 TextView,因此用户可以点击 TextView 以启动对 TextView 中显示的 phone 号码的呼叫。
当我在 Lollipop phone 上转到 activity 时,我注意到超链接正在使用默认的 material 等级颜色,而不是使用我主题中的颜色。是否可以应用 android:autoLink="phone"
为 TextView 设置主题颜色?
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autoLink="phone"
tools:text="(904) 867-5309" />
我没用过Xamarin,但我觉得和原生的逻辑是一样的android。您可以在 TextView
上添加行 android:textColorLink="yourcolorhere"
并且颜色会改变
尝试使用 android.support.v7.widget.AppCompatTextView