【发布时间】:2016-11-19 12:43:57
【问题描述】:
您好,我在 19+ 版本中有一些 EditText 显示正常,但在 19 及更低版本中我得到了这个结果。 editText image
这是我的代码:
<EditText
android:id="@+id/player_name_edittext"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/name_hint"
android:contentDescription="@string/a11y_enter_player_name"
android:fontFamily="sans-serif-light"/>
这是我的styles.xml
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="DargetTheme" parent="AppTheme" />
<!-- Toolbar theme -->
<style name="ToolbarTheme" parent="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<item name="android:textColorPrimary">@color/colorWhite</item>
</style>
<!-- Settings activity theme. -->
<style name="SettingsTheme" parent="DargetTheme" />
任何帮助都会很棒!谢谢!
【问题讨论】:
-
添加这个
classpath 'com.android.tools.build:gradle:2.1.0' -
@SagarJogadia 非常感谢,这解决了问题!
标签: android colors android-edittext styles