Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3549] Android: Table View leftImage Sizing Inconsistency with iOS

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionWon't Fix
Resolution Date2017-08-16T01:25:27.000+0000
Affected Version/sRelease 1.6.2, Release 2.0.1
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, inconsistency, parity, rplist
ReporterDawson Toth
AssigneeIngo Muschenetz
Created2011-04-15T03:46:32.000+0000
Updated2017-08-16T01:25:27.000+0000

Description

Problem

On Android, the leftImage resizes the row to fit the dimensions of the image. But on iOS, the leftImage will resize to fit the row (so if the row is 20 pixels tall, the image will resize to be 20 pixels tall).

Solution

It would be great if the two platforms behaved the same with this property.

I personally think resizing is better behavior, because it seems like a more likely use case to me. I recognize that's highly subjective, though, and that there are implications to having resized images inside a table view row on Android.

Sample Code

The following, dropped in an app.js, shows the problem:

var win = Ti.UI.createWindow({ backgroundColor: '#fff' });
win.add(Ti.UI.createTableView({
    data: [
        { leftImage: 'appicon.png', title: 'One' },
        { leftImage: 'appicon.png', title: 'Two' },
        { leftImage: 'appicon.png', title: 'Three' }
    ]
}));
win.open();

Tested On

Titanium SDK version: 1.6.2 (03/30/11 17:25 0243d42...)
RESIZES IMAGE on iPhone Simulator 4.2
RESIZES ROW on Android Samsung Epic 4G 2.2

Associated Helpdesk Ticket

http://support.appcelerator.com/tickets/TXA-23345-536">http://support.appcelerator.com/tickets/TXA-23345-536

Comments

  1. Dawson Toth 2011-04-15

    Hit enter too soon... Tagged as an inconsistency (testing the waters with that) -- it's not really a defect, and it's not a feature. Just something different between the platform implementations.

  2. Junaid Younus 2012-05-15

    Tested with 2.0.1GA2 on the iOS simulator and a Samsung Galaxy S2, this issue still exists. Instead of using 'appicon.png', change it to 'default.png', the result is a lot more obvious.
  3. Lee Morris 2017-08-16

    Closing due to inactivity. If this issue still exists, please raise a new ticket.

JSON Source