android - "onClick" in AutocompleteTextView causes an error -


i have autocompletetextview. want method run "onclick". here xml:

        <autocompletetextview             android:id="@+id/givenbybox"             android:layout_width="fill_parent"             android:layout_height="wrap_content"             android:onclick="setupmiranda"             android:gravity="left"              /> 

when run, errors. doesn't matter onclick set to, cause error. if remove android:onclick line works fine, not want.

here excerpt logcat:

08-07 13:56:36.040: e/androidruntime(32735): fatal exception: main 08-07 13:56:36.040: e/androidruntime(32735): java.lang.runtimeexception: unable start activity componentinfo{com.itsmr.dre_android_clean/com.itsmr.dre_android_clean.mainactivity}: android.view.inflateexception: binary xml file line #46: error inflating class <unknown> 08-07 13:56:36.040: e/androidruntime(32735):    @ android.app.activitythread.performlaunchactivity(activitythread.java:2110) 08-07 13:56:36.040: e/androidruntime(32735):    @ android.app.activitythread.handlelaunchactivity(activitythread.java:2135) 08-07 13:56:36.040: e/androidruntime(32735):    @ android.app.activitythread.access$700(activitythread.java:140) 08-07 13:56:36.040: e/androidruntime(32735):    @ android.app.activitythread$h.handlemessage(activitythread.java:1237) 08-07 13:56:36.040: e/androidruntime(32735):    @ android.os.handler.dispatchmessage(handler.java:99) 08-07 13:56:36.040: e/androidruntime(32735):    @ android.os.looper.loop(looper.java:137) 08-07 13:56:36.040: e/androidruntime(32735):    @ android.app.activitythread.main(activitythread.java:4921) 08-07 13:56:36.040: e/androidruntime(32735):    @ java.lang.reflect.method.invokenative(native method) 08-07 13:56:36.040: e/androidruntime(32735):    @ java.lang.reflect.method.invoke(method.java:511) 08-07 13:56:36.040: e/androidruntime(32735):    @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:1038) 08-07 13:56:36.040: e/androidruntime(32735):    @ com.android.internal.os.zygoteinit.main(zygoteinit.java:805) 08-07 13:56:36.040: e/androidruntime(32735):    @ dalvik.system.nativestart.main(native method) 08-07 13:56:36.040: e/androidruntime(32735): caused by: android.view.inflateexception: binary xml file line #46: error inflating class <unknown> 08-07 13:56:36.040: e/androidruntime(32735):    @ android.view.layoutinflater.createview(layoutinflater.java:613) 08-07 13:56:36.040: e/androidruntime(32735):    @ com.android.internal.policy.impl.phonelayoutinflater.oncreateview(phonelayoutinflater.java:56) 08-07 13:56:36.040: e/androidruntime(32735):    @ android.view.layoutinflater.oncreateview(layoutinflater.java:660) 08-07 13:56:36.040: e/androidruntime(32735):    @ android.view.layoutinflater.createviewfromtag(layoutinflater.java:685) 08-07 13:56:36.040: e/androidruntime(32735):    @ android.view.layoutinflater.rinflate(layoutinflater.java:746) 08-07 13:56:36.040: e/androidruntime(32735):    @ android.view.layoutinflater.rinflate(layoutinflater.java:749) 08-07 13:56:36.040: e/androidruntime(32735):    @ android.view.layoutinflater.rinflate(layoutinflater.java:749) 08-07 13:56:36.040: e/androidruntime(32735):    @ android.view.layoutinflater.inflate(layoutinflater.java:489) 08-07 13:56:36.040: e/androidruntime(32735):    @ android.view.layoutinflater.inflate(layoutinflater.java:396) 08-07 13:56:36.040: e/androidruntime(32735):    @ android.view.layoutinflater.inflate(layoutinflater.java:352) 08-07 13:56:36.040: e/androidruntime(32735):    @ com.android.internal.policy.impl.phonewindow.setcontentview(phonewindow.java:316) 08-07 13:56:36.040: e/androidruntime(32735):    @ android.app.activity.setcontentview(activity.java:1924) 08-07 13:56:36.040: e/androidruntime(32735):    @ com.itsmr.dre_android_clean.mainactivity.oncreate(mainactivity.java:81) 08-07 13:56:36.040: e/androidruntime(32735):    @ android.app.activity.performcreate(activity.java:5188) 08-07 13:56:36.040: e/androidruntime(32735):    @ android.app.instrumentation.callactivityoncreate(instrumentation.java:1094) 08-07 13:56:36.040: e/androidruntime(32735):    @ android.app.activitythread.performlaunchactivity(activitythread.java:2074) 08-07 13:56:36.040: e/androidruntime(32735):    ... 11 more 08-07 13:56:36.040: e/androidruntime(32735): caused by: java.lang.reflect.invocationtargetexception 08-07 13:56:36.040: e/androidruntime(32735):    @ java.lang.reflect.constructor.constructnative(native method) 08-07 13:56:36.040: e/androidruntime(32735):    @ java.lang.reflect.constructor.newinstance(constructor.java:417) 08-07 13:56:36.040: e/androidruntime(32735):    @ android.view.layoutinflater.createview(layoutinflater.java:587) 08-07 13:56:36.040: e/androidruntime(32735):    ... 26 more 08-07 13:56:36.040: e/androidruntime(32735): caused by: java.lang.nullpointerexception 08-07 13:56:36.040: e/androidruntime(32735):    @ android.widget.autocompletetextview$passthroughclicklistener.access$302(autocompletetextview.java:1226) 08-07 13:56:36.040: e/androidruntime(32735):    @ android.widget.autocompletetextview.setonclicklistener(autocompletetextview.java:200) 08-07 13:56:36.040: e/androidruntime(32735):    @ android.view.view.<init>(view.java:3678) 08-07 13:56:36.040: e/androidruntime(32735):    @ android.widget.textview.<init>(textview.java:574) 08-07 13:56:36.040: e/androidruntime(32735):    @ android.widget.edittext.<init>(edittext.java:76) 08-07 13:56:36.040: e/androidruntime(32735):    @ android.widget.autocompletetextview.<init>(autocompletetextview.java:137) 08-07 13:56:36.040: e/androidruntime(32735):    @ android.widget.autocompletetextview.<init>(autocompletetextview.java:133) 08-07 13:56:36.040: e/androidruntime(32735):    ... 29 more 

i error no matter function set onclick. function empty body causes error.

what causing error?


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -