-
1 votesanswersviews
在alertDialog中使用微调器时出现空指针异常
这是我写的代码: // create a view in dialog box final View fileView = getLayoutInflater().inflate(R.layout.filename, null); String[] array_spinner = new String[5]; array_spinner[0]="1"; array_spinne... -
-1 votesanswersviews
Gridview的Alertdialog(Imageadpater)
活动代码: public void iconSelector(View view) { CoordinatorLayout coordinatorLayout = (CoordinatorLayout) findViewById(R.id.create_coordinator); LayoutInflater inflater = getLayoutInflater(); ... -
0 votesanswersviews
在显示时更新android对话框的ContentView而不关闭
我正在尝试使用带有下面代码段的 alertDialog.Builder 在 dialog bu中显示我的自定义视图 . AlertDialog.Builder alertViewBuilder = null; AlertDialog alertViewDialog = null; public void showPopupView(View popupView) { if (alertView... -
2 votesanswersviews
WindowLeaked - Android
我有一个WindowLeaked异常 08-21 22:04:44.405 12442-12442 / com.myapp.camera E / WindowManager:android.view.WindowLeaked:Activity com.myapp.camera.CameraActivity已泄露窗口com.android.internal.policy.impl.PhoneWin... -
0 votesanswersviews
在平板电脑上的AlertDialog中的空间顶部
Hi 我为计算矩阵开发了移动应用程序 . 今天我发现了一个有趣的问题 . 在自定义AlertDialog顶部出现空格,仅在平板电脑上: While I run the app in SmartPhones I don't have this problem: XML代码: <?xml version="1.0" encoding="utf-8"?>... -
2 votesanswersviews
解散Cupertino对话行动Flutter
在使用解释的方法解雇呈现的Cupertino警报对话动作时,我的整个屏幕都会弹出并且警报对话保留在屏幕上 . 这是我的代码 . if (deviceList.isEmpty){ var alert = new CupertinoAlertDialog( title: new Text("Alert"), content: new T... -
0 votesanswersviews
如何以及在何处在AlertDialog中的editText中添加setError
package alonso.radiobuttonquiz; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; im... -
98 votesanswersviews
如何实现自定义AlertDialog视图
在Android docs on AlertDialog中,它提供了以下用于在AlertDialog中设置自定义视图的说明和示例: 如果要显示更复杂的视图,请查找名为“body”的FrameLayout并将视图添加到其中: FrameLayout fl = (FrameLayout) findViewById(R.id.body); fl.add(myView, new LayoutParam... -
149 votesanswersviews
Android AlertDialog单键
我想要一个AlertDialog构建器,它只有一个按钮,表示OK或Done或者其他东西,而不是默认的yes和no . 可以使用标准的AlertDialog完成,还是我必须使用其他东西? -
102 votesanswersviews
如何更改AlertDialog Headers 的颜色以及其下方的线条颜色
我使用此命令更改了AlertDialog Headers 的颜色 alert.setTitle( Html.fromHtml("<font color='#FF7F27'>Set IP Address</font>")); 但我想改变 Headers 下出现的线条的颜色;我怎样才能做到这一点 ? 注意:我不想使用自定义布局 -
141 votesanswersviews
如何使用appCompat 22.1及更高版本的新AlertDialog并设置其样式
我正在尝试从默认的android AlertDialog 迁移到appCompat-22.1中包含的新内容 . 到目前为止,我了解您只需要导入 android.support.v7.app.AlertDialog 包以便使用它 . 但我该如何设计呢?例如,更改正/负按钮颜色, Headers 颜色,消息颜色和背景颜色? -
1 votesanswersviews
Android AlertDialog始终位于顶部
我正在从我的MainActivity触发AlertDialog并且它工作正常如下: public void showCustomAlert(String text){ final String alertText = text; runOnUiThread(new Runnable() { @Override public void run() ... -
0 votesanswersviews
警报框,如来自服务的吐司通知
我可以从android中的服务打开一个dialogBox吗?我想要像Toast通知这样的东西,但是我想要在我想要的时候关闭它,而不是像Toast通知那样在几秒钟后关闭它 . 我需要一个没有焦点的“弹出”警报,因此用户可以与下面的应用程序进行交互 谢谢! -
0 votesanswersviews
重定向并获取“离开此页面”警报框
重定向到另一个页面时是否可以禁止“离开此页面”警报? 我正在使用jQuery通知弹出Apprise v2,一旦我点击弹出框上的"OK"按钮,这就是我执行的代码: if (window.location.protocol != "https:") { //window.location.href ="https://" + loc... -
6 votesanswersviews
如何修复此错误:您需要在此活动中使用Theme.AppCompat主题(或后代)
我搜索了所有的互联网网站来修复这个错误,但我不能 . 我只想用两个按钮创建AlertDialog是和否 . 这是我的代码: import android.content.DialogInterface; import android.support.v7.app.AlertDialog; import android.support.v7.app.AppCompatActivity; import... -
0 votesanswersviews
如何在Service from Service类中显示一个对话框?
我有一个运行的服务,它将每30秒从服务器获取一个位置 . 现在,当我没有从服务器获取任何数据时,我想显示一个显示“Trip not not started”的弹出对话框 . 点击对话框后,想要完成活动并停止服务 . 我怎样才能做到这一点? 我的服务类如下: public class BackgroundService extends Service { private boolean i...