mrwonderman / android-square-progressbar

An android library to display a progressbar that goes around an image.
http://halcyon.ch/android-square-progressbar-v-1-6-0/
1.28k stars 285 forks source link

Remove ic_launcher in library #29

Closed trietbui85 closed 9 years ago

trietbui85 commented 9 years ago

Hi, according to https://plus.google.com/+GabrieleMariotti/posts/i3UMa9YqX5x, please remove ic_launcher.png from library project :)

mrwonderman commented 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:

placeholder

This would look like that in the example application:

screen shot 2015-05-15 at 12 55 23

What so you think about that solution?

Regards Yannick

trietbui85 commented 9 years ago

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.

mrwonderman commented 9 years ago

@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.

trietbui85 commented 9 years ago

Sound great! Thank you for your work. :)

mrwonderman commented 9 years ago

available in version 1.5.2