Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10034] Android: TableViewRow elements with hasCheck=true gets a very small checkbox with certain display screens

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-03-19T04:14:49.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sRelease 3.1.0, 2013 Sprint 06 API, 2013 Sprint 06
ComponentsAndroid
LabelsSupportTeam, api
ReporterDavide Cassenti
AssigneeHieu Pham
Created2012-07-19T06:34:59.000+0000
Updated2013-12-17T21:03:34.000+0000

Description

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

Attachments

FileDateSize
device-2012-07-18-125315.png2012-07-19T06:34:59.000+000095168

Comments

  1. Davide Cassenti 2012-07-19

    I see the same issue using the Android Emulator 4.1
  2. Daniel Sefton 2013-01-30

    Reopening, issue still remains. The icon is still small and not scaled by density pixels.
  3. Vishal Duggal 2013-03-19

    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.
  4. Anshu Mittal 2013-03-22

    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).
  5. Dhirendra Pratap 2013-04-17

    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
  6. Hans Knöchel 2013-12-17

    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.

JSON Source