I've bound my list view to an observable collection but I want the last item in the list to be an 'add item' button. I could do this in 'normal' Android with a custom adapter but I'm not sure how to do it with MvvmCross.
You should do this natively the same way you would on Android. I would suggest you use the ListView#addFooterView() to add a View at the bottom of the ListView.
See this question.
There are other suggestions on there such as what you would do to have a fixed button that is always visible on the bottom of the screen.
Related
What is the maximum number of view controllers in UITabBarController for tvOS? It's not documented on developer.apple.com.
The screen is obviously bigger than iOS devices. I know for iOS it will add a "More" button if the number is bigger than 5.
The More Navigation Controller The tab bar has limited space for
displaying your custom items. If you add six or more custom view
controllers to a tab bar controller, the tab bar controller displays
only the first four items plus the standard More item on the tab bar.
Tapping the More item brings up a standard interface for selecting the
remaining items. The interface for the standard More item includes an
Edit button that allows the user to reconfigure the tab bar. By
default, the user is allowed to rearrange all items on the tab bar. If
you do not want the user to modify some items, though, you can remove
the appropriate view controllers from the array in the
customizableViewControllers property.
Note
Tab bar customization and
the More interface is not available in tvOS
Differences in tvOS
Tab bar controllers serve the same purpose in tvOS as in iOS, but
provide slightly different user interface features: The tab bar
interface appears at the top of the window. When focus leaves the tab
bar, the tab bar is hidden. Swiping up on the remote shows the tab bar
again and focuses it. A user can also show and focus the tab bar by
pressing the Menu button. Swiping down from the tab bar moves focus
into the content view; specifically, to the first focusable view that
is visually below the selected tab. Swiping down behaves like a normal
focus-changing gesture—that is, focus moves in the direction the user
swiped. If nothing is focusable immediately below the selected tab,
the closest focusable view is focused instead. Pressing the Select
button while a tab is focused moves focus into the content view.
Because there is no direction associated with this change, focus moves
to the view specified in the content view's preferredFocusedView
property. Tab bar controllers in tvOS do not support customization. A
tab bar controller displays only the number of view controllers from
its viewControllers array that fit on the screen, and does not provide
the More interface seen in iOS.
I found it by adding ViewControllers in StoryBoard. No matter how smaller your buttons are, the answer is 7. It will hide if it's more than 7 ViewController. And no "More" button of course. I added an 8 view controller but it only shows 7 (seven).
The answer is 7
Great, right?!
Solution
Sadly, I wrote my own TabBarController :(
Which is not a subclass of UITabBarController but UIViewController. Hoping Apple will change this (they'll not.). Should be depending on the size of the buttons, and could auto calculate each specific case.
Best.
I'm developing with Ionic Framework an app where the main view is a map (working with Leaflet). And in the side menu, there are some forms in order to allow differente searches on the map (shortest path between 2 points...).
The thing is, every time I click in one of the inputs (text, checkbox...) of the forms, the side menu closes.
Is there anyway to avoid that? It is possible that the side menu only closes and shows when I tap in the 'burguer' button?
It's as simple as remove the 'close-menu' class from all the 'ion-item' elements inside the ion-side-menu
I am developing app in Flash builder 4.6 as Flex Mobile project.
I have 4 different views being shown inside ViewNavigatorApplication. One of the views need to have tabbed menu bar at the bottom of the screen. That tabbar needs to control sorting method of list element. I could use custom made tabbar but I really want the same look and feel as the one that comes with TabbedViewNavigator. What are my options for doing such tabbar?
Should I use TabbedViewNavigator as application container and start showing/hiding the tabbar as necessary for every view (then I must overwrite the tab buttons handler so that it wont change the view but do the sorting instead) or is there a way to extract the tabbar from TabbedViewNavigator and simply add it to one of the views?
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.
In my metro style app (windows 8) I have created an page overlay and a flyout displaying an message. When the user clicks on the page the flyout message goes to hidden. But I want flyout to remain even when the user clicks on the overlay page. I am using HTML5 and WinJS.
Is there anyway I can achieve the above scenario using someother control or can I prevent the page to stop reacting to events when the user taps/clicks on the screen.
This is not really supported -- the Flyout itself doesn't have the concept of being persistent/sticky/modal. If you look at the code in base.js, you'll see that it doesn't expose any code to leverage the inbuilt sticky behavior that is used in the appbar (which is kinda of flyout, it turns out.
There are a couple things you can do:
Pass "_sticky: true" to the constructor of the flyout. e.g <div data-win-control="WinJS.UI.Flyout" data-win-options="{ _sticky: true}">
Attach a click handler to the top of the document, and if it's on the click eating div that the flyout creates, cancel the event
Create your own UI by simply adding a new div to the body, and absolute positioning it.