Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9849] Android: Basic tableview too small on high density android device

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 2.0.2
Fix Version/sn/a
ComponentsAndroid
Labelscommunity, core
ReporterNeville Dastur
AssigneeUnknown
Created2012-06-24T06:07:00.000+0000
Updated2018-02-28T20:03:39.000+0000

Description

Tableviewrow created when Android anyDensity = true are too small and don't take into account high density The screenshots were taken with sections, but same for basic tableview too. This app.js reproduces: Change anyDensity from true to false to see difference /* * Single Window Application Template: * A basic starting point for your application. Mostly a blank canvas. * * In app.js, we generally take care of a few things: * - Bootstrap the application with any data we need * - Check for dependencies like device type, platform version or network connection * - Require and open our top-level UI component * */ //bootstrap and check dependencies if (Ti.version < 1.8 ) { alert('Sorry - this application template requires Titanium Mobile SDK 1.8 or later'); } // This is a single context application with mutliple windows in a stack (function() { //determine platform and form factor and render approproate components var osname = Ti.Platform.osname, version = Ti.Platform.version, height = Ti.Platform.displayCaps.platformHeight, width = Ti.Platform.displayCaps.platformWidth; //considering tablet to have one dimension over 900px - this is imperfect, so you should feel free to decide //yourself what you consider a tablet form factor for android var isTablet = osname === 'ipad' || (osname === 'android' && (width > 899 || height > 899)); var self = Titanium.UI.createWindow({ title: 'Window', layout: 'vertical' }); var myRow1 = Ti.UI.createTableViewRow({title: 'Row 1', font:{fontSize: '16dp'}, hasChild: true, backgroundColor:'white' }); var myRow2 = Ti.UI.createTableViewRow({title: 'Row 2', font:{fontSize: '16dp'}, hasChild: true, backgroundColor:'white' }); var data = [myRow1, myRow2]; // Finally create a tableview and add it to the window var tableView = Ti.UI.createTableView({ data:data, backgroundColor: 'transparent' }); self.add(tableView); self.open(); })();

Attachments

FileDateSize
screenshot-1.jpg2012-06-24T06:07:39.000+000074379
screenshot-2.jpg2012-06-24T06:09:48.000+000067021

Comments

No comments

JSON Source