Will Daniel, now has his own encounter a problem, get yourself an example of a contact's listview, but the press, then the error, first put the code,
public class ListviewtestActivity extends Activity
@ Override
protected void onCreate (Bundle savedInstanceState) {
super.onCreate (savedInstanceState);
setContentView (R.layout.activity_listviewtest);
final List
Press the error log, reporting null pointer error
FATAL EXCEPTION: main
java.lang.NullPointerException
at com.android.internal.policy.impl.PhoneWindow $ DecorView $ ActionModeCallbackWrapper.onCreateActionMode (PhoneWindow.java: 2709)
at com.android.internal.app.ActionBarImpl $ ActionModeImpl.dispatchOnCreate (ActionBarImpl.java: 945)
at com.android.internal.app.ActionBarImpl.startActionMode (ActionBarImpl.java: 515)
at android.app.Activity.onWindowStartingActionMode (Activity.java: 4962)
at com.android.internal.policy.impl.PhoneWindow $ DecorView.startActionMode (PhoneWindow.java: 2414)
at com.android.internal.policy.impl.PhoneWindow $ DecorView.startActionModeForChild (PhoneWindow.java: 2401)
at android.view.ViewGroup.startActionModeForChild (ViewGroup.java: 654)
at android.view.ViewGroup.startActionModeForChild (ViewGroup.java: 654)
at android.view.ViewGroup.startActionModeForChild (ViewGroup.java: 654)
at android.view.View.startActionMode (View.java: 4381)
at android.widget.AbsListView.performLongPress (AbsListView.java: 2832)
at android.widget.AbsListView $ CheckForLongPress.run (AbsListView.java: 2792)
at android.os.Handler.handleCallback (Handler.java: 725)
at android.os.Handler.dispatchMessage (Handler.java: 92)
at android.os.Looper.loop (Looper.java: 137)
at android.app.ActivityThread.main (ActivityThread.java: 5199)
at java.lang.reflect.Method.invokeNative (Native Method)
at java.lang.reflect.Method.invoke (Method.java: 511)
at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run (ZygoteInit.java: 797)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java: 564)
at dalvik.system.NativeStart.main (Native Method)
Please tell brother Daniel in the end is where the problem that way for a long time will not own debugging<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply: Reply own right, resolved, because the property is set listview inside a multiple-selection android: choiceMode = "multipleChoiceModal"
But he is still not sure why it went wrong
No comments:
Post a Comment