Open ja1984 opened 9 years ago
Hi, I confirm the issue.
Any update on this? I'm facing the same issue!
I am pretty busy lately. As soon as i get some free time to spend on it, i will fix it. You can provide a Pull Request to help me fixing it too. It would be nice. El 1/7/2015 10:30 p. m., "fnberta" notifications@github.com escribió:
Any update on this? I'm facing the same issue!
— Reply to this email directly or view it on GitHub https://github.com/JorgeCastilloPrz/FABProgressCircle/issues/6#issuecomment-117816843 .
Because you are using CoordinatorLayout.
I'm having the same issue (FAB from design library in a CoordinatorLayout).
I think there is an easy fix for this issue: See https://github.com/JorgeCastilloPrz/FABProgressCircle/pull/20
I'm not using CoordinatorLayout but fullscreen flags and the icon is not showing. Is this library still under development or is deprecated?
Well, I've just found a workaround that works in my case. Just wrap the FABProgressCircle with a RelativeLayout.
My hack-around method using CoordinatorLayout without having to modify the lib (API 11+) :
private void applyDependencyFixes() {
final FABProgressCircle fabPc = (FABProgressCircle) findViewById(R.id.fabProgressCircle);
if (fabPc != null) {
fabPc.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {
@Override
public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {
ImageView imgView = (ImageView) v.findViewById(R.id.completeFabIcon);
if ((imgView != null) && (imgView.getScaleType() != ImageView.ScaleType.CENTER_INSIDE)) {
imgView.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
}
}
});
}
}
OR if you want the lib/xml hack around version :
Hi!
I'm trying with the shongololo29 solution's but only works the first time.
I'm reviewing the FABProgressCircle class and it's adding a CompleteFABView view to the parent view, without remove the previous one.
I found issue's solution, I'm doing this in my code aditionally to the shongololo29's solution:
Check if the FABProgressCircle view contain a CompleteFABView and remove
for (int i = 0; i < mFabProgressRegGoogle.getChildCount(); i++){
if (mFabProgressRegGoogle.getChildAt(i) instanceof CompleteFABView) {
mFabProgressRegGoogle.removeViewAt(i);
break;
}
}
And maybe you should change the shongololo29's suggestion
OR if you want the lib/xml hack around version :
- Edit FABProgressCircle/library/src/main/res/layout/complete_fab.xml
- Just add this attribute in the image view : android:scaleType="centerInside"
Doing this, you delete the OnLayoutChangeListener
Cheers!
In my case this happened because I was calling beginFinalAnimation() too soon. I called show(), did some quick calculations and then called beginFinalAnimation(). I guess calling them both within too little milliseconds causes the latter to be ignored.
I worked around the issue by creating an AsyncTask that waits 500ms and then calls beginFinalAnimation() in its onPostExecute().
Hi!
Thank you for an awesome library, it looks amazing and is so easy to implement. I have one issue however, I can't get the finalIcon to display
This is my setup
After i run the beginFinalAnimation(); the FAB changes color to orange, but the icon never shows.
I don't know what I'm doing wrong! :/