我的应用程序工作正常但在default.css中添加按钮后,我在点击按钮时出现以下错误
02-27 07:42:33.003: E/AndroidRuntime(1944): java.lang.StackOverflowError
02-27 07:42:33.003: E/AndroidRuntime(1944): at java.util.WeakHashMap.poll(WeakHashMap.java:569)
02-27 07:42:33.003: E/AndroidRuntime(1944): at java.util.WeakHashMap.getEntry(WeakHashMap.java:496)
02-27 07:42:33.003: E/AndroidRuntime(1944): at java.util.WeakHashMap.containsKey(WeakHashMap.java:280)
02-27 07:42:33.003: E/AndroidRuntime(1944): at com.pixate.freestyle.PXHierarchyListener.addGlobalLayoutListener(PXHierarchyListener.java:184)
02-27 07:42:33.003: E/AndroidRuntime(1944): at com.pixate.freestyle.PXHierarchyListener.setFor(PXHierarchyListener.java:114)
02-27 07:42:33.003: E/AndroidRuntime(1944): at com.pixate.freestyle.util.ViewUtil.prepareViewGroupListeners(ViewUtil.java:113)
02-27 07:42:33.003: E/AndroidRuntime(1944): at com.pixate.freestyle.PXHierarchyListener.onChildViewAdded(PXHierarchyListener.java:66)
02-27 07:42:33.003: E/AndroidRuntime(1944): at android.widget.TableLayout$PassThroughHierarchyChangeListener.onChildViewAdded(TableLayout.java:771)
02-27 07:42:33.003: E/AndroidRuntime(1944): at com.pixate.freestyle.PXHierarchyListener.onChildViewAdded(PXHierarchyListener.java:85)
default.css
#views1{
background-color:#FFFFFF;
height: 35px;
border-radius : 5px;
border-width : 3px;
border-color : #3369e8 ;
color : #3369e8 ;
}
#views1:pressed{
background-color:#3369e8;
height: 35px;
border-radius : 5px;
border-width : 3px;
border-color : #3369e8;
color : #FFFFFF;
}
这里views1是按钮的名称
注意:按钮由pixate正确设置样式,但应用程序在点击时崩溃
对于views1的clickListener
views1.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
Bundle bu = new Bundle();
bu.putInt("num", 1);
Intent i = new Intent(MainActivityParser.this,ViewSample.class);
i.putExtras(bu);
startActivity(i);
}
});