[android-developers] Re: ImageView, no scaling and gravity

2011-01-16 Thread Henrik Lindqvist
Wow, thanks. Your suggestion with a larger FrameLayout fixed it! ...LinearLayout etc... ...LinearLayout etc... You said a child view couldn't be larger than it's parent/container!? Now the FrameLayout is forcefully wider than it's parents and the whole app-widget. Now, if I only could get t

Re: [android-developers] Re: ImageView, no scaling and gravity

2011-01-16 Thread Mark Murphy
On Sun, Jan 16, 2011 at 11:48 AM, Henrik Lindqvist wrote: >> Of course. That's a rule for any container/child relationship in Android. > > If a child view can't be larger than it's parent, how does a > ScrollView work? The visible bounds of the child are still not bigger than the visible bounds o

[android-developers] Re: ImageView, no scaling and gravity

2011-01-16 Thread Henrik Lindqvist
On Jan 16, 5:19 pm, Kostya Vasilyev wrote: > I think it should work to put it inside a frame layout with exact values for > width/height (specifying maximum image size before cropping occurs). Then on > the image view, specify layout_gravity=right, and width/height as > wrap_content. > layout_gr

[android-developers] Re: ImageView, no scaling and gravity

2011-01-16 Thread Henrik Lindqvist
On Jan 16, 5:04 pm, Mark Murphy wrote: > On Sun, Jan 16, 2011 at 11:02 AM, Henrik Lindqvist > > wrote: > > I've already tried that. It works if the bitmap is smaller than the > > ImageView, it aligns to the right edge correctly. But, if the bitmap > > is larger, its cropped at both left and righ

Re: [android-developers] Re: ImageView, no scaling and gravity

2011-01-16 Thread Kostya Vasilyev
I think it should work to put it inside a frame layout with exact values for width/height (specifying maximum image size before cropping occurs). Then on the image view, specify layout_gravity=right, and width/height as wrap_content. -- Kostya Vasilyev -- http://kmansoft.wordpress.com 16.01.2011 1

Re: [android-developers] Re: ImageView, no scaling and gravity

2011-01-16 Thread Mark Murphy
On Sun, Jan 16, 2011 at 11:02 AM, Henrik Lindqvist wrote: > I've already tried that. It works if the bitmap is smaller than the > ImageView, it aligns to the right edge correctly. But, if the bitmap > is larger, its cropped at both left and right side. Seems like an > ImageView can't expand to be

[android-developers] Re: ImageView, no scaling and gravity

2011-01-16 Thread Henrik Lindqvist
I've already tried that. It works if the bitmap is smaller than the ImageView, it aligns to the right edge correctly. But, if the bitmap is larger, its cropped at both left and right side. Seems like an ImageView can't expand to be larger than it's parent, even inside an FrameLayout. Any trick to

[android-developers] Re: ImageView, no scaling and gravity

2011-01-15 Thread Zsolt Vasvari
Use a layout that supports the android:layout_gravity attribute, such as FrameLayout. The regular android:gravity is only used the TextViews to position the text if the view is larger than the text. On Jan 16, 11:12 am, Henrik Lindqvist wrote: > I have a runtime generated Bitmap, for a RemoteVie