Skip to content
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

No Indeterminate ProgressBar/Horizontal in Samsung device, Android 5.0 #1

Closed
trietbui85 opened this issue Jun 9, 2015 · 11 comments
Closed
Assignees
Labels

Comments

@trietbui85
Copy link

My device is: Samsung Galaxy S5, Android 5.0.

As you can see in below screenshot, there is native implementation of Indeterminate ProgressBar, but no one in library implementation. The same issue with ProgressBar on Toolbar.

image

@zhanghai
Copy link
Owner

zhanghai commented Jun 9, 2015

Seems that the ProgressBar on that platform is not happy to start our animation. Will investigate it later today.

@zhanghai
Copy link
Owner

zhanghai commented Jun 9, 2015

Could you please test for this sample APK?

I tried to set the progress drawable in style to @null to avoid the overhead of loading a drawable that's bound to be replaced, but on my Samsung S4 5.0.1 the determinate horizontal progress won't show up (but the indeterminate ones worked fine on my three testing devices). So I guess it is possiblely a similar issue.

@trietbui85
Copy link
Author

@DreaminginCodeZH I still got the same issue as the old build: both Indeterminate ProgressBar and Horizontal of native implementation don't show as expected.

@zhanghai zhanghai added the bug label Jun 9, 2015
@zhanghai zhanghai self-assigned this Jun 9, 2015
@zhanghai
Copy link
Owner

zhanghai commented Jun 9, 2015

Tested on a Samsung S4 5.0.1, a Samsung 4.3, an Android-x86 4.4.2, an Android-x86 5.0, an Android-x86 5.0.1, a Cyanogenmod 5.0.2, a crDriod 5.0.2, cannot reproduce this bug. Seems to be a Samsung-specific regression that has been fixed.

Just to be sure, what is your Android version specifically? is it plain 5.0, or 5.0.1, or 5.0.2?

It can be helpful if you can provide some related adb log, and a PR is also welcomed.

@trietbui85
Copy link
Author

Hi, my phone run Android plain 5.0.

