How to manage focus when you use container ViewControllers - tvos

How to manage FocusGuide in tvOS when you have container view/views? I'm using a MasterViewController and have more than one container view controllers and it all together act like UITabBarController. But when I navigate between buttons it's not navigating to selected viewController's preferred focus environments. Buttons are arranged horizontally and container view controllers always under the tabs. I don't know how to manage them.

My app has been running smoothly in the market for a long time. Now I can easily say that the container view controller does not matter.
All the elements we see on the screen work in the same logic. If the focus engine cannot find an item on the targeted direction (while you do right-left or up-down with the remote control), it will not navigate.
So how to fix that? You need to create an invisible focus item (a view) that automatically redirect to the preferred view. And you'll need the handle same for opposite direction too! You need to help focus engine for the current situation.
In order to avoid such situations, I recommend that you talk to your UI / UX department about the TV experience and re-arrange some screens if necessary.
Lastly, I highly recommend you to use default UITabBarController for Apple TV and don't create your own version of it until learning User experience of Apple Tv.

Related

Loading screen Windows phone 8

I want to change default loading screen when i navigate between pages on WP8 app but I don't know how to do it.
Thank you
So there is many ways of doing it and you need to address what exactly is your best solution.
So the splash screen is the first place to start, here you can specify images that should be used upon start the app. It is also possible to introduce animations.
Your case (As far as I understand) is referring to navigation in-app. Again here I assume you use Silverlight, and not Win-RT?
For this you can create either popups or change the PhoneApplicationFrame. Popups can be displayed across pages during navigation. This however has the issue with memory leak and low performance, because of the popup implementation in WP.
I would therefore go with changing the PhoneApplicationFrame, you can follow this: Specify Popup location, throughout page navigation
Very little information about you app, but maybe this will help:How to create a custom indeterminate progress bar for Windows Phone 8

HTML5 Drag and Drop with multiple different drop targets, dropEffect, multiselect, etc

