我想知道,是否有任何标准视图(imageview、imagebutton、textview、button 等)类似于隐藏值?所以我需要为每个项目设置这个值,然后,例如,在 onclick 事件中从视图中获取它。
错误日志
07-11 13:06:23.263: ERROR/AndroidRuntime(989): Uncaught handler: thread main exiting due to uncaught exception
07-11 13:06:23.273: ERROR/AndroidRuntime(989): java.lang.NullPointerException
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at com.artox.relax.inf.RestaurantListBaseActivity$RestaurantListAdapter.getView(RestaurantListBaseActivity.java:95)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at android.widget.AbsListView.obtainView(AbsListView.java:1274)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at android.widget.ListView.makeAndAddView(ListView.java:1668)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at android.widget.ListView.fillDown(ListView.java:637)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at android.widget.ListView.fillFromTop(ListView.java:694)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at android.widget.ListView.layoutChildren(ListView.java:1521)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at android.widget.AbsListView.onLayout(AbsListView.java:1113)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at android.view.View.layout(View.java:6830)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at android.view.View.layout(View.java:6830)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:998)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at android.widget.LinearLayout.onLayout(LinearLayout.java:918)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at android.view.View.layout(View.java:6830)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at android.widget.RelativeLayout.onLayout(RelativeLayout.java:900)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at android.view.View.layout(View.java:6830)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at android.view.View.layout(View.java:6830)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at android.view.View.layout(View.java:6830)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at android.view.ViewRoot.performTraversals(ViewRoot.java:996)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at android.view.ViewRoot.handleMessage(ViewRoot.java:1633)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at android.os.Handler.dispatchMessage(Handler.java:99)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at android.os.Looper.loop(Looper.java:123)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at android.app.ActivityThread.main(ActivityThread.java:4363)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at java.lang.reflect.Method.invokeNative(Native Method)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at java.lang.reflect.Method.invoke(Method.java:521)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
07-11 13:06:23.273: ERROR/AndroidRuntime(989): at dalvik.system.NativeStart.main(Native Method)