MergeAdapter and hiding headers (views) - android-listview

I have three adapters and headers before each adapter in a listView. If a particular section is empty, how can I hide that header(view)?
It leaves a space where it is if I make it's layout visibility gone.

I figured it out! :-)
mergeAdapter.setActive(songHeaderView, false);
So simple!

Related

Drag and drop in SplitLayoutPanel not working properly

I'm trying to drag row from cell table, to my other widget. To do this i created DragAndDropCellTable and DroppableWidget. While they were in same container it was working fine. But since i put them to SplitLayoutPanel, it is not working properly. I still got drop event, but helper is not visible. I tried to set z-index on helper but this didn't help.
Is any one has idea what i'm doing wrong?
Do you try to set the option appendTo to "body" ? The cause is certainly because the overflow css property of the split panel is set to hidden hidden
I have the same problem here, but I don't get your answer completely.
I guess you mean that the helper is hidden when it leaves the panel cause of the overflow hidden. Am I right so far?
But i don't get how to append. How can I append the helper to the rootPanel?
Or am I on the wrong track with this?
Ok I got it.
I don't have to append the helper but the DraggableOptions to "body"
draggableOptions.setAppendTo("body");
https://code.google.com/p/gwtquery-plugins/wiki/DraggablePluginGettingStarted#DraggableOptions_Object
Thanks

Make UITextView scrollable

This seems so dumb, but I checked all the boxes that I have found as "solutions" to similar problems but nothing is quite working. I have a UITextView box that I want to be scrollable, and my settings are below. Anyone know why it isn't letting me scroll?
Please also make sure that User Interaction Enabled is checked in .xib file
I also had a problem with an unscrollable UITextView, but the other answers here didn't help (granted it was a special case: I only needed to scroll when the app was viewed horizontally).
Just in case anyone has a similar problem and lands here: what did help me was to activate vertical Autosizing (Size Inspector under View) for the textview.
Make sure you have text in your UITextView
Check to see if the UITextView is enabled (there's a property in settings) - it should be enabled.
Make sure you don't change these settings (or the "Scrolling Enabled" property) in your code.
Good luck !
you have to actually have texts inside the textview that overlap it original frame height to make it scrollable

Gtk treeview problems

I have a simple treeview (like this one - http://www.mono-project.com/GtkSharp_TreeView_Tutorial) filled with 200 items and connected to scrollbar. Everything works, but when I select an item and use arrow keys, selected item can be out of visible area. Is it possible to focus on it or set adjustment of scrollbar, i.e.
void HandleTreeSelectionChanged (object sender, EventArgs e)
{
vadjustment.Value=SELECTED-ITEM.DISTANCE-FROM-TOP-OF-TREEVIEW;
}
And one more question: How to paint a black border to table (this tree.EnableGridLines = TreeViewGridLines.Both; makes just inside grid).
Thanks in advance.
Matej
I agree with Johannes' answer that you seem to be doing something odd, you really should just need to use a GtkScrolledWindow. It should handle keyboard navigation (what you seem to be describing in your comment to Johannes' answer) too, this is not something you should need to be doing manually.
To anyway try to answer your question, you can cause the tree view to scroll to any given cell using gtk_tree_view_scroll_to_cell().
To add scroll bars to a tree view (or text view), you just need to add it to a GtkScrolledWindow; it handles everything automatically. I'm pretty sure it also creates a border in most themes.
Update: Alternatively, you can also "bind" the tree view's scrolling behaviour to an arbitrary scrollbar by setting the scrollbar's adjustment to that of the tree view:
scrollbar = gtk.VScrollbar(treeview.props.vadjustment)
(Oh, that's the PyGTK syntax; in Gtk# it's probably treeview.VAdjustment.)

how to remove the scrolll bar in the gwt listbox?

i have a list box in my application, but i don't want to show the
vertical scroll bar on the right side, is there any way to remove it?
here is my code:
<g:ListBox visibleItemCount='3' width="15em">
<g:item>Last 7 Days</g:item>
<g:item>Last Week</g:item>
<g:item>Last Month</g:item>
</g:ListBox>
Thanks!
I believe the correct answer to this is simply: "You can't"
The ListBox (HTML Select) vertical scroll bar cannot be completely removed.
You could create your own custom control using a div to do the same thing. but I believe that may be outside of the abilities of GWT.
Hide vertical scrollbar in <select> element
Will provide additional information.
I assure you the correct answer to this is simply: "You can".
Just add the line:
overflow: hidden !important;
to your css style sheet and make sure your visible item count is higher than it's total item count.

A GWT CellTable with frozen header and initial column

I need to freeze the first column and first row of data in a CellTable, so that users can scroll through the data but still see the labels on the "axes." The first column should scroll when the user scrolls up and down, and the header row should scroll when the user scrolls left and right. Think "Freeze Panes" in Excel.
I'm using GWT 2.1 and am willing to write my own widget to do this if no solutions already exist. My question is a two-parter:
Do any widgets already have this behavior?
Any suggestions if I'm going to implement this myself?
Thanks!
I implemented a solution myself. Check out http://larkolicio.us/ScrollTable/ExperimentTables.html
It's a LayoutPanel with three AbsolutePanels inside it. The frozen columns are a CellTable, the main part is a CellTable, and the header is a Grid - I could find no way to set the width of a CellTable column! A ScrollHandler links the main part to the two frozen parts. There is a little bit of delay - I'd appreciate it if someone could find a way to get rid of the lag between the sections.
I got it working to a point that I could use it, and stopped. It is not a general-purpose widget. Please feel free to use it at your own risk.
This implementation is quite good. I have just tested it. It however needs some changes made to support asynchronous loading. GWT Issue 188 covering similar request for enhacement was created on Oct 2006?!
Thanks for sharing.