0

我的应用程序运行良好,但在 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)

默认.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 正确设置,但单击它时应用程序崩溃

在 clickListener for views1

   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);
        }
    });
4

0 回答 0