Xamarin.Android create back button in toolbar with text of previous view - android

So I want to create a back button on every View I open in my Xamarin Android app. To explain better here is the screenshots, that will help me explain my problem:
Lets assume this is my first view when I open app:
When I click three dots popup menu opens. And for example I select Profile item.
Then this view opens:
Now as you can see at the top I have back button, but the text near the button is hardcoded... How can I make it show me previous view name? In this case it should be "List".
Moreover, I don't know how to implement back button to get back, and I was looking for any kind of tutorial or example, but couldn't find any... could someone please help me?
UPDATE 1
I am using MvvmCross in my application there are some places where I navigate between activities and some places where I navigate between fragments, I thinking about unifying everything and make navigation only between fragments...
For now I didn't made any implementation of back button, I need some help with that

Related

How do I make a slide up fragment for share button?

Can anyone suggest me from where should I start to make a slide up animation of fragment when user clicks on share button? Fragment will contain screenshot of the current view and the app where we can share. Here's a example from ixigo app after clicking on share button.
After Click on share button
Sliding up to the top
Suggest some topics, sample of code or libraries which can help me create something like this.

Prism Navigation in Xamarin Forms - MasterDetailPage

I have a master detail page setup using Prism 6.3 pre-2, I've finally got it working as I expected for navigating to "detail" pages; so the hamburger button shows the slide drawer and I have a simple ListView bound to the ViewModel, I list some items, and I use the NavigateCommand to navigate correctly.
Now, the expected behaviour (in Android), is when you've navigated to other items in the slide-out menu, you should be able to use the hardware back button to navigate back to the very first "detail" page shown.
For example, say your app has this setup, and the items listed are Inbox, Drafts, and Sent. The default view is going to be whatever you decide is the default detail view, in this example, it will most likely be Inbox. So if I navigate to Sent, and then press back, it should go back to Inbox, also, if I go to Sent -> Drafts, and then press back, it should go back to Inbox, as this is the default starting point, if you then press back again, the app should exit. At the moment, using Prism navigation, no matter what page you navigate to using this setup, it will exit straight away.
Please note, I have set it up correctly, I essentially have something like this (as an exmaple):
await NavigationService.NavigateAsync("RootPage/BaseNavigationPage/InboxPage");
When I navigate to say another page like Sent, the relative URI is like so:
"BaseNavigationPage/SentPage"
Now, when back is pressed, it should go back to the InboxPage, I'm not sure how this can be fixed... Brain...???
In addition to this, there is one other unexpected behaviour that is missing.
If I want to show a modal page whilst using a Master Detail Page, it doesn't work as any app written by Google does... This is easy to see if you open any google app that has this layout. If you show a modal window for say Settings, it pops up, has the navigation title set and a back arrow, basically looks exactly the same as if you've navigated one step further down like:
"RootPage/BaseNavigationPage/InboxPage/EmailPage"
However, I expected this functionality to be available if I did the following:
"BaseNavigationPage/SettingsPage", useModalNavigation:true
If you simply play around with any Google made application you'll see these features, and these are what I expect and they feel natural.
Any help available to achieve this...? again...Brian...?
All of this should be simple, but it's proving not to be...
To get the behavior you are wanting with the NavigationPage in a MasterDetailPage scenario, you must create a custom NavigationPage that implements INavigationPageOptions and set the ClearNavigationStackOnNavigation property to false. This will kep the NavigationPage's navigation stack in place with each navigation operation.
As to your other "expected behavior" regarding modal navigation, your understandings about modal navigation are wrong. Modal navigation does not provide a software back button. Any time you want a software back button you must have the pages wrapped in a NavigationPage,

Android navigation system/bar square button

I do not find on Internet, what is the name of this button ?
And I want to know what is the exact action when an application is deleted like this :
With this action, the application is not really stopped
The Third Image means Square is called Overview button(Recent Button). When Click on That Button the list of application is display which you are work on it. and you can simply remove app from the list by slide app Right to Left.
For more detail visit this : https://android.stackexchange.com/questions/32697/what-is-the-offical-name-of-the-third-on-screen-button

Develop animated button in android

Please refer the attached picture when user click on GO button all the other button comes under the GO button and when user again clicks the GO button all the buttons get distributed. I want to make same button and animation. I searched a lot but not got anything relevant, Kindly help.
There is a satellite menu library, with this you can acheive as you want. In this you need to handle the position of it.

Navigation Drawer "Up" button when in deeper sections

I want to transform the upper left button that normally allows to open the Navigation Drawer to become a "Up" button (with the left arrow).
I looked everywhere but I couldn't find even a question where this problem is answered in a quick way.
Details:
I have a single Activity. The NavigationDrawer contains a list of elements. Let's call them Element1 and so on.
When I open the application I can see a "Home" Fragment that contains a sort of splash screen with some basic details of my application.
If I open the Drawer and select Element4 I switch the "Home" Fragment with the "Element4" Fragment. The icon at the top left should become the classic "Up" icon as intended in the Google developer site and allow me, touching it, to come back to the "Home" Fragment.
A simple example could be the NavigationDrawer application mockup created by Eclipse in its wizard. I want to modify it to make the 0 section the home section and if the 1 section its child.
Maybe if someone that knows how to do answer me it'll be a big help not only for me but for many other people.
Thanks

Categories

Resources