public void onShow() { footer.posText.setText(""); footer.posAction = Const.ACTION_NULL; footer.negText.setText("Back"); footer.negAction = Const.ACTION_BACK; // CommonPopup popup = new CommonPopup(); // GUIListItem popupItem = CommonScreen.createPopupItem(); // // popupItem = (GUIListItem) popupItem.clone(); // ((GUIText) popupItem.items.elementAt(0)).setText("Delete"); // popupItem.clickAction = Const.ACTION_DELETECURRENT; // popup.list.addItem(popupItem); // // popupItem = (GUIListItem) popupItem.clone(); // ((GUIText) popupItem.items.elementAt(0)).setText("Exit"); // popupItem.clickAction = Const.ACTION_POPUP; // popup.list.addItem(popupItem); // // this.popup = popup; GUIList list = CommonScreen.createList(); addControl(list); GUIListItem item = CommonScreen.createItem(); GUIText text = CommonScreen.createText(); item.addItem(text); String[] headers = Question.getQuestionHeaders("outbox"); for (int i = 0; i < headers.length; ++i) { item = (GUIListItem) item.clone(); ((GUIText) item.items.elementAt(0)).setText(headers[i]); list.addItem(item); } headers = Comment.getCommentsHeaders(); for (int i = 0; i < headers.length; ++i) { item = (GUIListItem) item.clone(); ((GUIText) item.items.elementAt(0)).setText(headers[i]); list.addItem(item); } headers = UploadedImage.getHeaders(); for (int i = 0; i < headers.length; ++i) { item = (GUIListItem) item.clone(); ((GUIText) item.items.elementAt(0)).setText(headers[i]); list.addItem(item); } }
public void onShow() { footer.posText.setText("Menu"); footer.posAction = Const.ACTION_POPUP; footer.negText.setText("Back"); footer.negAction = Const.ACTION_BACK; CommonPopup popup = new CommonPopup(); GUIListItem popupItem = CommonScreen.createPopupItem(); ((GUIText) popupItem.items.elementAt(0)).setText("Edit"); popupItem.clickAction = Const.ACTION_EDIT; popup.list.addItem(popupItem); popupItem = (GUIListItem) popupItem.clone(); ((GUIText) popupItem.items.elementAt(0)).setText("Delete"); popupItem.clickAction = Const.ACTION_DELETECURRENT; popup.list.addItem(popupItem); popupItem = (GUIListItem) popupItem.clone(); ((GUIText) popupItem.items.elementAt(0)).setText("Exit"); popupItem.clickAction = Const.ACTION_POPUP; popup.list.addItem(popupItem); this.popup = popup; GUIList list = CommonScreen.createList(); addControl(list); GUIListItem item = CommonScreen.createItem(); GUIText text = CommonScreen.createText(); item.addItem(text); item.clickAction = Const.ACTION_EDIT; String[] headers = Question.getQuestionHeaders("drafts"); for (int i = 0; i < headers.length; ++i) { item = (GUIListItem) item.clone(); ((GUIText) item.items.elementAt(0)).setText(headers[i]); list.addItem(item); } }