Create activitygroup using mvvmcross and xamarin.droid - xamarin.android

I want to create a activitygroup using mvvmcross and all its glory. But I can not find an example anywhere. With an Activity we use MvxActivity, but there is not a MvxActivityGroup.
The reason iam doing it, is because i want to have a tabbar with multiple activity groups so the tabbar is visible on all activities.
Any suggestions or links is highly appreciated
EDIT:
Stuart gives a great answer as always and I give the cudos to him, however I ended up doing it differently.
I used fragments, MvxTabsFragmentActivity and a custom presented. How to do it is shown in http://slodge.blogspot.dk/2013/06/n26-fragments-n1-days-of-mvvmcross.html
Furthermore as I understands, activitygroup is decaprecated so it is runnning out of luck anyways.

ActivityGroup is itself a custom Activity - it inherits from Activity
If you want to add data-binding to any custom Activity, then you can do this using the event source and mvx steps similar to the steps described for ActionBarActivity in: http://blog.ostebaronen.dk/2013/11/getting-support-v7-working-with.html
If you then want to introduce custom navigation then you can override the default MvvmCross presenter - see https://github.com/MvvmCross/MvvmCross/wiki/Customising-using-App-and-Setup#custom-presenters and http://slodge.blogspot.co.uk/2013/06/presenter-roundup.html

Related

How to update a list item status automatically using NSNotificationCenter?

For instance, in App Store when there's 2 different tabs of apps and some application appears in both tabs, when I click to download it in one, the app status in the other one is automatically updated. Is there a way to do so using NSNotificationCenter in iOS? Images below
So after I select the Gmail app for instance...
And then when I go back to the list of apps, its no longer asking me to obtain the app, it's already updated
How is that possible?
Based on #Grigor Hakobyan comments, I started digging into the web and maybe he is correct.
I would tell you to read this article.
https://davidnix.io/post/stop-using-nsnotificationcenter/
It's looks like the NSNotificationCenter isn't a really good option, and you can use the Delegate Pattern to this case, which looks like a better option
Have a nice day
Using NSNotificationCenter is a very bad solution, just reload your tableView(collectionView) when user select any tab and use advanced OOP principles
Assuming you're using a segmented control like in the examples you showed, you should have a function that calls whenever you select a segment. In that function you can either reload the data or the tableviews.
#IBAction func indexChanged(sender: UISegmentedControl) {
tableView.reloadData()
}

In JIRA Agile, when I click a quickfilter I want other quickfilters to be unclicked, how can I do this?

In JIRA, you can create quick filters so you can easily find your issues based on some custom filterings. For example, I have the following quick filters:
Bugs
My issues
Coworker's issues
Recently created
When I click each one of them I want all others be become deselected. How can I do this? Right now they all stay selected when I click around.
The answer is: you can't. They are just designed as a toggle buttons.
But... if you are really depressed to do that you can create JIRA plugin which will inject some JavaScript to do that for you ;)

iOS Interface Builder: Login into two separate user types

I am wanting to utilize Xcode 5's interface builder using storyboards.
Being that Xcode has been moving faster than most of the online tutorials, I have struggled to find anything remotely close to details on utilizing storyboards with Logins prior to the users profile interface. Here's a briefing on what I am working on and what I have done (with no luck)
It starts out with UINavigationViewController that acts as a "login" initial view controller. Once this initial viewController's requirements are filled, the users' input will determine which one, of the 2, interfaces they will be accessing.
Each interface (1 & 2) will be a UITabBarViewController with separate functionality (only by the user types). With this being said, the user interaction and use of one interface will be required to populate the the other user type's views.
Should I separate the login and interfaces into individual storyboards and then reconnect them programmatically with an empty ViewController that acts as a translator and connector to the type? I came up with this theory here: http://robsprogramknowledge.blogspot.com/search/label/UIStoryboard
Would setting up one large storyboard that holds all the views be the best bet?
Has anyone come across anything that helps explain how to implement these type of new interface builder "solutions"?
I have managed to separate the login storyboard from the user type interfaces, but was only successful with accessing and "logging into" one of the user types, not both, when using the recommendations from the storyboard tutorial link above.
I suggest to build your storeyboard module wise. and use followings Link1 and Link2 to merge them. It will be easy for you if multiple people are working on same project for merging purpose. Else there is a mess if multiple people working on same project with single storeyboard .
Regarding different views for multiple type user you can specify identifier to invoke view progrmatically or use seague to different view

Vaadin 7: Usage of UI vs. Navigator+Views