I'm currently experimenting with HTML5 Drag and Drop API. Now I've got several questions:
1.
Am I right, that it's not possible to connect draggable elements with drop-areas?
Example: You have 2 different kinds of elements you want to be able to drag and drop: Files and Text-Labels. Now if I give some div an DragOver-Handler and a Drop-Handler it will respond to both, files and text-labels. I'm looking for a simple possibility to only respond to a specific type of draggable items.
A connected problem is the dropEffect cursor-style: At the moment I enable all possible drop-targets in the DragStart-Handler and disable all of them in the DragEnd-Handler (with "disable" I mean, that I remove all DragOver- and Drop-Handlers). If I wouldn't do so, it'll look like if you could drop a file on an element that should only react to text-labels.
2.
The dropEffect cursor-style is a mess. In Firefox I don't get them at all, in Chrome it will give me a big "plus"-icon (even if I have removed the DragOver- and Drop-Handlers from an element)
3.
Last feature I am looking for is multi-select: Select multiple Text-Labels and then drag all of them at a time. Is this possible? My first idea was to create a new div and move all selected elements inside this div and then drag the newly created div. Seems pretty hackish and looks quite ugly ;-)
I hope you guys have some answers for me. Thanks!
I don't think that HTML5 drag and drop (and friends) are supposed to be replacements for commonly used "drag and drop" Javascript libraries (although it COULD be used instead of them in some cases). The name is misleading.
Modern operating systems include APIs that allow cross-application communication: clipboard and drag-and-drop. Both APIs are quite similar and need to be quite low-level because of specific challenges:
the data must be sent across processes, so it must be somehow serialized,
the sender must have a way way of offering the data in many formats (eg. text/plain and text/html) and the receiver the ability to pick one that it likes best,
the sender and receiver may live in different processes, so they can never find out about each other (they might even be entities coming from different platforms, GUI frameworks, programming languages etc.), the only channel of communication is the data itself,
Current HTML5 APIS, as opposed to - say - JQueryUI draggables - are not meant to give programmer strict control of the look and feel of the dragging process, but rather enable tight integration with the native, system-wide mechanisms. Which may or may not be what the programmer needs.
So to answer the questions:
you cannot "connect draggable elements with drop-areas", because your draggable elements can even come from outside the browser. But you can make an area that rejects certain types of data (which is what user expects from native drag and drop).
"div" and "multiselect" are not things that operating system understands (we don't have native multi-cliboards or multiple-text-selections). You CAN implement such functionality if you make a with inner divs that can be toggled (eg. by clicking while holding shift). When someone tries to drag the outer dive, make a transfer object that says which inner divs were selected (you could even create an image that shows them).
If the above solutions sound a bit low-level, well - that's because they are. When you develop a desktop game or tool, you do not rely on native drag and drop for moving pieces across the chessboard or moving sliders in the GUI. I think it will be the same with JavaScript. JQueryUI Draggables are not going anywhere.

Sencha Touch/ExtJS: Tiled scroll view (like CATiledLayer)

I'm looking for something like CATiledLayer (on iOS), but for use in PhoneGap/Sencha Touch 2.
The idea is to "stream" a very large image from a server in form of tiles - very much like Google Maps does the job.
It should support touch gestures on mobile devices so a user can pinch zoom and scroll.
Unfortunately I couldn't find something - so a few pointers are highly appreciated.
Update:
In the meanwhile I took a look at OpenLayers, which seems to what I want and manages multiple layers of zooming and such. Unfortunately it is hooked too much into Geospartial data and there is no way to disable projections to make it work like a basic image viewer.
I also found GSV (Big Ass Image Viewer) - unfortunately I doesn't support touch gestures and generally seems to be abandoned.
To me it's just weird that nobody really had the need for something like this and I try to prevent "re-inventing the wheel" as much as I can. But right now it does not look like there are any non-geodata/map related solutions.
I've never seen anything like this done using Sencha Touch 2, though I'm going to assume that putting something like this together wouldn't require much.
It would basically be your custom component (which would be scrollable). Inside that component you would insert 1 child which would be the size of your image (lets say; 15000px x 15000px) so it overflows. You would then listen to the scroll event on the parent container and when it gets to a certain x/y state, update the child item with that section of the image.
I'm not sure what the best solution for the child's HTML would be. Perhaps a bunch of divs, but I'm thinking <canvas> would be best for images.

Screen-like interface in HTML

I have some 10 odd Silverlight based components. I wanted to create a screen like interface in HTML, each screen holding some number of components and the user can easily navigate between the screens and use the components.
Can anyone suggest me some way in which I could easily implement such an interface?
Thank You.
As I understand from your question you need Navigation Framework.
With it you can have any number of pages(screens in your case) and navigate between them.
You also can do that kind of things using behavios. Very good video is avaliable at silverlight.tv : Creating Rich Interactions Using Blend 4: Transition Effects, Fluid Layout, and Layout States

Java Swing and Netbeans GUI Designer: How to remove small gaps between components when I set them invisible?

I am a newcomer to Java Swing. I am using the GUI builder of Netbeans.
I have three main panels for three different views in my application. These views can be switched by a menu on the left.
I switch these views by setting one visible and setting the other two invisible. It works but there is a little problem.
In order to achieve this, I had to put three JScrollPanes next to each other horizontally in the GUI builder. Whenever I switch to a view, the small gaps between the visible component and the invisible ones remain when the visible JScrollPane resizes itself to fill the entire window. It makes the application look quite ugly. The same thing happens when I place them vertically.
How can I fix this by using the GUI builder? I can't make changes to the code for the interface design, obviously.
Here is a very crude drawing of the problem, I hope it's clear enough: Link
Using only one JScrollPane is not an option, because they have different layout managers and will have lots and lots of components. It would not be feasible in terms of performance to render everything from the beginning when a user changes the view.
Thanks in advance,
Emre
Fixed the problem myself.
You can prevent this by right clicking to each JPanel component in Netbeans, choosing "Space Around Component..." from the popup menu and set the corresponding spaces to 0 by hand.
Updating the answer to NetBeans 8. You now right-click the component and select "Edit Layout Space" and manually enter the value 0 in the direction with you would like the spacing removed.