ListView bound to storage files with grouping capabilities in WinJS - windows-8

I would like to replicate the song view of the Music app, in my Windows 8 Metro app using WinJS.
I'm using a StorageDataSource to load files from the music library in a list view. This works well, now I'd like to group music files by some property (ex.: album).
StorageDataSource does not support grouping, so I'm looking for tips on how to go at this. It has to be efficient as the user can have many items in the library, but I don't need it to auto-update when new files are added/removed (though it would be nice).
My current understanding is that I need to build 2 custom data sources:
One or the itemDataSource of the ListView, and is a wrapper around StorageDataSource. Ex.: the getItemsFromIndex implementation queries the underlying dataSource for its items that it wraps in a literal. I can't just set the StorageDataSource as its objects are immutable.
One for the groupDataSource of the listView. I build it manually once when the app loads, by iterating over my first StorageDataSource and determining how many groups I have, and where each one starts in terms of itemDataSource indexes.
It works, but I wonder if there's a better way. It also seems impossible to have groups in a ListLayout and it forces items to be displayed horizontally.
Does anyone have tips for the high level view of what's required here? Thanks.

First, you are correct that if you are using a list layout that grouping isn't supported; its only supported in the Grid layout. You could choose to insert fake data items for the groups that you could style as you needed using a custom item template rendering function.
The rest of your stuff will require some learning I suggest you take a look at the ListView samples to really understand the ins and outs of the data source API.
One option is to let the ListView calculate them for you by supplying the computerDataSourceGroups function:
http://msdn.microsoft.com/en-us/library/windows/apps/hh700578.aspx
The other option is that the StorageDataSource source is right the for you to look at; adding grouping to this as a raw datasource may in fact be your most efficient and maintainable solution. It will hopefully allow you to continue to leverage the virtualization of the listview without causing the data source to de virtualized. You should find the source in the references node in VS, in ui.js.

Related

How to create a list which sorts its self like games with the animation

I am creating a game in flutter in which I want to create my leader board page in which I want to achieve the list like Reorderable widget but in that we drag the tile manually but I need to get it automate ,it should elevate and lower another tiles same animation like Reorderable list but it should be automated
I hope I will find some solution with large community
You can take a look at the AnimatedList in Flutter: https://api.flutter.dev/flutter/widgets/AnimatedList-class.html
When a new value is inserted (or removed), it is automatically animated (and you can of course customize this animation to suit your needs).
I'm not sure how you would handle moving an item from one place to the next in the list, though.
Update
I found this other SO thread which mentions the great_list_view package, in which you can just update your underlying list (with the new score, or sort it again) and it will automatically animate it for you. That sounds like a good option, and the package has recently been updated and has a decent amount of likes on pub.
https://pub.dev/packages/great_list_view

Using Frames or changing visibility

I'm new to UWP (windows 10), working on an app for windows phone, I wanted to know what is the difference between:
Using multiple frames and navigate from one to other.
Using a single xaml with no frames but with multiple grids (or other patterns), and instead of navigate- just change visibility so only the desired grid will be visible.
which option is better? and why?
The system keeps track of the Page you are currently on. So even when your App exists and even if it's removed from memory the OS can tell the App to reopen on that page.
Similarily when your App provides other Apps with the capability of calling into it to open certain file types of to perform certain actions (e.g. start navigation, etc.) pages will be used.
Lastly if you put everything on a single page and just manipulate visibility this will increase memory consumption of your App (as everything needs to be loaded even if it's not visible) and it also might increase load times.
Of course how much that impacts you is up to the type of App you are building. In general however I'd advice you to start building using separate pages in case your App grows. Also you get a lot of stuff out of the box if you do so (e.g. animated transitions, etc.)

Displaying Webpages From RSS Feed in iOS Xcode

Currently, I have an RSS Feed Reader in a UITableView within a Navigation Control. I would like to click on the links and Open up a formatted page (containing all of the information from the website formatted for the iOS screen). I'm not sure if I should do this using the RSS data and a UITextView? I'm currently attempting to use UITextView in hopes that I can separate the information (title, author, body) without anything looking promising. I want to be able to move around the data and format it to my liking in the actual application itself. I read around and noted that you can include HTML and custom CSS. Would this be the way to go? I'm not quite sure how to tackle this. I want the page that opens up to be entirely scrollable (Like the IGN application or Slashgear application). Many apps for websites utilize this (and I am a bit new to this). How do they go about this? I also want to note, at some point I will like to cache the data so it may load what is already loaded without being connected to the internet. Does anyone have any ideas?
Edit:
Ok, I believe I found the correct path to go down from playing around and a lot of googling (nothing directly says what a decent way of doing this is). My particular way as of now is the route of a UIScrollView in general. Now the part I don't understand is how to divide up the long text into 'pages' for scrolling (and I am using the paging feature. This situation has led me into this question: How To Separate Strings For UIScrollView/UITextView based on the size of the frame
Ok, I believe I found the correct path to go down from playing around and a lot of googling (nothing directly says what a decent way of doing this is). My particular way as of now is the route of a UIScrollView in general. Now the part I don't understand is how to divide up the long text into 'pages' for scrolling (and I am using the paging feature. This situation has led me into this question: How To Separate Strings For UIScrollView/UITextView based on the size of the frame

Rally AppSDK: Is there a way to facilitate "Inter-Panel" communication between Apps in the new layout schema

So I'm just getting used to and getting my arms around the new "panel-based" App scheme released with the 5/5/2012 version of Rally. At first it was a bit frustrating to lose the window real estate when I've been accustomed to full-page iFrames.
I am curious however - from a desire to optimize the way I use real estate onscreen for an App page - I would like to setup and utilize a multi-panel App whose components can communicate. For instance, I'd like to have one App panel display some control widgets and perhaps an AppSDK table, and a second App panel display a chart or grid that responds to events/controls in the first panel.
I've been scanning the AppSDK docs for hints as to how this might be accomplished, but I'm coming up short. Is there a way to wire up event listeners in one App panel that respond to widget controls in another?
We have not decided the best way to have the Apps communicate yet. That is something we are still spiking out internally to find the best way to do it.
Each custom App is in an IFrame so figuring out how to make them communicate can be a bit tricky. Once we figure out a good way to do it we will be sure to let you know.
Has this topic, "app Communication", been addressed yet? I would to have one Custom Grid show User Stories. When a user story is selected another grid show the related tasks.

Incorporating a Custom Grid with the Rally SDK

There are a few things that the custom grid does that you cannot do with tables in the Rally SDK-- specifically re-ranking items.
For an app that I am making, incorporating a custom grid would work well, but I would like to be able to configure them programatically-- e.g. set up column names and widths, query parameters, etc. and then have that be a portion of my app-- I might set up a few grids in the app with different query parameters.
It that possible?
It's not possible. Yet.
We are working hard on a shiny new App SDK based on the Ext JS Framework. It will have a lot of the same features you are familiar with in Rally (like the grid w/ re-ranking, inline editing, etc).
Watch for it later this spring/summer!