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

  • SEARCH
  • Home
  • 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 7824785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:42:59+00:00 2026-06-02T08:42:59+00:00

I want to make a UI like this image https://i.stack.imgur.com/bB8UM.png .I use the basic

  • 0

I want to make a UI like this image https://i.stack.imgur.com/bB8UM.png
.I use the basic Managers like Vertical and Horizontal field managers.But My Horizontal manager is not working.I get single Image in my Horizontal Field manager instead of two.What is the reason for that?Where I am going wrong?

This is my code which I am using-

package mypackage;

import net.rim.device.api.ui.*;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;
import net.rim.device.api.system.*;

class TestScreen extends MainScreen{

    private VerticalFieldManager verticalManager;
    private BitmapField myBitmapField,tipOfTheDay,completeBitmapField,top30BitmapField;
    private FooterText mTextField;

    TestScreen() 
    {    
        super(NO_VERTICAL_SCROLL);

        verticalManager = new VerticalFieldManager(Manager.VERTICAL_SCROLL|Manager.VERTICAL_SCROLLBAR)
        {
            public void paint(Graphics graphics)
            { 
                graphics.setBackgroundColor(0x00000000);
                graphics.clear();
                super.paint(graphics);
            }            
            protected void sublayout( int maxWidth, int maxHeight )
            {
                int width = Display.getWidth();
                int height = Display.getHeight();
                super.sublayout( width, height);
                setExtent( width, height);
            }
        };

        Bitmap logoBitmap = Bitmap.getBitmapResource("mybitmap1.png");
        myBitmapField = new BitmapField(logoBitmap, Field.FIELD_HCENTER);   

        verticalManager.add(myBitmapField);

        Bitmap mytipOfTheDay  = Bitmap.getBitmapResource("tipoftheday.png");

        verticalManager.add(tipOfTheDay = new BitmapField(mytipOfTheDay,Display.getWidth()));
        String text = "Lorem ipsum dolor sit amet, consectetuer \n"
            + "adipiscing elit, sed diam nonummy nibh euismod \n"
            + "tincidunt ut laoreet dolore magna aliquam erat  \n "
            + "volutpat. Ut wisi enim ad minim veniam, quis \n"
            + "nostrud exerci tation ullamcorper suscipit \n"
            + "lobortis nisl ut aliquip ex ea commodo consequat. \n"
            + "Duis autem vel eum iriure dolor in hendrerit in \n";
        verticalManager.add(mTextField = new FooterText(text, Display.getWidth(), Display.getHeight()/2));

        HorizontalFieldManager hfm = new HorizontalFieldManager();
        Bitmap complete  = Bitmap.getBitmapResource("Complete.png");
        Bitmap top30  = Bitmap.getBitmapResource("Top30.png");

        hfm.add(new BitmapField(complete));
        hfm.add(new BitmapField(top30));

        verticalManager.add(hfm);

        this.add(verticalManager);
    }
}
  • 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-06-02T08:43:01+00:00Added an answer on June 2, 2026 at 8:43 am

    Fields will be evenly spaced on the following HorizontalFieldManager, and the HorizontalFieldManager will accommodate its child with in maximum allowable width.

    HorizontalFieldManager hfm = new HorizontalFieldManager() {
        protected void sublayout(int maxWidth, int maxHeight) {
            int w = maxWidth;
            int h = 0;
            Field f0, f1;
            if (getFieldCount() == 2) {
                f0 = getField(0);
                f1 = getField(1);
    
                layoutChild(f0, maxWidth / 2, maxHeight);
                layoutChild(f1, maxWidth / 2, maxHeight);
    
                h = Math.max(f0.getHeight(), f1.getHeight());
    
                setPositionChild(f0, (maxWidth/2 - f0.getWidth()) / 2, (h - f0.getHeight()) / 2);
                setPositionChild(f1, maxWidth/2 + (maxWidth/2 - f1.getWidth()) / 2, (h - f1.getHeight()) / 2);
            }
            setExtent(w, h);
        };
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make a dropdown menu like delicious has at this http://delicious.com/search?context=all&p=sql&lc=1 page.
I want to make something like this... :LoopBegin if ???? goto End some other
I want to make a form like this, and i want to post the
I want to make a form like this in windows forms. To make a
I want to make a case sensitive comparision like this: If ARGV[0].eql? /word/i print
I have an element, like this: <div id=navleft> </div> I want to make this
I want some like this: How make it ideologically correct?
I want to make a website like http://www.nawaiwaqt.com.pk/E-Paper/Lahore/2011-07-25/page-5 or http://www.etemaaddaily.com/ , i want to
I wish to make something looking like this: http://img291.imageshack.us/img291/5571/bartablestyling.png (Right now i only have
Idea: I want to make smth like real time electronic blackboard. Many users have

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.