今天在做自定义ViewGroup中,出现了一下错误提示
Use View.isInEditMode() in your custom views to skip code when shown in Eclipse
具体解决方法:
在eclipse error log中查看错误具体出现在哪一行,然后将
if (isInEditMode()) { return; }加入即可。
这种方法同样适用于 xml布局文件中null错误。
java.lang.NullPointerException
Exception details are logged in Window > Show View > Error Log

Use View.isInEditMode() in your custom views to skip code when shown in Eclipse的更多相关文章

  1. tip use view.isineditmode() in your custom views to skip code when shown in eclipse

    tip use view.isineditmode() in your custom views to skip code when shown in eclipse

  2. 开发错误记录1:解决:Only the original thread that created a view hierarchy can touch its views.

    今天在项目中要使用圆角头像,导入开源 CircleImageView ,然后setImageBitmap()时 运行时就会发现,它会报一个致命性的异常:: · ERROR/AndroidRuntime ...

  3. Only the original thread that created a view hierarchy can touch its views

    在调试软件的时候出现如下的错误: 01-05 20:53:36.492: E/ZZShip(2043): android.view.ViewRootImpl$CalledFromWrongThread ...

  4. 浅析Android中的消息机制-解决:Only the original thread that created a view hierarchy can touch its views.

    在分析Android消息机制之前,我们先来看一段代码: public class MainActivity extends Activity implements View.OnClickListen ...

  5. Android: Only the original thread that created a view hierarchy can touch its views 异常

    最近自己再写一个小项目练手,创建一个线程从网络获取数据然后显示在 recyclerView 上.写好后发现页面能够显示,但是有时候会把请求的数据显示过来,有时候不会.点开 android monito ...

  6. Only the original thread that created a view hierarchy can touch its views解决办法

    这周操作系统作业布置了一个作业,内容是做个小软件,来模拟消费者生产者问题,作业实现起来不来,因为之前写过这个算法,所以关键步骤就是在消费和生产的时候更新缓存区的UI控件就行,之后问题就来了,出现了标题 ...

  7. 错误:Only the original thread that created a view hierarchy can touch its views——Handler的使用

    在跟随教程学习到显示web页面的html源码时报错:Only the original thread that created a view hierarchy can touch its views ...

  8. 子线程调用invalidate()产生“Only the original thread that created a view hierarchy can touch its views.”原因分析

    目录 1.异常出处 2.从View.invalidate()方法开始分析 3.ViewRootImpl如何与View进行关联:从Activity的setContentView开始分析 3.1 最顶层的 ...

  9. 第15.18节 PyQt(Python+Qt)入门学习:Model/View架构中视图Item Views父类详解

    老猿Python博文目录 老猿Python博客地址 一.概述 在PyQt图形界面中,支持采用Model/View架构实现数据和界面逻辑分离,其中Model用于处理数据存储,View用于界面数据展现,当 ...

随机推荐

  1. DOM操作-遍历HTML文档内容

    基础:   JS nodeType返回类型:http://blog.csdn.net/qyf_5445/article/details/9232907 代码: <!DOCTYPE html> ...

  2. git fetch pull checkout区别

    Git中从远程的分支获取最新的版本到本地有这样2个命令: 1. git fetch:相当于是从远程获取最新版本到本地,不会自动merge <p style="margin-top: 0 ...

  3. SharePoint 2010 Modal Dialog

    SharePoint 2010 Modal Dialog Tweet   Modal dialog play very important role to improve the user exper ...

  4. StartSSL证书申请

    StartSSL官方地址: http://www.startssl.com/ 申请过程: 1)填写资料 2) 获取得验证码 3)提交验证码,等待6小时审核. 4)再次获得验证码,提交等待审核 5)审核 ...

  5. Lotto

    Lotto Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 65536/32768K (Java/Other) Total Submiss ...

  6. tar.gz tar.bz2 解压

    从网络上下载到的源码包, 最常见的是 .tar.gz 包, 还有一部分是 .tar.bz2包   要解压很简单 :   .tar.gz     格式解压为          tar   -zxvf   ...

  7. linux文件权限赋值

    1修改权限     命令:chmod (change mode)     功能:改变文件的读写和执行权限.有符号法和八进制数字法.     选项:(1)符号法:   命令格式:chmod {u|g|o ...

  8. 缩放系列(一):一个很好的bitmap手势缩放demo(多点触控)

    认识事物都遵循由简入繁的顺序,下面我们想实现一个控件或者一个布局的缩放,先从简单的例子开始吧,我们就以缩放图片做入门. 效果图: 一.要求 利用ScaleGestureDetector这个类实现图片缩 ...

  9. Java 类的加载过程(阿里面试题)

    问以下程序打印出什么内容: 问题及解析如下: /** * 加载方法不等于执行方法,初始化变量则会赋值 * 类加载顺序应为 加载静态方法-初始化静态变量-执行静态代码块 * 实例化时 先加载非静态方法- ...

  10. 关于iOS socket都在这里了

    socket(套接字)是通信的基石,是支持TCP/IP协议的网络通信的基本操作单元,包含进行网络通信必须的五种信息:连接使用的协议,本地主机的IP地址,本地进程的协议端口,远地主机的IP地址,远地进程 ...