What i want to do is to create a menu with 3 choices, the two first are left and right and the last is Go to Page. But i want 2 lines, one with left and right, and below the Go to Page (Not everyone in the same line. How can i do this ?
There is no way to control the size of specific items in the options menu. You can however experiment with changing the order of them.
When working with 3 items, the first item will span the entire top row, and the last 2 items will be split in the bottom row.
If order is very important, create a linearlayout at the bottom of your screen with buttons with the size and order your want. Then override the onCreateOptionsMenu function and toggle the Visible attribute of the linearlayout containing your menu.
Related
I have created a grid which contains some columns and a button on the far right. Using this button, the user can show / hide selected grid columns. The problem is that the rightmost column name is partially hidden by this button.
As can be seen in the following picture. Is there a method to make it so that either:
The button is moved slightly to the right, even outside the border of the grid
The rightmost column name is moved to not be underneath the button
If possible, I would like to implement the first solution, as the column names can be reorganized by the user and the solution would have to be dynamic.
I am working on an application that uses a TableView and has a Table Menu Button to add or remove columns from the list.
Since I wanted my column headers to have tooltips, I had no choice but to create a label and use it in the following manner in :
// Some code here
TableColumn col;
// some code here
col.setGraphic(header_title);
The problem with this is that when the program runs, the table menu button shows a list of empty text:
On the other hand when I do:
// Some code here
TableColumn col;
// some code here
col.setText(rs.getString("column_title"));
col.setGraphic(header_title);
I can see the text on the column menu, but the actual titles are appended to the graphic:
I have tried to look for a way to perform a setContentDisplay(GRAPHIC_ONLY), but this does not seem to exist for TableColumn, and I am not sure how to access the header node in order to set this setting.
Any help would be greatly appreciated.
Just forget about the inbuilt table menu button. It's absolutely minimal and not worth mentioning. If you e. g. want to click away 10 columns you have to click on the button, hide the column, click on the button, hide the column, etc. In other words: It closes as soon as you press a menu item.
You can't even extend it with e. g. a hide all and a show all button. And it's buggy: When the last column gets hidden, the menu button vanishes as well, so you have to restart your application if you want to see anything in your table again.
Just create your own table menu. There are 2 examples on this gist:
example which uses a lookup, i. e. works without reflection
example which uses reflection
Then you can adapt whatever header you want and whatever menu items you want.
I have implemented ExpandedListView. I have 2 questions for that
When I expand and scroll child item ,the group header also scroll ,is any way to keep that group header at top always even we scrolling child item list ?
Is any way to fit ExpandableListView (before child items comes) to phone screen , right now in bottom lot of blank space ?
For your first question:
no there is no why that you can fix the group view, if you want to fix group i would suggest you to make four list view on screen. where in a Linearlayout make 4 textview and 4 listview placed alternately so that they are fixed and if there is no child inside you can write some appropriate message saying there is nothing to display.
And i guess it solve your second question as well ?
1. When I expand and scroll child item ,the group header also scroll ,is any way to keep that group header at top always even we scrolling child item list ?
No, ExpandableListView's Header's (Parent) and Childs are connected to eachother You can not independently scroll the Child views besides scrolling parent views.
2. Is any way to fit ExpandableListView (before child items comes) to phone screen , right now in bottom lot of blank space ?
You can fit the ExpandableListView by setting its height and width to fixed but it will be always affected as and when you will add some data into it. Till then you can not fit it into the screen.
Please,can anyone help me for this problem:
I have built the code in the way that each time I press one of the radio buttons on of the 5 tables I have must be visible in the window while the other 4 are invisible.
The only problem I have is to make the content of this table which has 2 colomns,,,Emer and Nota in the center of the second panel,,,because I have separated the window in 3 panels,
The first panel contains the radio buttons which are ok:)
The second panel contains the 5 tables,,,1 for each radioButton,,,I only need that when I press one of the buttons the selected table to show on the CENTER of the second panel.
The third panel contains only one button,but it's fine;)
Plz help me.
If you need the code tell me to write it here and I would like to put a print screen on it,so you can understand better...I hope so.
I can think of a few ways to solves this. The simplest being just remove the existing table from the second panel and add the table you want to see (should be in a scroll pane too). The other is to use something like a card layout and simply switch to the card that corresponds to your radio button.
I have a GridView of 9 rows of which the first one is sort of "header" row.
As there are 8 more rows they flow beyond the end of screen and need to be scrolled down to.
However this scrolling also causes the first row to go "off-screen".
Was wondering if there is any way I can prevent the first row alone from being scrolled off?
I dont want to make this a separate LinearLayout as it is part of a dynamic View (the GridView) that I create at runtime.
TIA
Was wondering if there is any way I
can prevent the first row alone from
being scrolled off?
Not that I am aware of, sorry.