In Vaadin 7, a web application can have multiple entry points; the UIs. Each UI can only have a single Navigator containing Views.
We are working on an application which requires multi-level navigation, and for some screens we don't know if we should have a single UI with a navigator or multiple UIs with a shared menu component.
What are the advantages and inconveniences of UI and Navigator? Are there any guidelines about this choice?
I recommend using one UI with Navigator as in my opinion it's enough to do the job. Main inconvinience of many UIs is reload when switching between them. Also you would need to remember about desired consistency, eg. to have same header in each UI. And from my experience you would for sure encounter more problems ;-)
To make it clean you should use MVP patter. I use similar to this one with com.google.common.eventbus.EventBus to handle events. I add eventBus to my views, post events there and handle them in appropriate presenter, without implementing listeners in view which in my opinion is more problematic. As MVP already reserves 'presenter' and 'view' I call Vaadin view 'page'.
You can create header, footer main menu and then content container (eg. some Layout) to wire navigator with:
Navigator n = new Navigator(UI.getCurrent(), layout);
To manage navigation I created PagesEnum and when changing view I post ChangePageEvent which gets PageEnum.SOME_PAGE as parameter. Optionally there is also an id of item to display. So in MainPresenter I have:
#Subscribe
public void changePage(ChangePageEvent event) {
String url = event.getPageName();
if (event.hasId()) {
url += "/" + event.getEntityId();
}
navigator.navigateTo(url);
}
Then there are different possibilities:
in enter method of the page (Vaadin view) make sure that appropriate submenu is displayed.
add it as parameter to ChangePageEvent and handle it in changePage method.
hardcode it in PageEnum as new field, eg. subMenu and create other enum for submenus, chandle it in changePage method.
Submenu will be probably outside of the container that you wire Navigator with, so there you can create SubMenuPresenter and SubMenuView to handle submenu change.
the subject of your question made me sweat very much in the past 2013.
I studied, analyzed and tested various aspects of Vaadin 7 UIs and Navigator.
I looked a great number of framework, wiki and paper on the subject; related and non related to Vaadin 7.
It was some time ago (in early 2013), I'm not fresh on the subject; anyway these are some of the links I'm able to resurrect:
Vaadin MVP Lite for Vaadin 6
MVP4Vaadin - Basic Principle
Views content switching
Vaadin 7 Navigator problem - Vaadin forum
Sub-navigation - Vaadin forum
Our requirements was somewhat similar to the scenario of Vaadin MVP Lite; but we needed more abstraction and flexibility on the composition of the views.
I tried hard to use the provided Navigator but It wasn't easily customizable.
Navigator is a concrete class. UIs can have only one Navigator.
In the Navigator constructor you can find this line:
this.ui.setNavigator(this);
Navigator do a great job for most application with simple needs and provide nice functionality out of the box, but it isn't really intended for extension or customization.
Another aspect to keep in mind is that when changing view with Navigator, you change all the components on screen; you cannot change small bits.
Then I found this guide that put me on a interesting road:
Composing the User Interface, Chapter 7 - MSDN Microsoft
The article is really nice and illuminating; though it has many commonalities with the way Delphi or any other component based framework work, the 'Region' concept was really a bless.
The other chapters are really interesting too (Modular application development, and MVVP).
In the end we adopted the concept of Region with only one UI.
Briefly it works like this:
There is a GUI component that is able to host other component(s); The places where it can hosts other components are like 'holes'. Each hole is registered and it is a Region bonded to a String name (simple hasmap)
Through the Region name, one can 'put' another Vaadin component in a Region in order to make it visible.
What happens when the UI is inited is that one Region is registered (the entire UI) as the 'root' Region.
Then a component that represent the login form is hosted in the 'root' region.
If a successful login attempt is made then another component is hosted in the 'root' region (removing the login component); this very component is a host too: it registers another Region called 'main' and have a left side navigation menu too.
Now, if one want to display a component (the welcome page, for example) can retrieve the 'main' Region and put the component to display.
Vaadin Navigator implements bookmarking and back button support.
I was sad because we didn't develop it but it was not a requirement for our application.
IMHO, the Vaadin guys did a hard but good decision keeping Navigator simple; state management is not easily implemented. It would be nice for the future have a Navigator more extensible.
Anyway I think current Navigator respond to most average needs.
My answer is longer then foreseen; I hope my effort can help.

WindowsPhone not refresh/update listbox

i m writing an app where i has created an web service in local network.I m able to grab resources provided by service in android, wp7.1 and ios5.
But i faces a problem, in wp7.1 and ios5 in refreshing the list box and the uitableview controller respectively.
Actually the data source get update in both of this platform but it didn't refresh/update the view which is very important.
if any expertize knows about my problem in depth please help me out from this.if any body has sample code related to updating the view according to the web service kindly help.
i have a solution for this problem in wp7.
may be your web service call fetches the data from catch for the same service call.
try to add current time to show your web service request as new one.
like ".....?&currenttime=...."
try this.
You mention both view and controller so I'm guessing you are using some form of MVVM pattern.
For the controller to update the view a number of things must happen:
The controller must be the DataContext for the view. Most MVVM frameworks handle this plumbing for you.
The controller property that the listbox in the view is bound against must have NotifyPropertyChanged called or must be an ObservableCollection.

Resources