在ListFragment子类中直接调用setEmptyText(getString(R.string.msg_no_invited_parties)), 抛java.lang.IllegalStateException: Can't be used with a custom content view

改用 ((TextView)getListView().getEmptyView()).setText(getString(R.string.msg_no_invited_parties)); 则没问题。

[Android]ListFragment.setEmptyText() 抛 java.lang.IllegalStateException的更多相关文章

  1. Android开发之Okhttp:java.lang.IllegalStateException: closed

    在使用Okhttp的时候 运行到response.body().string()一步时抛异常,java.lang.IllegalStateException: closed 查阅各种资料大致意思是Th ...

  2. Android 学习之异常总结--java.lang.IllegalStateException:Could not execute method of the activity

    在android学习过程中通常会遇到java.lang.IllegalStateException:Could not execute method of the activity这个错误:非法状态的 ...

  3. android TimerTask 的简单应用,以及java.lang.IllegalStateException: TimerTask is scheduled already错误的解决方法【转】

    Android应用开发中常常会用到定时器,不可避免的需要用到 TimerTask 定时器任务这个类下面简单的一个示例演示了如何使用TimerTask这个示例演示了3秒未有触屏事件发生则锁屏(只是设置下 ...

  4. Caused by:java.lang.IllegalStateException at android.media.MediaPlayer._setDataSource(Native Method)

    使用Mediaplayer播放本地音频,在第二次调用mediaplayer.setDataSource()时报错如下: Caused by: java.lang.IllegalStateExcepti ...

  5. 【我的Android进阶之旅】解决sqlcipher库:java.lang.IllegalStateException: get field slot from row 0 col 0 failed.

    一.背景 最近维护公司的大数据SDK,在大数据SDK里面加入了ANR的监控功能,并将ANR的相关信息通过大数据埋点的方式记录到了数据库中,然后大数据上报的时候上报到大数据平台,这样就可以实现ANR性能 ...

  6. 使用Servlet3.0新特性asyncSupported=true时抛异常java.lang.IllegalStateException: Not supported

    最近在运用Servlet3.0新特性:异步处理功能的时候出现以下了2个问题: 运行时会抛出以下两种异常: 一月 19, 2014 3:07:07 下午 org.apache.catalina.core ...

  7. [Android Pro] java.lang.IllegalStateException: Fragment(XXFragment) not attached to Activity异常

    转载:http://blog.csdn.net/winson_jason/article/details/20357435 下边两个问题,是在开发中碰到的一些关于Fragment的偶发性的问题,今天时 ...

  8. Android开发中使用数据库时出现java.lang.IllegalStateException: Cannot perform this operation because the connection pool has been closed.

    最近在开发一个 App 的时候用到了数据库,可是在使用数据库的时候就出现了一些问题,在我查询表中的一些信息时出现了一下问题: Caused by: java.lang.IllegalStateExce ...

  9. AOP拦截日志类,抛异常:java.lang.IllegalStateException: It is illegal to call this method if the current request is not in asynchronous mode

    AOP的日志拦截类中,抛出异常: java.lang.IllegalStateException: It is illegal to call this method if the current r ...

随机推荐

  1. C# 7.0 新特性3: 模式匹配

    本文参考Roslyn项目Issue:#206,及Docs:#patterns. 1. C# 7.0 新特性1: 基于Tuple的“多”返回值方法 2. C# 7.0 新特性2: 本地方法 3. C# ...

  2. 深入理解python的yield和generator

    原文发表在我的博客主页,转载请注明出处 前言 没有用过的东西,没有深刻理解的东西很难说自己会,而且被别人一问必然破绽百出.虽然之前有接触过python协程的概念,但是只是走马观花,这两天的一次交谈中, ...

  3. weinre 简记

    在入职不久接触了移动端WEB开发,刚开始遇到的问题就是调试的问题.在PC端的时候,我常常纠结在IE与IE之间,主要的兼容问题还是IE一家子和他们的亲戚(啥多核浏览器,也是各种坑不断)之间.IE虽然问题 ...

  4. Ext.NET-基础篇

    概述 本文介绍Ext.NET的基本概念,安装配置.布局以及容器,最后介绍了DirectEvents.DirectMethod.Listener,并提供了示例代码. 示例代码下载地址>>&g ...

  5. 从Evernote迁移到Wiz

    实在受不了evernote没完没了的弹出广告和让升级账号,我不过就是想安安静静的记个笔记,真不想看您的广告好吧.于是无奈这下,只能选择转换到别的笔记工具阵营. 由于以前一直听说OneNote是仅次于E ...

  6. CSS Bug

    父子标签间用margin的问题,表现在有时除IE(6/7)外的浏览器子标签margin转移到了父标签上,IE6&7下没有转移.测试代码: <body> <style type ...

  7. Hibernate之Annotation(注解的方式,非映射)

    在hibernate 3.0之后,可以建立一个符合JPA标准的Annotation,以hibernate3.3.2GA为例 Annotation 以 hibernate Annotation 3.3. ...

  8. Linux 配置只安装 64 位软件包

    Centos.RHEL等系统,yum 安装的时候有时候会安装32的,然而我们只需要安装64位的软件! 解决方法: yum只安装 64 位的包,只需在 /etc/yum.conf 中加入 "e ...

  9. 如何在UIimageview里显示一张图片里的某一部分

    首先,获取想要显示的部分的大小及位置 CGRect rect: 然后,将此部分从图片中剪切出来 CGImageRef imageRef=CGImageCreateWithImageInRect([im ...

  10. 腾讯云CentOS 安装MediaWiki

    参考 : https://www.digitalocean.com/community/tutorials/how-to-install-mediawiki-on-centos-7 //安装好很多次终 ...