I have 8 bitmap and i want to put 4 of them to the first row, rest to the second row...
Can you help me to use TableLayoutManager?
See the BlackBerry developer knowledgebase article:
Create a rich UI layout with TableLayoutManager
It's a pretty simple class to work with, if you're familiar with RIM's thought process (lol)
Related
I've set up the tab and basic navigation, But having problem how to create such list view in android, with 2 or more rows and have two columns as in picture below adjusted side by side(have imageview & button below each image) & another list view below that one, which is basic and simple. I'm totally new to android ui xml, please guide me, or point me to any good learning resource about this on web.
Use dashboard in your application.Just Google it about Dashboard.You will get tutorial.This is an sample dashboard view.
Basically I do like this
list = new List("Hello List", List.IMPLICIT, LIST_ITEMS, null);
...
list.append(titles,images); // 1 text, 1 image
but, I wanna add descriptions to list item too. (titles, descriptions, images)
How can I do that? Do you have any example?
thank you so much.
You can take a look here in the LWUIT blog.
Here you can see an example with some code
LWUIT CellRender
While jmunoz's answer is 100% correct I'd like to add that you can just use MultiList if you use Codename One which is MUCH simpler and unlike LWUIT which is no longer supported by anyone Codename One has a strong following.
I have taken the horizontal list view.I am able to display the images in list view.It is displaying all the images horizontally.But my requirement is i need to show only 4 images in a row.If there is 5th image then it should come in the second row(for each row there should me only 4 images).How can i do this.Actually i am struck up here.I think you are able to understand my problem.Thank You.
I am using JavaFX 2.x
As far as I understand, if you need to allocate only 4 images in a row, and the 5th+ images transfer on the next row, you will be able to use a GridPane :
http://docs.oracle.com/javafx/2/layout/builtin_layouts.htm
where you could obviously set position of ImageView. Seems, it works so : you determine your own ListCell, and set its graphic node to be a gridpane, and configure grid pane as you wish.
Also, take a look on a flow pane, possibly, it will help you.
If I'm wrong with a recipe, please, try to describe your trouble again (code/screenshot). I'm not comletely sure about it.
Hi I am just a week old with Monotouch, the task that I have in hand is to display a table on an ipad with multiple rows and multiple columns i.e. a grid like structure with many cells and each cell containing some data which can later be edited too.
My application should look somewhat like the figure below, except that it has to be working on an ipad.
The only useful link I've found is this, but this article discusses how to do so using Objective C(now since I am using Monotouch & c# so I am not comfortable with Objective C so I cannot understand this solution).
So my question how to achieve the same (i.e. a table with many columns and rows - a grid) using Monotouch.
Please help! Thanks in Advance.
Ajit,
If you want to use the UITableView'to render your data, you should effectively make it so that each "row" can render the columns in the way that you need.
What you need to do is to create a UIView subclass that can render the elements in your columns. There are various ways of doing that, you can:
Create your own UIView that implements a draw method and draws on demand.
Create a UIView that is a composite and merely has some children views
Once you have the view, you can add this to your UITableViewCell
You can follow some of my recommendations for creating those UITableViewCells here:
http://tirania.org/monomac/archive/2011/Jan-18.html
But 2-D browsing using a 1-D design is not optimal. Chances are that all that you want is to render your various items in a grid, so you might as well just use the UIScrollView directly and add all of your child UIViews there.
The only difference is that UITableView is designed to recycle/reuse some expensive objects (each row) while a basic design that stashes everything on the view will not have any of those benefits.
A more advanced option would be for you to create/destroys the views that are shown/hidden as the user scrolls.
I want to to change the header color of nokia lwuit based full touch form and i have tried setTitleComponent method but it is not working. Please also check the following link
http://projects.developer.nokia.com/LWUIT_for_Series_40/wiki/UsingSeries40FullTouchFeatures
in which it is mentioned we cannot style the header but is it means we cannot change the bgcolor as well or put custom images in the header?
Note that when using LWUIT for Series 40 port, the default way of running LWUIT apps is a normal-size canvas in Series 40 full touch devices. Thus the Series 40 chrome shows on top of canvas. And there is no way of customising it (other than the title text).
If you want to provide branding elements to the title, the options are:
1. create an additional lable below the Series 40 headerbar
2. run the application in full-screen. We are planning to create a high-level API for this but currently it is already possible using the following trick:
((GameCanvas) (javax.microedition.lcdui.Display.getDisplay(this)).getCurrent()).setFullScreenMode(true);
In the latter option you will of course lose the Series 40 full touch layout.
Use lwuit source, you can change method visibility if required, this is example what i used to use gradient color
form.getTitleComponent().getStyle().setBackgroundType(Style.BACKGROUND_GRADIENT_LINEAR_VERTICAL);
form.getTitleComponent().getStyle().setBackgroundGradientEndColor(Color.GRADIENT_END);
form.getTitleComponent().getStyle().setBackgroundGradientStartColor(Color.GRADIENT_START);
form.getTitleComponent().getStyle().setFgColor(Color.WHITE);
form.getTitleComponent().getStyle().setPadding(10,10,0,0);
form.getTitleComponent().getStyle().setFont(font);
Here Color is my custom class that is used for color code, you can use your one.