Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14199] Android: ImageView scaling not working

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionDuplicate
Resolution Date2013-06-26T20:00:58.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
LabelsImageView, Scaling, android, defect
ReporterThomas Neerup
AssigneeIngo Muschenetz
Created2013-06-07T08:52:18.000+0000
Updated2017-03-29T22:12:33.000+0000

Description

Problem description

ImageViews does not scale the image properly on Android, when width is specified and the surrounding view has height=Ti.UI.SIZE, or when put into a TableViewRow This works fine on IOS.

Steps to reproduce

1) Create an empty Alloy project 2) Add the attached image to the assets directory 3) Use the following index.xml and run the app
<Alloy>
	<Window backgroundColor="white">
		<TableView>
			<TableViewRow backgroundColor="yellow">
				<ImageView image="/images.jpeg" width="Ti.UI.FILL" height="auto"></ImageView>
			</TableViewRow>
			<TableViewRow title="Bananas"/>
		</TableView>
	</Window>
</Alloy>
In iOS the image is scaled properly.

Attachments

FileDateSize
images.jpeg2013-06-07T08:52:18.000+00008146
index.xml2013-06-07T08:52:18.000+0000225

Comments

  1. Davide Cassenti 2013-06-13

    Also tested using left=0 and right=0, same results.
  2. ankur garha 2014-06-25

    What is the solution for this issue now? As I'm still having issues with it
  3. Lee Morris 2017-03-29

    Closing ticket as duplicate, please refer to TIMOB-14395.

JSON Source