不要使用setstatus來添加橫幅內容,而是考慮使用Display.getHeight(),您可以在屏幕底部使用兩個水平管理器。
我在我的應用程序中完成了類似的屏幕,這裏是關於這個的簡要信息。
1)父管理器(無論是垂直/水平)說parentManager
2)用適當的高度和最大寬度(覆蓋在水平管理者sublayout兩個Horozontal經理)和同時添加這兩種一個verticalfield管理器(bottommanager)
3)然後這裏來棘手的部分。到父經理覆蓋sublayout並添加下列步驟
vfm_screen = new VerticalFieldManager(ScrollView.NO_VERTICAL_SCROLL | HORIZONTAL_SCROLL
| NO_VERTICAL_SCROLL){
protected void sublayout(int maxWidth, int maxHeight) {
setPositionChild(parentManager, 0, 0);
layoutChild(parentManager, Display.getWidth(), Display.getHeight());
setPositionChild(bottommanager, 0, Display.getHeight()-114);
layoutChild(bottommanager, Display.getWidth(), 114);
setExtent(Display.getWidth(), Display.getHeight());
};
};
vfm_screen.add(parentManager);
vfm_screen.add(bottommanager);
add(vfm_screen);
這裏114是很難大小,你可以變化它根據您的需要。並將Button添加到屏幕中心的父母管理器中。
需求需要在您的問題中完整闡述,而不僅僅是在標題中。我編輯了文本以包含您的評論,標題中的內容,以及我爲什麼不想使用setStatus()的最佳猜測。 –
請張貼您現有的代碼。基本上,你必須創建一個'VerticalFieldManager',覆蓋它的'sublayout()'方法並將其添加到屏幕的委託。相比之下,您所有的其他領域和經理都應該添加到新的VFM中,而不是添加到屏幕的代表中。檢查這[問題](http://stackoverflow.com/q/9549827/396949),它會幫助你開始。 – mrvincenzo