Problem description
With particular devices (e.g. on Samsung Galaxy S3), when the hasCheck property is set for a TableViewRow element, the checkbox shown is very small.
Steps to reproduce
- create an app with the code below
- run it on a Samsung Galaxy S3 device or a Samsung Galaxy Tab
var win = Titanium.UI.createWindow({
backgroundColor:'#fff',
fullscreen: true
});
var rows = [];
for(var i=0; i<10; i++) {
rows.push(Ti.UI.createTableViewRow({
title: 'Test ' + i,
hasCheck: true,
font: {
fontSize: '48dp'
}
}));
}
var table = Ti.UI.createTableView({
data: rows
});
win.add(table);
win.open();
Customer ticket
http://support.appcelerator.com/tickets/APP-268717
I see the same issue using the Android Emulator 4.1
Reopening, issue still remains. The icon is still small and not scaled by density pixels.
The indicator resource is a 64x64 image which when loaded on the xhdpi device occupies 32x32 pixels which is about right for a label with default font. It does not resize with the size of the row because essentially it is just an indicator (same as iOS). In the example above a label with font size 48dp will occupy atleast 96 pixels on xhdpi so the checkmark will be about 1/3 the height of the row and that works as expected. If the checkmark functionality does not suit your layout please feel free to create density specific resources and set them to the rightImage property of the tableview row.
Closing as According to Vishal, Image does not resize with the size of the row because essentially it is just an indicator (same as iOS).
I too had problem with this issue. Eventually we settled with rightimage property. Right image property is suited for rows which are not bound to change. It makes sense to scale the size of the checkmark according to the row height rather than the font because its unlikely for most to use 48dp/sp of font. The standard font sizes are 12,14,18,22 sp. For the sake of simplicity in programming the issue must be fixed. P.S I landed on this page when i was going through the closed issues in Ti SDK 3.1 but very dissapointed to see this resolution
Still having problems in the latest SDK 3.2.0 RC: On Android-displays starting at xlarge (xxlarge, xxxlarge as aweel), the check-icon is displayed in a very small size. Tested on the Nexus 5 and Android 4.4. Example: https://dl.dropboxusercontent.com/s/xh05cd7e69zxqp9/preview.jpg It's necessary to respect the high density specific resources while compiling. I hope it is reproducible.