ICode9

精准搜索请尝试: 精确搜索
  • android – AlertDialog按钮不存在2019-07-11 22:25:33

    突然(这个项目代码没有任何变化)我开始得到一个错误: java.lang.RuntimeException: Unable to start activity ComponentInfo{<package>}: java.lang.IllegalArgumentException: Button does not exist 该错误指向尚未调用的方法. private void dialog(String title, String cont

  • Android – 以编程方式更改EditTextPreference对话框的正面按钮文本2019-07-09 19:22:48

    我试图在`EditTextPreference中更改Dialog的positiveButtonText.我试过以下但没有成功: // The reference to the preference in the view heirarchy mUrlPreference = (EditTextPreference) getPreferenceScreen().findPreference(pref); // Add a textwatcher

  • android – 如何将API 10的主题对话框转换为API 17?2019-07-03 18:20:10

    我正在尝试更改对话框的整个主题. 这是我的对话框的样式: <style name="DialogWindowTitleText"> <item name="android:textSize">28sp</item> <item name="android:textColor">@color/PRIORITY_HIGH</item> </style> <

  • android – Dialog主题动画问题2019-06-27 23:10:43

    我使用AlertDialog类创建了一个对话框.使用自定义视图.我想为它设置进入和退出动画.当我尝试执行该对话框时,将自身转换为小黑色背景视图.如何获得适当视图的动画? final AlertDialog.Builder builder = new AlertDialog.Builder( /*getContext()*/ new

  • android – 从Dialog获取价值2019-06-26 06:20:51

    我想用EditText显示一个Dialog.我设想它有两个按钮:一个正按钮,它将持久保存EditText中包含的文本;一个负按钮,它将取消并返回启动它的Activity,好像什么也没发生过一样.我尝试过使用AlertDialog但没有成功: AlertDialog.Builder builder = new Builder(context); final EditText te

  • android – 如何为活动应用光主题并同时保持对话框的黑暗主题?2019-06-25 17:12:37

    有没有办法可以为PreferenceActivity应用自定义样式,它将从Theme.Sherlock.Light或Theme.Light继承并保留preferenceDialog和AlertDialogs的黑暗样式?我可以轻松地将对话框排除在应用光样式之外吗?如果没有我应该设置哪些属性,在浅色主题中分隔符,文本活动,非活动,标题和副标题等使用

  • android – 在DialogFragment中动态添加微调器2019-06-25 12:11:25

    我想动态地在Dialog中添加我的自定义项目,如Spinner,但它不会显示.我想findviewbyid()不会访问微调器项. 我没有收到任何错误,但项目没有动态显示. 请建议一种方法. 这是我的类和xml文件: public class AlertDialogFragment extends DialogFragment { @Override public Dialog onC

  • android – 无法在自动关闭的Dialog中设置setError2019-06-24 01:20:34

    作为标题,我在EditText mEditText中设置错误时遇到问题. private AlertDialog.Builder buildDialog(String mailString) { final AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(LoginActivity.this); alertDialogBuilder.setTitle("Insert

  • android – 对话框首选项中的自定义视图2019-06-21 06:10:06

    如何在扩展的DialogPreference中设置自定义样式? public class AboutDialog extends DialogPreference { public AboutDialog(Context oContext, AttributeSet attrs) { super(oContext,attrs); //there is no such a thing like setBackground(int re

  • 改变android对话框的主题2019-06-12 16:13:12

    在我的Android应用程序中,我将应用程序的主题设置为 android:Theme.Holo.Light 我创建了对话框 final Dialog dialog = new Dialog(DropPicupProcess.this); 但是当我在应用程序中弹出一个对话框时,它显示如下. 如何将对话框的主题更改为android:Theme.Holo.Light.解决方法:而

  • android – 在DialogFragment中禁用正/负按钮2019-06-12 15:14:36

    我模仿我认为相当标准的Dialog代码: public class DChooseSeparator extends DialogFragment { // ... @Override public Dialog onCreateDialog(Bundle savedInstanceState) { AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());

  • android – 打开对话框正好在单击项目上方菜单中2019-06-09 08:12:01

    我已经创建了自定义对话框,并希望将其绑定到我的列表项.我希望此对话框在长按列表项时的行为类似于上下文菜单. 换句话说,我不希望此对话框出现在屏幕的中央,而是显示在列表中的项目附近. 我花了很多时间搜索,但遗憾的是没有结果.有一些好的解决方案吗?解决方法: btn.setOnClickL

  • android – 从另一个类调用Dialog2019-06-08 16:11:42

    我是android的初学者,而不是为每个活动中的对话重复编写代码,我只创建了一个包含显示对话框的所有方法的类,我已经给出了小代码片段 public class Dialogues extends Activity implements DialogueMethods { public void showAlertDialog(Context context, String title, St

  • android – 多个确定/取消对话框,如何判断,在onClick()中,哪个对话框?2019-05-30 10:13:26

    我创建了一个通用的OkCancelDialog类,可以通过静态方法在我的应用程序中方便地调用它: static public void Prompt(String title, String message) { OkCancelDialog okcancelDialog = new OkCancelDialog(); okcancelDialog.showAlert(title, message); } 由于

  • 没有监听器的Android对话框setNegativeButton2019-05-28 03:13:48

    这里有好奇心问题. 我使用了很多对话框构建器,大部分时间我的否定取消按钮除了关闭对话框之外什么都不做.我在网上到处找到的代码是这样的: builder.setNegativeButton( "cancel", new DialogInterface.OnClickListener() { @Override public void onClick

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有