Closed trietbui85 closed 9 years ago
Hi @anticafe That's a good point. I checked the code and it would be easy to remove the "almost" useless launcher icons from the library. But they actually have one tiny usage when it comes to placeholders. So when someone actually isn't setting an image to a squareprogressbar than the icon from the library is used to act as a placeholder. You can see that in the XML here:
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:contentDescription="@string/description"
android:padding="10dp"
android:src="@drawable/ic_launcher" />
I think I did that to make it easier for other developers to see if the squareprogressbar is even visible. But this is only a placeholder and not a real image. Because as soon as you want to set a progress or any style at all, the library throws an exception as it needs a real image set to the ImageView. I think that is still the way to go as you should use an image directly from the start or have your own placeholder.
But what I would suggest is to remove the ic_launchers and add my own placeholder to the library. I did a very basic one this morning:
This would look like that in the example application:
What so you think about that solution?
Regards Yannick
Hi @mrwonderman
I'm agree with you a placeholder would be really useful to let user know about missing image src. So, I think we can safely remove ic_launcher.png
, and create a placeholder name drawable ic_spb_empty.png
instead.
@anticafe great, thank you :)! I changed the filename according to your suggestion and merged it into the develop-branch. So this change should be in the next version (1.5.2). Please keep the ideas for enhancements or other features coming :). I will close this issue as soon as the next version is published.
Sound great! Thank you for your work. :)
available in version 1.5.2
Hi, according to https://plus.google.com/+GabrieleMariotti/posts/i3UMa9YqX5x, please remove
ic_launcher.png
from library project :)