04 2013 档案
Android开发:View中调用自定义dialog出现的异常
摘要:异常:java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.原因:View是不能同时有两个parent的。builder.setView(linearLayout);其中linearLayout不要在Activity的onCreate()中赋值。改为在dialog中赋值就能解决此异常。LinearLayout linearLayout = (LinearLayout)findView
阅读全文
MotionEvent.ACTION_MOVE 和 UP 无效
摘要:在onTouchEvent(MotionEventevent)中发现只有MotionEvent.ACTION_DOWN有效其它值无效,修改返回值为:return true;
阅读全文
浙公网安备 33010602011771号