可能な限り短くしてください。TextInputLayoutとAutoCompleteTextViewの背景がプレビューでうまく見えますが、デバイスでは常に白です。
これはTextInputLayout
<style name="TextLabel" parent="Widget.AppCompat.AutoCompleteTextView">
<!-- Hint color and label color in FALSE state -->
<item name="android:textColorHint">@color/pure_white</item>
<!-- Label color in TRUE state and bar color FALSE and TRUE State -->
<item name="colorAccent">@color/pure_white</item>
<item name="colorControlNormal">@color/pure_white</item>
<item name="colorControlActivated">@color/pure_white</item>
<!-- When everything else failed I tried this but with no effect -->
<item name="android:background">@android:color/transparent</item>
</style>
のための私のスタイルであり、これはレイアウト
<android.support.design.widget.TextInputLayout
android:theme="@style/TextLabel"
android:layout_margin="@dimen/activity_margin_basic_double"
android:layout_centerInParent="true"
android:id="@+id/team_name_container"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<AutoCompleteTextView
android:id="@+id/new_team_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/prompt_team_create"
android:maxLines="1" />
</android.support.design.widget.TextInputLayout>
で実装されており、これは私が(物理的およびエミュレートさの両方)デバイス上に得るものです:
これは私が実際に欲しいものです.Android Studioのプレビューでは正しく表示されていますが、これは単にコンパイルされません方法:
これはしてください並べ替えを取得する方法任意のアイデア?私は数日を無駄にしてしまいましたが、問題を理解することはできません。
事前に感謝します! Sloba
OMG、そんなにありがとう問題は、私が実際に適用されたことでした'style'属性を持つTextLabelスタイルですが、' android:theme'属性でそれを適用することになっていました。 –