However this morning, when I try to clone your repo, and use AppCompat lib v22.1.0 (I haven't updated my Android support lib to v22.2.0 yet), then I see no issue with Indeterminate ProgressBar and Horizontal.

Will try with AppCompat v22.2.0 and let you know later.

image

@zhanghai
Copy link
Owner

So when you're running the compiled sample apk from this repo (with appcompat 22.2), the indetermianate progress won't show up. But when you compile it against appcompat 22.1, it works. Did I get it right?

Just a piece of information. If this is an appcompat related issue, the main usage of it in this library is PathInterpolatorCompat, however there should be no problem related to it since implementation on 5.0+ should delegate the call to native implementation.

And here are all the usages:

$ grep -r 'import android\.support'
sample/src/main/java/me/zhanghai/android/materialprogressbar/sample/MainActivity.java:import android.support.v7.app.AppCompatActivity;
sample/src/main/java/me/zhanghai/android/materialprogressbar/sample/AboutActivity.java:import android.support.v7.app.AppCompatActivity;
sample/src/main/java/me/zhanghai/android/materialprogressbar/sample/AppUtils.java:import android.support.v4.app.NavUtils;
sample/src/main/java/me/zhanghai/android/materialprogressbar/sample/AppUtils.java:import android.support.v4.app.TaskStackBuilder;
library/src/main/java/me/zhanghai/android/materialprogressbar/internal/ObjectAnimatorCompatBase.java:import android.support.annotation.Size;
library/src/main/java/me/zhanghai/android/materialprogressbar/ProgressDrawableBase.java:import android.support.v4.view.ViewCompat;
library/src/main/java/me/zhanghai/android/materialprogressbar/Interpolators.java:import android.support.v4.view.animation.PathInterpolatorCompat;

@trietbui85
Copy link
Author

Well, just compile and run app against AppCompat v22.2.0 and see it run without any problem. Only see visibility with Indeterminate ProgressBar and Horizontal problem when use your APK to test.

Update: found a little interesting log:

06-10 14:04:08.246 2791-2791/? W/PropertyValuesHolder﹕ Method setRotation() with type float not found on target class class me.zhanghai.android.materialprogressbar.g
06-10 14:04:08.246 2791-2791/? W/PropertyValuesHolder﹕ Method setRotation() with type float not found on target class class me.zhanghai.android.materialprogressbar.g
06-10 14:04:08.251 2791-2791/? W/PropertyValuesHolder﹕ Method setRotation() with type float not found on target class class me.zhanghai.android.materialprogressbar.g
06-10 14:04:08.566 2791-2791/? W/PropertyValuesHolder﹕ Method setTranslateX() with type float not found on target class class me.zhanghai.android.materialprogressbar.d
06-10 14:04:08.566 2791-2791/? W/PropertyValuesHolder﹕ Method set() with type float not found on target class class me.zhanghai.android.materialprogressbar.d
06-10 14:04:08.571 2791-2791/? W/PropertyValuesHolder﹕ Method set() with type float not found on target class class me.zhanghai.android.materialprogressbar.d
06-10 14:04:08.571 2791-2791/? W/PropertyValuesHolder﹕ Method setScaleX() with type float not found on target class class me.zhanghai.android.materialprogressbar.d
06-10 14:04:08.571 2791-2791/? W/PropertyValuesHolder﹕ Method setTranslateX() with type float not found on target class class me.zhanghai.android.materialprogressbar.d
06-10 14:04:08.571 2791-2791/? W/PropertyValuesHolder﹕ Method set() with type float not found on target class class me.zhanghai.android.materialprogressbar.d
06-10 14:04:08.571 2791-2791/? W/PropertyValuesHolder﹕ Method set() with type float not found on target class class me.zhanghai.android.materialprogressbar.d
06-10 14:04:08.571 2791-2791/? W/PropertyValuesHolder﹕ Method setScaleX() with type float not found on target class class me.zhanghai.android.materialprogressbar.d
06-10 14:04:08.571 2791-2791/? W/PropertyValuesHolder﹕ Method setTrimPathStart() with type float not found on target class class me.zhanghai.android.materialprogressbar.f
06-10 14:04:08.571 2791-2791/? W/PropertyValuesHolder﹕ Method setTrimPathEnd() with type float not found on target class class me.zhanghai.android.materialprogressbar.f
06-10 14:04:08.571 2791-2791/? W/PropertyValuesHolder﹕ Method setTrimPathOffset() with type float not found on target class class me.zhanghai.android.materialprogressbar.f
06-10 14:04:08.576 2791-2791/? W/PropertyValuesHolder﹕ Method setTrimPathStart() with type float not found on target class class me.zhanghai.android.materialprogressbar.f
06-10 14:04:08.576 2791-2791/? W/PropertyValuesHolder﹕ Method setTrimPathEnd() with type float not found on target class class me.zhanghai.android.materialprogressbar.f
06-10 14:04:08.576 2791-2791/? W/PropertyValuesHolder﹕ Method setTrimPathOffset() with type float not found on target class class me.zhanghai.android.materialprogressbar.f
06-10 14:04:08.576 2791-2791/? W/PropertyValuesHolder﹕ Method setTrimPathStart() with type float not found on target class class me.zhanghai.android.materialprogressbar.f
06-10 14:04:08.576 2791-2791/? W/PropertyValuesHolder﹕ Method setTrimPathEnd() with type float not found on target class class me.zhanghai.android.materialprogressbar.f
06-10 14:04:08.576 2791-2791/? W/PropertyValuesHolder﹕ Method setTrimPathOffset() with type float not found on target class class me.zhanghai.android.materialprogressbar.f
06-10 14:04:08.576 2791-2791/? W/PropertyValuesHolder﹕ Method setTranslateX() with type float not found on target class class me.zhanghai.android.materialprogressbar.d
06-10 14:04:08.576 2791-2791/? W/PropertyValuesHolder﹕ Method set() with type float not found on target class class me.zhanghai.android.materialprogressbar.d
06-10 14:04:08.576 2791-2791/? W/PropertyValuesHolder﹕ Method set() with type float not found on target class class me.zhanghai.android.materialprogressbar.d
06-10 14:04:08.576 2791-2791/? W/PropertyValuesHolder﹕ Method setScaleX() with type float not found on target class class me.zhanghai.android.materialprogressbar.d
06-10 14:04:08.576 2791-2791/? W/PropertyValuesHolder﹕ Method setTranslateX() with type float not found on target class class me.zhanghai.android.materialprogressbar.d
06-10 14:04:08.576 2791-2791/? W/PropertyValuesHolder﹕ Method set() with type float not found on target class class me.zhanghai.android.materialprogressbar.d
06-10 14:04:08.576 2791-2791/? W/PropertyValuesHolder﹕ Method set() with type float not found on target class class me.zhanghai.android.materialprogressbar.d
06-10 14:04:08.576 2791-2791/? W/PropertyValuesHolder﹕ Method setScaleX() with type float not found on target class class me.zhanghai.android.materialprogressbar.d

@zhanghai
Copy link
Owner

Oh, it is ProGuard. ObjectAnimators call by reflection. See PhilJay/MPAndroidChart#348

I've always tested with debug build APKs (so that I can modify source and debug immediately). My fault.

Will fix this lator today.

(But the library aar is not affected since the obfuscation happens only when I compile sample.)

@trietbui85
Copy link
Author

Ha ha, thanks for pointing it out. It's great to finally know where does this issue come from :)

@zhanghai
Copy link
Owner

Issue resolved, and directives have been added to readme.

I've also published this library to Maven central btw, you can take a look at the integration section.

@nikil07
Copy link

nikil07 commented Dec 29, 2016

For anyone coming here for the same issue, as indeterminate progress bar not being shown or visible.
I faced the same and spend a lot of time over, then I realized that the "Animation scale" in developer options was turned off.

Might help someone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants