Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15005] Android: TableViewRow Label text is truncated when anydensity=false

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.1.1, Release 3.1.2
Fix Version/sn/a
ComponentsAndroid
LabelssupportTeam
ReporterRupesh Sharma
AssigneeUnknown
Created2013-08-30T07:47:01.000+0000
Updated2018-02-28T20:03:20.000+0000

Description

Description

In tableviewrow having labels in it, When runs on Android 4.2.2 and 4.3 label is truncated at the end of it. This only happens when 'anyDensity=false' in the android manifest is set.

Testcase

app.js :
var win1 = Titanium.UI.createWindow({  
    backgroundColor:'#fff'
});

var self = Ti.UI.createView();

var tv = Ti.UI.createTableView({
    top: 30,
    bottom:30,
    backgroundColor:'blue'
});
var rows = [];

var r1 = Ti.UI.createTableViewRow({
    height:50,
    backgroundColor:'yellow'
});

var labelTitle = Ti.UI.createLabel({
    text : 'This is the title value for the table view row',
    left : 12,
    top: 2, 
    height : 'auto',
    width : 'auto',
    color : '#163E5E',
    font : {
        fontSize : 15,
        fontWeight : 'bold'
    }
});

r1.add(labelTitle);

var labelBody = Ti.UI.createLabel({
    text : '01/01/2013',
    left : 12,
    top : 21,
    height : 'auto',
    width : 'auto',
    //color : record.BodyColor,
    color : '#163E5E',
    font : {
        fontSize : 12
    }
});

r1.add(labelBody);


rows[0] = r1;
tv.setData(rows);
self.add(tv);

win1.add(self);

win1.open();

In tiapp.xml :
<android xmlns:android="http://schemas.android.com/apk/res/android">
        <manifest>
            <supports-screens android:anyDensity="false"/>
        </manifest>
    </android>

Comments

No comments

JSON Source