本文整理汇总了C++中ListView::fillSpaceVertically方法的典型用法代码示例。如果您正苦于以下问题:C++ ListView::fillSpaceVertically方法的具体用法?C++ ListView::fillSpaceVertically怎么用?C++ ListView::fillSpaceVertically使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ListView
的用法示例。
在下文中一共展示了ListView::fillSpaceVertically方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createMainLayout
/**
* Creates and adds main layout to the screen.
*/
void SettingsScreen::createMainLayout()
{
VerticalLayout* mainLayout = new VerticalLayout();
Screen::setMainWidget(mainLayout);
ListView* listView = new ListView();
listView->fillSpaceHorizontally();
listView->fillSpaceVertically();
mainLayout->addChild(listView);
ListViewItem* listItem;
// Add IP label and edit box
mIPEditBox = new EditBox();
mIPEditBox->setInputMode(EDIT_BOX_INPUT_MODE_NUMERIC);
listView->addChild(this->createListViewItem(IP_LABEL_TEXT, mIPEditBox));
// Add port label and edit box
mPortEditBox = new EditBox();
mPortEditBox->setInputMode(EDIT_BOX_INPUT_MODE_NUMERIC);
listView->addChild(this->createListViewItem(PORT_LABEL_TEXT, mPortEditBox));
if ( isAndroid() )
{
mShowOnlyIfInBackground = new CheckBox();
mShowOnlyIfInBackground->setState(true);
listView->addChild(createListViewItem(SHOW_ONLY_IF_NOT_RUNNING, mShowOnlyIfInBackground));
mTickerText = new EditBox();
mTickerText->setText(TICKER_DEFAULT);
listView->addChild(createListViewItem(TICKER_LABEL, mTickerText));
mContentTitle = new EditBox();
mContentTitle->setText(TITLE_DEFAULT);
listView->addChild(createListViewItem(TITLE_LABEL, mContentTitle));
}
// Android: If the registrationID was already saved from previous launches,
// do not connect again.
MAHandle myStore = maOpenStore("MyStore", 0);
if ( isAndroid() && myStore == STERR_NONEXISTENT
||
!isAndroid() )
{
// Add connection status label.
listItem = new ListViewItem;
listView->addChild(listItem);
mConnectionStatusLabel = new Label();
mConnectionStatusLabel->setText(CONNECTION_NOT_ESTABLISHED);
listItem->addChild(mConnectionStatusLabel);
listItem = new ListViewItem;
listView->addChild(listItem);
mConnectButton = new Button();
mConnectButton->setText(CONNECT_BUTTON_TEXT);
listItem->addChild(mConnectButton);
}
}
示例2: createMainLayout
/**
* Creates and adds main layout to the screen.
*/
void CreateNotificationScreen::createMainLayout()
{
VerticalLayout* mainLayout = new VerticalLayout();
Screen::setMainWidget(mainLayout);
ListView* listView = new ListView();
listView->fillSpaceHorizontally();
listView->fillSpaceVertically();
mainLayout->addChild(listView);
ListViewItem* listItem;
HorizontalLayout* hLayout;
Widget* space;
// ================ Content body =====================
mContentBody = new EditBox();
listView->addChild(createListViewItem(CONTENT_BODY_LABEL_TEXT,(Widget*) mContentBody));
if ( isAndroid() )
{
// ================ Content title =====================
mContentTitle = new EditBox();
listView->addChild(createListViewItem(CONTENT_TITLE_LABEL_TEXT, mContentTitle));
// ================ Ticker text =====================
mTickerText = new EditBox();
listView->addChild(createListViewItem(TICKER_TEXT_LABEL_TEXT, mTickerText));
}
else
{
// ================ Badge number =====================
mBadgeNumber = new EditBox();
mBadgeNumber->setWidth(NUMERIC_EDIT_BOX_WIDTH);
mBadgeNumber->setInputMode(EDIT_BOX_INPUT_MODE_NUMERIC);
mBadgeNumber->addEditBoxListener(this);
listView->addChild(createListViewItem(BADGE_NUMBER_LABEL_TEXT, mBadgeNumber));
// ================ Alert action =====================
mAlertAction = new EditBox();
mAlertAction->addEditBoxListener(this);
listView->addChild(createListViewItem(ALERT_ACTION_LABEL_TEXT, mAlertAction));
}
// ================ Play sound =====================
mPlaySound = new CheckBox();
listView->addChild(createListViewItem(PLAY_SOUND_LABEL_TEXT, mPlaySound));
if ( isAndroid() )
{
// ================ Sound path=====================
mSoundPath = new EditBox();
listView->addChild(createListViewItem(SOUND_PATH_LABEL_TEXT, mSoundPath));
// ================ Vibrate =====================
mVibrate = new CheckBox();
listView->addChild(createListViewItem(VIBRATE_LABEL_TEXT, mVibrate));
mVibrateDuration = new EditBox();
mVibrateDuration->setInputMode(EDIT_BOX_INPUT_MODE_NUMERIC);
listView->addChild(createListViewItem(VIBRATE_DURATION_LABEL_TEXT, mVibrateDuration));
// ================ Flashing LED =====================
mFlash = new CheckBox();
listView->addChild(createListViewItem(FLASH_LABEL_TEXT, mFlash));
// The pattern
mFlashColor = new EditBox();
listView->addChild(createListViewItem(FLASH_COLOR_LABEL_TEXT, mFlashColor));
mFlashOnLength = new EditBox();
mFlashOnLength->setInputMode(EDIT_BOX_INPUT_MODE_NUMERIC);
listView->addChild(createListViewItem(FLASH_ON_LABEL_TEXT, mFlashOnLength));
mFlashOffLength = new EditBox();
mFlashOffLength->setInputMode(EDIT_BOX_INPUT_MODE_NUMERIC);
listView->addChild(createListViewItem(FLASH_OFF_LABEL_TEXT, mFlashOffLength));
}
// ================ Fire time =====================
mTime = new EditBox();
mTime->setWidth(NUMERIC_EDIT_BOX_WIDTH);
mTime->setInputMode(EDIT_BOX_INPUT_MODE_NUMERIC);
listView->addChild(createListViewItem(FIRE_TIME_LABEL_TEXT, mTime));
// ================= Send image button ================
hLayout = new HorizontalLayout();
hLayout->fillSpaceHorizontally();
listItem = new ListViewItem();
listItem->addChild(hLayout);
listView->addChild(listItem);
mCreateNotificationButton = new ImageButton();
mCreateNotificationButton->setImage(RES_IMAGE);
space = this->createSpacer();
hLayout->addChild(space);
hLayout->addChild(mCreateNotificationButton);
// Align the image button at the center of the layout.
// Only after adding the image button widget to layout the widget's width
//.........这里部分代码省略.........