lopspower / CircularImageView

Create circular ImageView in Android in the simplest way possible
Apache License 2.0
1.95k stars 413 forks source link

Suggestion: handle the images better in the sample #49

Closed AndroidDeveloperLB closed 8 years ago

AndroidDeveloperLB commented 8 years ago
  1. Currently the images are in "drawable-nodpi". they should be in the correct folder .
  2. the image "logo.jpg" is huge and doesn't need to be this large. the view should support color for being the background. It should contain only the bear inside.

    Currently, even for the current sample, I could use this image:

    drawable-xxhdpi/logo.png logo

    and set this drawable that the sample uses:

    <?xml version="1.0" encoding="utf-8"?>
    <layer-list
       xmlns:android="http://schemas.android.com/apk/res/android">
       <item
           android:width="284dp"
           android:height="164dp">
           <shape android:shape="rectangle">
               <solid android:color="#000"/>
           </shape>
    
       </item>
       <item
           android:gravity="center">
           <bitmap
               android:width="71dp"
               android:height="41dp"
               android:src="@drawable/logo">
           </bitmap>
       </item>
    </layer-list>
  3. the action bar icons contain black color while the toolbar's background color is already black. This doesn't work nicely, as you can see on the clicking effect on the buttons. It should contain only white and transparent pixels. You can see some examples on "android assets studio" website: https://romannurik.github.io/AndroidAssetStudio/
AndroidDeveloperLB commented 8 years ago

Why is it closed? Was it fixed?

lopspower commented 8 years ago

This is not a bug in the library, it is good practice on the use of resources in the example project. The purpose of the project is such that it is as easy to understand, so I will not elaborate more than that. Furthermore, it is necessary that the library can work with all resources even if it is not perfectly cut.

AndroidDeveloperLB commented 8 years ago

Well, you could treat it as an enhancement.

Also, putting an image can be easier in the case that the content is smaller than the circular view. You could allow to set the background around the inner content, instead of what we have now.

Rainer-Lang commented 8 years ago

@AndroidDeveloperLB Maybe you could make a PR?