开发者

How to display Half screen?

I am working on a project where I need to display a ListField that takes the top half of the screen when the user clicks on a menu item. It should display on top of the earlier screen. How can I implement it?

Here are my ideas:

  1. Use ListField directly with the above screen size to required screen.
  2. Use PopupScreen with ListField
  3. Use some screensplit functionality to display half开发者_运维知识库 of the screen


PopupScreen is best fit for your question. Can you try and post the code that didn't work?

Another option is to use managers to split the screen (higher manager and lower manager) and to hold another two managers: one that will be displayed on click and one that will be used as a pointer to the displayed Manager. Then, when ever the replace event is fired you should call the following function:

void updateManagers(boolean click)    
{    
  if(click)
  {    
    currentManager = afterClickManager;    
  }    
  else    
  {  
    currrentManager = beforeClickManager;    
  }    
  invalidate();  
}

Where currentManager is an instance of Manager and afterClickManager & beforeClickManager are instances of some class which extends Manager (no need to be the same class).

Note that you should add currentManager to your screen layout before using the invalidate function.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