I have a Sencha Touch view that consists of various labels and buttons, all customized in my custom.css file. I am trying to hide everything except for one button and then show the elements when that button is clicked. I set "hidden: true" to those elements but the CSS styling gets messed up. Is there a way to maintain the CSS styling? I came across 'hiddenCls' as a solution but I can't seem to implement it correctly. Any suggestions or tips would be appreciated! Thank you!
Here's a snippet of my current code:
Ext.define('myApp.view.StartScreen', {
extend: 'Ext.Container',
xtype: 'startscreen',
config: {
layout: {
type: 'vbox',
align: 'middle'
},
items: [{
xtype: 'toolbar',
docked: 'top',
title: 'My App',
items: [{
xtype: 'button',
iconMask: true,
iconCls: 'refresh',
width: 42
}, { xtype: 'spacer' }, {
xtype: 'button',
iconMask: true,
iconCls: 'user'
}]
}, {
xtype: 'label',
html: 'Discussions',
cls: 'item-title-label',
name: 'itemTitleLabel',
hidden: true,
hiddenCls: 'x-item-title-label-hidden'
}, {
xtype: 'label',
html: 'Hi',
cls: 'case-number-label',
name: 'caseNumberLabel',
hidden: true,
hiddenCls: 'x-case-number-label-hidden'
}, {
xtype: 'label',
html: '0:00',
cls: 'duration-label',
name: 'durationLabel',
hidden: true,
hiddenCls: 'x-duration-label-hidden'
}, {
xtype: 'label',
html: 'Started at 13:42',
cls: 'time-started-label',
name: 'timeStartedLabel',
hidden: true,
hiddenCls: 'x-time-started-label-hidden'
}, {
xtype: 'button',
text: 'Start',
ui: 'confirm',
cls: 'big-start-button',
name: 'bigStartButton'
}, {
xtype: 'button',
text: 'Off',
ui: 'decline',
cls: 'big-off-button',
name: 'bigOffButton',
hidden: true,
hiddenCls: 'x-off-button-hidden'
}]
}
});