Android ImageButton with LayerDrawable Image?

I set the android:scaleType="fitStart and changed the line as below and it is working like a charm new InsetDrawable(resources. GetDrawable(R.drawable. Soldier), 0, layerTop,0,-layerTop) Now I have more questions First, as you can see I am creating a new instance for every layers.

If I create only one Drawable object and set it to the every items of the array that will be used for creating the LayerDrawable and use layerDrawable. SetLayerInset function to set the top and bottom properties, would it be more efficient And the other one if the LayerDrawable object has more items bigger than the imageButton it still displays the images. Is there a setting such as CSS overflow:hidden or something?Thanks.

I set the android:scaleType="fitStart" and changed the line as below and it is working like a charm. New InsetDrawable(resources. GetDrawable(R.drawable.

Soldier), 0, layerTop,0,-layerTop); Now I have more questions, First, as you can see I am creating a new instance for every layers. If I create only one Drawable object and set it to the every items of the array that will be used for creating the LayerDrawable and use layerDrawable. SetLayerInset function to set the top and bottom properties, would it be more efficient.

And the other one if the LayerDrawable object has more items bigger than the imageButton it still displays the images. Is there a setting such as CSS overflow:hidden or something? Thanks.

I'm trying to display a LayerDrawable as an ImageButton image. All the layers must have different top values. Such as top += 10;.

For this I used setLayerInset with Drawable layer items but it stretched the images. I also tried with different parameters and it just displayed other stupid layouts. This time, the tops look OK, but ImageButton displays a very small area of it.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions