Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9447] Android: TableView hasChild icon with Galaxy nexus (all xhdpi devices?)

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-09-21T15:39:08.000+0000
Affected Version/sRelease 2.0.1
Fix Version/sRelease 3.0.0, Sprint 2012-19 API, 2012 Sprint 19
ComponentsAndroid
Labelsapi, qe-port
ReporterPaul Hamilton
AssigneeHieu Pham
Created2012-05-30T12:59:23.000+0000
Updated2015-08-31T09:07:54.000+0000

Description

The hasChild property on a Galaxy nexus (res 1280×720) makes for a VERY tiny icon on the right. I think that there is no xhdpi icon for this, and it displays to a MUCH smaller one. the ldpi, mdpi, and hdpi versions all seem to scale appropriate to its size. The galaxy nexus isn't using the hdpi version. It might be using the mdpi. Appcelerator docs also make no mention of this resolution density (xhdpi) in any of its docs. This resolution should also be included / mentioned to take into account the xtra high res density phones. 1. Run this code:
Ti.UI.backgroundColor = "#000000"

var win = Titanium.UI.createWindow({  
    title:'window',
    backgroundColor:'#fff'
});

var aTableView = Ti.UI.createTableView();

var data = [
	{title:'Row 1', hasChild:true, color:'red', header:'First'},
	{title:'Row 2', hasCheck:true, color:'orange'}
];
aTableView.setData(data);

aTableView.addEventListener('click', function(e) {
	alert('title: \'' + e.row.title + '\', section: \'' + e.section.headerTitle + '\', index: ' + e.index);
});

win.add(aTableView);

win.open();

Comments

  1. Paul Hamilton 2012-06-08

    Keep in mind there may be other icons that don't have xhdpi support.
  2. Olivier Sechet 2012-08-21

    We have the same problem with a Galaxy Note (whose resolution is 1280x800) on Android 4.0.4. Titanium SDK 2.1.1
  3. Paul Hamilton 2012-08-21

    So it does appear to be XHDPI phones. This will get more and more critical as people get newer phones. Is it a huge prospect to support XHDPI androids?
  4. MM 2012-08-24

    The medium sized image is the default and then it is only checked for low or high resolution but not for ultrahigh (XHDPI) The Bug also affects mobile SDK 2.1.1 TiBaseTableViewItem.java#56-61:
       					String path = "/org/appcelerator/titanium/res/drawable/btn_more.png"; // default medium
       					switch (TiPlatformHelper.applicationLogicalDensity) {
       						case DisplayMetrics.DENSITY_HIGH : path = "/org/appcelerator/titanium/res/drawable/btn_more_48.png"; break;
       						case DisplayMetrics.DENSITY_LOW : path = "/org/appcelerator/titanium/res/drawable/btn_more_18.png"; break;
       					}
       					childIndicatorBitmap = BitmapFactory.decodeStream(KrollDict.class.getResourceAsStream(path));
       
  5. Anirudh Nagesh 2012-11-28

    Can we backport this to 2.1.3GA? One of our customers is requesting for the same.
  6. Tamila Smolich 2012-12-05

    Closing as fixed. Tested on: Titanium Studio, build: 3.0.0.201211301903 Titanium SDK, build: 3.0.0.v20121204181658 Devices: Samsung Galaxy S III (4.0.4)
  7. Joe Falcone 2013-08-12

    Just tested this problem on 3.1.1GA with HTC One phone (1920x1080 at 480dpi) and I've got a tiny icon again.
  8. Abdul Mohammed 2013-09-11

    4.2.2 S4 has tiny icons too. Any workaround?
  9. Beau 2013-11-01

    tiny icons on 3.1.3GA and HTC one. This needs to be reopened.
  10. Mike Butler 2013-11-18

    As Beau and Abdul have said, the check mark is almost invisibly small with 3.1.3GA and HTC One. (Although fine on Nexus 7) It's over three month since Joe reported it, this bug needs to be reopened immediately and fixed : it's a very large usability issue for HTC One users.
  11. Joe Falcone 2013-11-19

    Nexus 7 is an oddball. We have to be compatible with HTC One.
  12. Hans Knöchel 2014-02-25

    This bug isn't fixed at all: Still experiencing those problems with Ti.SDK 3.2.1.GA and Android 4.3 (Galaxy S4).
  13. Dan Roberts 2014-10-15

    This is still a bug on the HTC One.
  14. Beau Gibson 2014-12-08

    This bug also appears on galaxy s5
  15. Alberto Marcone 2015-04-28

    Still happening on most of my emulators
  16. Mike Butler 2015-04-28

    We have to specifically add a custom checkbox view to almost every table and list in our apps, just to be able to show a checkmark that's more than a millimeter tall on the most popular Android devices. Seems a bit mad that this is still around...
  17. Alberto Marcone 2015-08-31

    is this ever going to be fixed? Still happening over here.

JSON Source