It sounds like you maybe want to use different layouts for different screen 
types rather than depending on sizes of images for different pixel 
densities.  I recommend you read and understand the majority of this 
document to fully understand how Android deals with different screens and 
what kind of options you have:

http://developer.android.com/guide/practices/screens_support.html

Doug


On Wednesday, January 1, 2014 7:04:05 AM UTC-8, stanlick wrote:
>
> Thanks Doug!
>
> This is what I was thinking, but always like a second opinion.  I think 
> I'm going to study the the various image size folders drawable-ldpi, 
> drawable-mdpi, 
> etc., and include form-factor appropriate images.  It's a shame, Android 
> could not take the highest resolution image and scale it down to fit the 
> other form factors.  Heck maybe it does with the scaleType and I'm just 
> confused by the ScrollView overriding my layout decisions.  The smallest 
> device, as I see it, is the 240x320 (is that a watch) and it certainly 
> wants smaller pics than my 90" TV!
>
> Peace,
> Scott
>
> On Tuesday, December 31, 2013 1:22:03 PM UTC-6, Doug wrote:
>>
>> Weights only make sense when the container of the LinearLayout is 
>> constraining the height of it.  With its height constrained, LL is then 
>> forced to impose heights on all of its children.  It will use weights to do 
>> this if you specify them.
>>
>> When the container of a LL is a ScrollView, the SV doesn't impose a 
>> constraint on the height of the LL, which means the LL doesn't impose a 
>> height on its children.  It lets them all be as tall as they want.  The SV 
>> will then allow the user to scroll to see the entire contents of the LL if 
>> it overflows the ScrollView's height.
>>
>> If you want everything to be constrained to fit on the screen, don't use 
>> a ScrollView.  If you want to allow scrolling, then accept that the LL will 
>> not impose a height on its children.  If you want to constrain the height 
>> of just one child in a LL, then give it an explicit height measurement in 
>> dp to override its natural height measurement.
>>
>> Doug
>>
>> On Monday, December 30, 2013 2:39:16 PM UTC-8, stanlick wrote:
>>>
>>> I have a LinearLayout with three views on it TextView, ImageView 
>>> and TextView.  The image was pushing the third TextView off the bottom of 
>>> the screen, so I added weight to the three views.  Now when I place this 
>>> LinearLayout on a ScrollView, the weights are being ignored!  Is there a 
>>> way to constrain the size of an image without hardcoding pixels?  I have 
>>> tried every android:scaleType available and nothing works quite right.
>>>
>>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to