Reorder list rows in flex mobile app - actionscript-3

How can I let the user reorder the rows of a list in a flex mobile app?
You know, you see it a lot in native iOS apps. Usually you hit an Edit button at the top of a list view. Each row then gets a thumb icon that lets you move the rows around in the list.
This might be totally obvious, but I'm writing my first mobile app in flex and can't seem to find an example anywhere.
Cheers.

Spark List control supports Drag and Drop, besides dragging and dropping with the list itself, you can also do so between two different list controls. To enable the feature, you could set dragEnabled, dragMoveEnabled, dropEnabled properties to true, more details may be found in this help document.
To enable the feature as you described, you could set those drag and drop properties to true when the edit mode is enabled. Optionally, you could also display a drag handler (as decorator).
Update: For mobile application, there is a write-up on how to get around with mobile limitation of drag-and-drop.

Related

Print/highlight/export all checked checkbox using Chrome Dev Tools (or other)

I've got a page which is used for keeping track of a collection by using check boxes.
The site provides no ability to export the checked items or view them in a consolidated view - you must scan over hundreds (thousands?) of boxes to see just the ones you've checked.
I'm looking for a way using Chrome Dev Tools (or other plugin/extension/etc), to somehow print a list, export, and/or highlight only the checked elements on the page to make it easy to view them all.
Thoughts?

Difference between a chrome popup and Panel

I am building an extension for Chrome and Can't decide If I should use chrome.windows.create type popup , panel or detached panel. I could not find a comparative study of the three options . Any links or short description of positives and limitations of each will be helpful .
Thanks
You are having difficulty understanding it, because unless you specifically enabled an experimental feature, they are exactly the same, or rather the latter ones are ignored and a popup type is created.
Unfortunately, this means that this API is unavailable for general use until Google decides to mark it stable.
Quoting the docs:
The 'panel' and 'detached_panel' types create a popup unless the '--enable-panels' flag is set.
As for what panels are, here is the API proposal with detailed description.
Panels are windows that are visible to the user even while the user is interacting with other applications. The small windows are positioned at the bottom of the screen, with minimal manual window management by the user. This API will allow extension developers to create and use panels.
[...]
An extension opens small "pop up" windows, for example, separate chat sessions, calculator, media player, stock/sport/news ticker, task list, scratchpad, that the user wants to keep visible while using a different application or browsing a different web site. Scattered "pop up" windows are difficult for the user to keep track of, therefore panels are placed along the bottom of the screen and are "always on top".
The user would like easy control of chat windows: finding them, moving them out of the way, etc. Window management of separate chat "pop ups" is time consuming. All panels can be minimized/maximized together.
If you want a real-life example, the Hangouts extension is whitelisted to use this window type; that's how they make the chat panels:
Since chrome doesn't by default enable panels , this need to be set to display panel behavior instead of popup window . Note that popup windows can be re positioned and one can view console window , but none of it is available in panel .

WinRT AppBar changing on context (or ignoring right click)?

I am porting a Desktop WPF application to WinRT and I'm facing a little issue.
I had a ItemsControl and I had a context menu on every item to delete / edit the item.
I have been told that PopupMenu are not good in WinRT and I should use a AppBar.
I think I'm doing something wrong or I misunderstood that.
I thought that I could put that options on a AppBar and when I select an element, popup the bar and click where I need.
The problem is that the AppBar will show up when I right click on any part of my app, so that buttons will show up with an item selected.
So can I change the layout of the AppBar on different contexts (because it seems that Microsoft wants us to use AppBar as context menu without context capabilities) or only show it when I want via code?
Would be good to have a TopAppBar with some App-wide options and a BottomAppBar just for ListView's item context menu.
Or maybe I'm doing all this stuff wrong and I have to use another approach to put extra options on the Listview's items.
You are thinking about this correctly. AppBar is the place where you should put all your non-essential and selection based commands.
The guidelines here and here suggest that they should be arranged as follows:
Navigation commands should be in TopAppBar
Commands related to selection should on the left side of BottomAppBar
The rest of page specific commands should be on the right side of BottomAppBar
Contextual commands should only be shown when a relevant item to that command is selected. For that purpose you should set Visibility of these commands accordingly. Also AppBar should open automatically when an item with contextual commands in it is selected. You can do that programmatically by setting its IsOpen property. You should also set it to sticky mode by via IsSticky property.
If you're using MVVM you can bind your viewmodel properties to all Button and AppBar properties mentioned above.
There's a CustomAppBar control available in WinRT XAML Toolkit. I haven't used it myself yet but it has a couple of extra features that might prove useful in your case.

Preventing an item list from getting destroyed upon scroll down

I'm working in a mobile app for iPad in Flex 4, I have a list with custom items rendered, data is taken from external XML. In that XML I get an image path, so when I scroll down, the images go out...
Is there a way to prevent the list of items from getting destroyed upon scroll down?
Yes, I believe the feature you are talking about is item renderer recycling.
For performance reasons I don't recommend turning this off but if you have to you can set
useVirtualLayout="false" on your list
Set your list useVirtualLayout property to false. But beware of performance issues !
See :
http://flexponential.com/2010/01/10/caching-images-loaded-from-a-spark-item-renderer/

How can I display the same DOM across several tabs in a Chrome Extension?

I'm looking to build a chrome extension that allows the user to have an independent subwindow that is the same in each tab (for example you are taking notes and the notes are synchronized among each tab). Also, clicking a link should not destroy this subwindow.
One solution is to inject an iframe in each tab, and try to synchronize this data serverside and send back to each client tab, as it is updated.
This seems very tedious, plus the iframe would be provided by a third party, and I want to make it the easiest for them.
Is there a way I can have a shared dom piece and display it in its current state across several tabs?
There's an API (still experimental as of Chrome 17) that does more or less exactly what you want. If you visit about:flags, and enable "Panels" (they're enabled by default in Dev and on Canary (and on ChromeOS)), you'll be able to use chrome.windows.create with a type of panel to create a floating pane that exists independently from the browser window. That would likely meet your need.
Take a look at the Google Talk extension for an example of how it might work.