请告诉我,如果这种方法是安全的,或者我可以使用而不是一个普通的线程来安全地将触摸事件分配给我的活动,目的是从该onTouch()方法测试整个流程女巫触发器。 //this is the thread which fires Touch Events to my main activity
public class Monkey extends Thread {
Run r;
现在我得到像下面的一些日志ClassCastException异常(日志1) java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams cannot be cast to ClassA$1
at android.widget.LinearLayout.measureHorizontal(LinearLayout.