viewtitaniumvisibilitytitanium-alloy

titanium alloy set view visibility


i have a question on what the object.visible property in titanium alloy actually means.

in the profile.js controller file of the app there is a check if the user is logged in (state = null) and depending on this either (a) a "not logged in" a text label message (id = not_logged_in_message) shows up or (b) the profile data is visible.

now when the user is logged in, the text label (or rather its content) does not show up but it seems that the xml label tag (marked in darkred rectangle) is still there pushing everything lower.

if (state === null) {
    $.topBar.setTitle(L('Please login'));
    $.profile.visible=false;
    $.not_logged_in_message=true;
} else {
    $.topBar.setTitle(L('Profile'));
    $.profile.visible=true;
    $.not_logged_in_message=false;
    get_profile();
}

thx for any suggestion!


Solution

  • Check this out at the appcelerator forum: http://developer.appcelerator.com/question/161936/vertical-layout-visible--false-but-controls-still-occupying-space

    Visible means: its hidden from the view but not removed from the structure. You could try the suggestions from the answer over there, like removing the label or alter the width and height.