Vertical oriented Metro WinJS ListView in Grouped Mode - microsoft-metro

I'm banging my head against the wall trying to implement a ListView with grouped items that renders like the WP7 LongListSelector shown below. I've tried adding a win-vertical class to the element with the data-win-control="WinJS.UI.ListView" but since win-vertical seems to only apply to the viewport that didn't work. Any help would be greatly appreciated.

What kind of ListView Layout are you using? Using ListLayout instead of GridLayout does change the scroll direction from Horizontal to Vertical. But I don't see an easy way to add a group header for ListLayout list view. For GridLayout, there is a groupHeaderPosition property, but ListLayout object doesn't have this property. (Someone actually complained about the same thing.. at the end of this page)So, you might need to hack around for the group names by adding a dummy "group name" item into your data source and sort it properly.
Ref:
http://msdn.microsoft.com/en-us/library/windows/apps/br211837.aspx
http://msdn.microsoft.com/en-us/library/windows/apps/br211792.aspx

Related

Remove selection from ListView element in UI Toolkit

When I drag the elements inside the ListView component, in the new UI Toolkit system, the element selected get white background but I want it to be transparent.
I just want to drag the elements like a list but without changing the elements background color.
I've tried a lot of things with the new API but could not figure it out.
I tried change the element background, disable listview general properties, research in google but nothing
I would like if you guys can help. Thanks!

Flutter/Dart Datatable or Sliver with fixed header and fixed row header

So I want to create a data view for a Flutter app that incorporates a datatable or sliver (or anything really) with a fixed header when scrolling vertically and also fixed row headers when scrolling horizontally. I tried messing around with the data_table_2 and table_sticky_headers plugins, but they don't do exactly what I want. I'm hoping someone can point me in the right direction or help come up with a solution.
Here's a gif image showing what I want to achieve...
Data View Idea
I figured it out. It was pretty simple actually, using nested Stack's and SingleChildScrollView's. No plug-ins required.
Here's a link to the example source code if anyone is interested...
https://github.com/jstoyles/flutter_data_view_idea

`ListView` not scrolling to exact position when a few list item are of big height

I'm using ListView to display my dynamic content. Based on selected option, I've to scroll to some specified position in ListView. This works great when the list item height is not that big, i.e. it covers the whole screen. But when big height item are present in list, the scroll doesn't take me to proper position, instead it takes to some in between position. I tried using both of the following but same result.
listView.smoothScrollToPosition(myItems.indexOf(thisItem));
listView.setSelection(myItems().indexOf(thisItem));
Can anybody point the possible cause of the issue and also give some suggestions.
The workaround suggested here worked for me except that I called both functions, smoothScrollToPosition and setSelection, sequentially instead of using OnScrollListener. Though its not giving smooth scrolling effect but it's fulfilling my requirement. If any body can suggest a more proper solution, it's welcomed.

Turning scrollbar, ListView into timeline slider

I've been seeing this UI technique quite often at Dribbble, mostly demonstrated on iPhone as timeline, and I am really wondering if it's possible to do so on Android. The idea is to exploit scrollbar, make it activate each row it is passing.
Consider these schematics of a list of contact.
The first one is the list (photos on the left side, names on the right) split roughly in the middle with scroll track.
The scrollbar cannot expand and has to be smaller than the smallest row. I believe it is possible to produce this kind of arrangement by combining two listviews and make them roll together.
The second one shows the screen when scrolled and when the scrollbar moves to the second row. After it stops, the second row will expand its height. All hidden elements there like address, phone, etc will show up. Also, the moment the scrollbar leaves the first row / hits the second, the first row will toggle off. It will shrink and remove all elements except name.
I have been thinking about this scenario and one key question in this technique is whether the scrollbar has the ability to activate the row it hits. The only tool I know in regard to scrolling is onScrollListener but I wonder if it's sufficient. Does anyone have any insight into such scenario ?
Thank you in advance.
I've been seen something similar to this in lots of applications. Some of them are just using ListView with design tricks to look like that, others with custom views or something else. The idea which I have in my about this implementation is using two Fragments: left and right which are placed in one FragmentActivity. Left Fragment will be your image holder, where for example you will have a ListView or some other view depending on your choice which will communicate with the Right Fragment and when LeftFragment's ListView stop scrolling, fire an event to RightFragment's ListView to scroll to position 5 for example and expand that item. Not really sure if it's the best option and if it will work properly as you want, but that's the first idea which I can think of to do some implementation like this.
Hope this help you find the right answer.

Smartgwt - create a panel with title and a border

This sounds like a pretty simple thing to do but I havent been able to find an easy way to do this. How do I create a panel with a title and a border which can contain my widgets? I have seen the SectionStack class which provides this. But I dont want to create a section stack.
Window can be added to a layout and drawn. But is it the only way or is there a container class that I am missing?
Also, how does one center things? Say a textfield and a button at the center of the page. How is this achieved?
If you are using a DynamicForm, you can give it a border and title with
form.setIsGroup(true);
form.setGroupTitle(title);
This actually works for Canvas, too (which is the superclass of most widgets and layouts in SmartGWT).
(I just had the same problem, and found this question, as well as the thread Is there a "titled Border" on the SmartGWT Forums, which gave this answer. I tried and it seems to work.)
To do form-related tasks, look into DynamicForm. To set the inputs in the form, you use setItems(Item...). A text field is a TextItem. You set it's title to control the label that SmartGWT will build. To get a title for the form, the best I've come up with is to use a container canvas that will contain both the title (probably a Label element) and the DynamicForm. To center the inputs, I believe you'd need to use setAlignment on the DynamicForm.
You could create an object that is actually a VLayout that contains a Label (the tile), has a border as you need and includes a Canvas (the generic stuff you want included).
In my experience, I noticed that very often I have a DynamicForm visible, so I just add a BlurbItem control to diplay the tile and a small explanation.