Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-18951

Android: Setting Picker.touchEnabled (to false) crashes

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 3.5.1, Release 4.0.0
    • Fix Version/s: Release 4.1.0
    • Component/s: Android
    • Environment:

      Reproduced with 3.5.1.GA and 4.0.0.GA

    • Story Points:
      5
    • Sprint:
      2015 Sprint 12 SDK

      Description

      Setting touchEnabled to false causes the app to crash on Android:

      Reproducing code

      <Alloy>
      	<Window>
      		<Picker touchEnabled="false"/>
      	</Window>
      </Alloy>
      

      Log

      [ERROR] : TiApplication: (main) [558,558] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.reynald.test4project/org.appcelerator.titanium.TiActivity}: java.lang.RuntimeException: Don't call setOnClickListener for an AdapterView. You probably want setOnItemClickListener instead; Titanium 4.0.0,2015/05/18 15:42,9239ff9
      [ERROR] : TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.reynald.test4project/org.appcelerator.titanium.TiActivity}: java.lang.RuntimeException: Don't call setOnClickListener for an AdapterView. You probably want setOnItemClickListener instead
      [ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
      [ERROR] : TiApplication: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
      [ERROR] : TiApplication: at android.app.ActivityThread.access$600(ActivityThread.java:130)
      [ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
      [ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:99)
      [ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:137)
      [ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:4745)
      [ERROR] : TiApplication: at java.lang.reflect.Method.invokeNative(Native Method)
      [ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:511)
      [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
      [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
      [ERROR] : TiApplication: at dalvik.system.NativeStart.main(Native Method)
      [ERROR] : TiApplication: Caused by: java.lang.RuntimeException: Don't call setOnClickListener for an AdapterView. You probably want setOnItemClickListener instead
      

      Reported via Q&A:
      https://community.appcelerator.com/topic/520/app-crashed-when-using-widget-with-picker-in-it/3

        Attachments

          Activity

            People

            • Assignee:
              msamah Ashraf Abu (Inactive)
              Reporter:
              fokkezb Fokke Zandbergen
              Reviewer:
              Hieu Pham
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-19947
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration