Um es so kurz wie möglich zu halten.TextInputLayout und AutoCompleteTextView Hintergrund sieht in der Vorschau gut aus, aber auf dem Gerät ist es immer weiß
Das ist mein Stil für 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>
Und das ist die Umsetzung im Layout
<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>
Und das ist, was ich auf dem Gerät erhalten (sowohl physisch als auch emulierte):
Aber das ist, was ich eigentlich will und Android Studio Vorschau tatsächlich zeigt es richtig, es wird nur nicht kompilieren Übrigens:
Irgendwelche Ideen, wie diese bitte sortiert erhalten? Ich habe einige Tage vergeudet, um dieses herauszufinden, aber kann einfach nicht das Problem
Vielen Dank im Voraus! Sloba
OMG, ich danke Ihnen so sehr das Problem war, dass ich tatsächlich anwandte der TextLabel-Stil mit dem Attribut 'style', aber ich sollte ihn mit dem Attribut 'android: theme' anwenden. –