问题
I don't see the line in Edittext when using TextInputLayout on Android 4.4 version tabs.
Everything is perfect on Nexus 5 which is running 6.0.
Please take a look at the screenshot:
Samsung TAB running 4.4
Nexus 5 running 6.0
Above is an XML and opening it throught a dialog. I am opening the above in dialog box something like this:
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(new ContextThemeWrapper(MainActivity.this, android.R.style.Theme_Material_Light_Dialog));
alertDialogBuilder.setView(view);
回答1:
import android.support.v7.app.AlertDialog
AlertDialog.Builder builder =
new AlertDialog.Builder(this, R.style.AppCompatAlertDialogStyle);
builder.setTitle("TITLE");
builder.setMessage("YOUR MESSAGE....");
builder.setPositiveButton("OK", null);
builder.setNegativeButton("CANCEL", null);
builder.show();
style.xml :
<style name="AppCompatAlertDialogStyle" parent="Theme.AppCompat.Light.Dialog.Alert">
<item name="colorAccent">#FFCC00</item>
<item name="android:textColorPrimary">#FFFFFF</item>
<item name="android:background">#666666</item>
</style>
来源:https://stackoverflow.com/questions/36347659/android-theme-issue-using-alertdialog-builder