ScrollView中EditText报java.lang.IllegalArgumentException: parameter must be a descendant of this view
来源:互联网 发布:淘宝水兵舞春秋装 编辑:程序博客网 时间:2024/06/07 14:24
在ScrollView中嵌套RecyclerView,其中RecyclerView的item条目中如果有EditText,在输入文字后,出现界面退出,并报如下类似错误:
Process: com.yuguo.thecarpenter.thecarpenterrepair, PID: 22957 java.lang.IllegalArgumentException: parameter must be a descendant of this view at android.view.ViewGroup.offsetRectBetweenParentAndChild(ViewGroup.java:5476) at android.view.ViewGroup.offsetDescendantRectToMyCoords(ViewGroup.java:5401) at android.widget.ScrollView.isWithinDeltaOfScreen(ScrollView.java:1184) at android.widget.ScrollView.onSizeChanged(ScrollView.java:1599) at android.view.View.sizeChange(View.java:17193) at android.view.View.setFrame(View.java:17155) at android.view.View.layout(View.java:17047) at android.view.ViewGroup.layout(ViewGroup.java:5579) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:396) at android.widget.FrameLayout.onLayout(FrameLayout.java:333) at android.view.View.layout(View.java:17056) at android.view.ViewGroup.layout(ViewGroup.java:5579) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:2001) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1844) at android.widget.LinearLayout.onLayout(LinearLayout.java:1753) at android.view.View.layout(View.java:17056) at android.view.ViewGroup.layout(ViewGroup.java:5579) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:396)解决的办法:
参考:http://stackoverflow.com/questions/7100555/preventing-catching-illegalargumentexception-parameter-must-be-a-descendant-of;
在AndroidMainfest.xml中找到该Activity,然后添加属性:
android:windowSoftInputMode="adjustPan"
例如:
<activity android:name=".View.Activity.BalanceWorkOrderActivity" android:configChanges="keyboardHidden|orientation" android:windowSoftInputMode="adjustPan" android:theme="@style/Anim_fade" />
1 0
- ScrollView中EditText报java.lang.IllegalArgumentException: parameter must be a descendant of this view
- Android java.lang.IllegalArgumentException: parameter must be a descendant of this view
- 错误 java.lang.IllegalArgumentException: parameter must be a descendant of this view 的解决方案
- java.lang.IllegalArgumentException: parameter must be a descendant of this view
- 错误 java.lang.IllegalArgumentException: parameter must be a descendant of this view 的解决方案
- java.lang.IllegalArgumentException: parameter must be a descendant of this view 的解决方案
- java.lang.IllegalArgumentException,parameter must be a descendant of this view
- java.lang.IllegalArgumentException: parameter must be a descendant of this view
- java.lang.IllegalArgumentException parameter must be a descendant of this view
- 解决android报错IllegalArgumentException: parameter must be a descendant of this view
- Parameter must be a descendant of this view 错误
- 【转载】Parameter must be a descendant of this view问题的解决方案
- android-奇异bug:parameter must be a descendant of this view
- Android解决"parameter must be a descendant of this view(参数必须是此视图的子视图 )"问题的方法
- Android5.0报错:java.lang.IllegalArgumentException: Service Intent must be explicit
- android5.0之后必须显示调用,否则报java.lang.IllegalArgumentException: Service Intent must be explicit
- Android报错:Caused by: java.lang.IllegalArgumentException: Service Intent must be explicit: Intent
- IllegalArgumentException: view must not be null ImageLoader报错
- ionic2 导入第三方js库文件
- LeetCode : Best Time to Buy and Sell Stock
- WebRTC源码中turnserver的使用方法
- exploit
- 揭秘jbpm流程引擎内核设计思想及构架
- ScrollView中EditText报java.lang.IllegalArgumentException: parameter must be a descendant of this view
- java反射技术
- 主动学习(五)—— adaptive+improved entropy-based sampling method
- Photon服务器引擎(一)Photon简介
- 设计模式(3)--观察者模式
- PCM5242从OSS切换到ALSA问题 【君正JZ4760】
- Jake大神的三把刀
- MySQL max_allowed_packet 错误
- PLSQL语法&&游标&&存储过程/存储函数&&异常&&触发器