New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TIMOB-26168] Android: Fix initializing of scrollbars #10142
Conversation
Gary, thanks for this fix. I attempted to cherrypick it, apply it to the 7.2.x branch, and test it out. The SDK I compiled works great on Android 6, however when I run in Android 4.1 it crashes with the following errors: [ERROR] : dalvikvm: Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method org.appcelerator.titanium.view.TiUIView.applyTouchFeedback Perhaps when I compile locally the results differ from the official build process? Is there a way I could get access to the SDK build you generated for this patch? |
@ComputerTinker Nice catch! Although it looks to be unrelated to this change. I've added the fix anyway. |
@ComputerTinker, perhaps you had a bad merge? Where it was crashing was already guarded with Also, are you setting the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR: Pass
@garymathews for some reason your fix didn't work. I don't know why there's a difference between "min target android version" and "min android version" in the compatibility matrix, but to my untrained eyes it seems as though we're forced to compile with >= v23 even though the code will run with >= v16, so perhaps that's why the (Build.VERSION.SDK_INT >= 21) check isn't catching it? @jquick-axway I made sure to do a fresh checkout of 7.2.X and cherrypicked just Gary's two patches (which only update two files) so the code seems fine to me. I'm not setting touchFeedback on the ScrollView that I know of. The XML looks like this: |
I thought I would be smart and just comment out the RippleDrawable bits in TiUIView.java, however after doing that the app still blows up, although this time in a slightly different way. The following error jumps out at me:
|
One last thing I'll mention is that my app works fine when I compile it against 7.2.0.GA (it's just that there are no scrollbars), so it seems as though a recent patch has broken Android 4.x support in the 7.2.X branch. |
I still think this is a bad merge. Instead of cherrypicking the changes over. Just copy and paste the Edit: |
@ComputerTinker You could replace |
@garymathews thanks for the jar file, and sorry about the delayed response. I tried replacing the existing titanium-ui.jar file in /Users/USER_NAME/Library/Application Support/Titanium/mobilesdk/osx/7.2.0.GA/android/modules/ with the one you provided. Then I uninstalled the old version of my app, did a Project->Clean and built again in Appcelerator Studio, but unfortunately my program blew up immediately upon launch. Parsing through the log I see a bunch of errors related to transitions, and then: [ERROR] : dalvikvm: Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method org.appcelerator.titanium.view.TiUIView.applyTouchFeedback [ERROR] : dalvikvm: Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering [ERROR] : TiApplication: (main) [358,358] Sending event: exception on thread: main msg:java.lang.NullPointerException; Titanium 7.2.0,2018/06/07 05:21,undefined I can post the entire log if you like, but I think it's largely similar to the one I posted earlier. If I put the old .jar file back and repeat the clean and recompile process, my app works again. |
@garymathews , I am seeing the same issue as @ComputerTinker , on android 4.1 app is stuck at splash |
a979a22
to
2e4c894
Compare
@lokeshchdhry Updated PR |
2e4c894
to
6b7684a
Compare
6b7684a
to
4d611e2
Compare
@garymathews, it works!! I did a fresh checkout of 7_2_X and applied your updated PR and now my app no longer longer crashes and I have scrollbars. Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR: Pass
Generated by 🚫 dangerJS |
Titanium.UI.ScrollView
TEST CASE
JIRA Ticket