看到那个双窗口?我不知道为什么会发生这种情况.
码
像这样初始化进度对话框:
progressDialog = new ProgressDialog(context);
progressDialog.setMessage(messsage);
progressDialog.setIndeterminate(true);
progressDialog.setCancelable(false);
Run Code Online (Sandbox Code Playgroud)在值和值中定义了这样的样式-21:
<style name="AlertDialog.Theme" parent="Theme.AppCompat.Light.Dialog">
<item name="android:textColorPrimary">@color/black</item>
<item name="android:background">@color/white</item>
<item name="android:textColor">@color/black</item>
<item name="colorAccent">@color/orange</item>
<item name="colorPrimary">@color/orange</item>
<item name="colorPrimaryDark">@color/darkerorance</item>
</style>Run Code Online (Sandbox Code Playgroud)
<item name="android:dialogTheme">@style/AlertDialog.Theme</item>
<item name="dialogTheme">@style/AlertDialog.Theme</item>
<item name="android:alertDialogTheme">@style/AlertDialog.Theme</item>
<item name="alertDialogTheme">@style/AlertDialog.Theme</item>Run Code Online (Sandbox Code Playgroud)
主题延伸自Theme.AppCompat.Light.NoActionBar.
这在Lollipop及以上版本上效果很好,但在棒棒糖前的图像中看起来很像.任何人都可以帮忙,告诉我我做错了什么?
当在谷歌浏览器中查看时,我的一个页面中出现了这个错误/特征,所以我写了一个看起来像这样的测试页面
<body>
<form action="loginhandler.php">
<input type="text" id="name">
<input type="text" id="lastname">
<input type="button" value="Login">
</form>
</body>
Run Code Online (Sandbox Code Playgroud)
在这里你可以看到,输入类型不是提交类型.因此,如果你在IE,Firefox,Opera上按ENTER键,没有任何反应,这是预期的行为.但是如果你在chrome上按Enter键,无论输入类型是否提交,它都会提交.
我的问题,这是chrome的默认功能/错误还是我在这里做错了什么.?