Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7684921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:08:17+00:00 2026-05-31T19:08:17+00:00

I an trying to implement a screen like below: For that, I am using

  • 0

I an trying to implement a screen like below:

enter image description here

For that, I am using following code. It is not working at all.

HorizontalFieldManager outerManager = new HorizontalFieldManager(FIELD_BOTTOM|USE_ALL_HEIGHT);
        outerManager.setBackground(BackgroundFactory.createBitmapBackground(Bitmap.getBitmapResource("img/bghome.png")));

final FCLabelField selectedLabel = new FCLabelField("Hello World", LabelField.USE_ALL_WIDTH | DrawStyle.HCENTER);

selectedLabel.setFontColor(Color.BLACK);
selectedLabel.setBackground(BackgroundFactory.createSolidBackground(0x00cccccc));
outerManager.add(selectedLabel);

HorizontalFieldManager innerManager = new HorizontalFieldManager();

innerManager.setPadding(0, 10, 0, 10);


innerManager.add(new ButtonField( "Button 1", ButtonField.CONSUME_CLICK | ButtonField.FIELD_RIGHT ));
innerManager.add(new ButtonField( "Button 2", ButtonField.CONSUME_CLICK | ButtonField.FIELD_RIGHT ));
innerManager.add(new ButtonField( "Button 3", ButtonField.CONSUME_CLICK | ButtonField.FIELD_RIGHT ));
innerManager.add(tab4);
innerManager.add(tab5);

outerManager.add(innerManager);

innerManager.setBackground(BackgroundFactory.createSolidBackground(0x00cccccc));

add(outerManager);

What is the problem in my code? How I can set a screen like above?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T19:08:19+00:00Added an answer on May 31, 2026 at 7:08 pm

    There are several ways to achieve what you asked. One way is to use the setStatus() method as BBdev suggested (it will work only for screens of type MainScreen and won’t work for screens of type FullScreen). Another alternative would be to do the alignment to bottom manually.

    Important alignment rules to remember:

    • A HorizontalFieldManager can only align fields vertically. When adding fields to horizontal manager, only these alignment styles have effect: FIELD_TOP, FIELD_VCENTER, FIELD_BOTTOM.

    • A VerticalFieldManager can only align fields horizontally. When adding fields to vertical field manager, only these alignment styles have effect: FIELD_LEFT, FIELD_HCENTER, FIELD_RIGHT.

    Here is a code snippet that does what you asked.

    public class UISandbox extends MainScreen {
        public UISandbox() {
            super(NO_VERTICAL_SCROLL | NO_HORIZONTAL_SCROLL | USE_ALL_HEIGHT | USE_ALL_WIDTH);
    
            HorizontalFieldManager outerManager = new HorizontalFieldManager(USE_ALL_HEIGHT);
            outerManager.setBackground(BackgroundFactory.createBitmapBackground(Bitmap.getBitmapResource("img/bghome.png")));
    
            VerticalFieldManager innerMngr = new VerticalFieldManager(USE_ALL_WIDTH | FIELD_BOTTOM); 
            final LabelField selectedLabel = new LabelField("Hello World", FIELD_HCENTER) {
                protected void paint(Graphics g) {
                    g.setColor(Color.BLACK);
                    super.paint(g);
                }
            };
            selectedLabel.setBackground(BackgroundFactory.createSolidBackground(0x00cccccc));
            innerMngr.add(selectedLabel);
    
            GridFieldManager innerInnerMngr = new GridFieldManager(1, 3, USE_ALL_WIDTH);
            innerInnerMngr.setPadding(10, 0, 10, 0);
            innerInnerMngr.setColumnProperty(0, GridFieldManager.AUTO_SIZE, 0);
            innerInnerMngr.setColumnProperty(1, GridFieldManager.AUTO_SIZE, 0);
            innerInnerMngr.setColumnProperty(2, GridFieldManager.AUTO_SIZE, 0);
            innerInnerMngr.add(new ButtonField("Button 1", ButtonField.CONSUME_CLICK | FIELD_HCENTER));
            innerInnerMngr.add(new ButtonField("Button 2", ButtonField.CONSUME_CLICK | FIELD_HCENTER));
            innerInnerMngr.add(new ButtonField("Button 3", ButtonField.CONSUME_CLICK | FIELD_HCENTER));
    
            innerMngr.add(innerInnerMngr);
            outerManager.add(innerMngr);
            add(outerManager);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

trying to implement a dialog-box style behaviour using a separate div section with all
I am trying to implement a layout that looks like a tabbed view, but
I'm trying to implement a SlidingDrawer that will occupy the full screen width, but
I'm trying to create a simple help screen that looks like the the one
I'm trying to implement a Facebook like toolbar on the bottom of the screen
I'm trying to implement a sticky footer which is working except that the main
All I am currently trying implement something along the lines of dim l_stuff as
when trying to implement an Aspect, that is responsible for catching and logging a
What I'm trying to do is to implement something like the fruit machine scroll
I'm currently trying to implement a UITableView with a delegate and data source that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.