Is it possible to use the same graph for two activities with Navigation Jetpack? - android-activity

I want to migrate my app in order to use a Navigation Jetpack component.
I have a bottom navigation with 4 items.
Each item is an activity.
Could I use the same graph to share it between these activities?

Related

Creating tabs ,each with different content in flutter

I am making a blogging application using flutter. I want to create a tab bar with each tab showing different content. The number of tabs is determined by the number of different categories obtained through an API. Also the content of each tab is obtained through api.
It is silimilar to what we see in Google news application.
How to ceate such tab view? Also I want to make sure that apis for fetching the content of each tab are called only once.
You can use persistent tabbar solutions.
Cupertino tabbar provides a solution. Also you can use these packages
https://pub.dev/packages/persistent_bottom_nav_bar_v2
https://pub.dev/packages/persistent_bottom_nav_bar

flutter: best way to implement inner navigation with bottom nav bar

I'm developing a flutter application and I'm now struggling to understand what is the best way to implement a complex bottom bar navigation.
Here are my requirements:
each button on the nav bar should lead to a different section
each section should be able to have multiple screens inside of it
user can navigate from any page of a section to any page in another section and back
each section should show the last visited page if we come back to it
for example, let's say we have two sections, each made of two pages: SectionOneA, SectionOneB, SectionTwoA, SectionTwoB.
A few use cases:
user navigates from SectionOneB to SectionTwoB by pressing a button inside SectionOneB, when user presses back (on android) from SectionTwoB, we should navigate back to SectionOneB
user navigates to SectionTwoA by the nav bar, then navigates to SectionTwoB via a button in SectionTwoA, then navigates to SectionOneA via the nav bar and then press the SectionTwo icon in the nav bar again. we should show SectionTwoB. if back is pressed we should navigate to SectionTwoA.
in both these examples, when moving from one section to another, the correct nav bar item should be highlighted.
I'm new to flutter so I'm learning as I go. For now, what I've done is using nav bar with PageViewer to switch from section to section, then each section uses a PageViewer to handle switching from page to page. This worked well until I had to implement the first usecase above, at this point it seems to me that it would be quite challenging to implment a proper navigation stack as demanded by the usecase and I feel it would be better to rethink the whole thing, only I've no idea what is the best way to approach this.
A temporary solution would be to also include SectionTwoB in the PageViewer of section one, but that would not allow me to highlight the proper nav bar item.
Any lead on how to approach this? All the examples I find seems too simple and/or I'm failing at understanding how to connect the pieces together. I'm using flutter_bloc as a state management library.

Multiple stacks with a persistent navigation bar?

I am trying to build an app using flutter that has a bottom navigation bar that remains in view through sub pages. Any help?
I'm very new to flutter and coding in general. I've been able to get a working material navigation bar that highlights the current page but when I push to another route on that page, the bar disappears. This convention would work for some areas of my app, but a few pages are 3 "layers" deep and I would like to keep the bar so the user maintains a sense of place.
From what I've researched, Cupertino's navigation bar allows for this but I would prefer accomplishing this with material bottom navigation and routing.
Here's a general look at what I'm trying to accomplish (minus login/splashpage/onboard/etc.)
Prototype showing the routing of my app
Thanks to anyone who can help!

Positioning ListViews in WinJS Metro apps using scrollIntoView

I am building a jscript-based Windows 8 Metro app. The main screen of this application is a scrolling "panorama" view with several list views showing various aspects of the app's state. In some cases the user will select something on the page which results in a navigation to another page (using the WinJS.Navigation.navigate method.
When the user hits the back arrow on the other page, it returns to the main screen, and I use "scrollIntoView" on to position the screen to the section that the user was working on before the navigation occurred.
Unfortunately this hardly ever results in correctly positioning the view. It seems random. I suspect that the page isn't finished being built yet and that the scroll values are set based on the state at some snapshot in time.
Now the question:
Is there some what to be notified by WinJS ListView objects that they are completely rendered and layed out? Or is this the job of the page's ready function?
Thanks for any insight!
Putting multiple list views side by side is Not A Good Idea(TM). I would recommend putting one list view, and placing your content in a grouped data source to get the groups. If the items have different templates, then you can use a custom item Template selector to dynamically select a template.
Additionally, to ensure that the list view is scrolled to the right position, you need to use the indexOfFirstVisible to set the items the name suggests.

use two different uitab bar in application

I want to use two different uitabbar control in the application. first UITABbar control i add in the starting windows. and in this after the navigation i want to show the other tab bar with 5 tabs. can any one suggest how i do this ?
Or we need to add a different window for add this and need to show this windows on the click or other?
Please suggest.
Thanks
The Human Interface Guidelines specifically recommend against having multiple tab bars in your application:
If your application provides different
perspectives on the same set of data,
or different subtasks related to the
overall function of the application,
you might want to use a tab bar. A tab
bar appears at the bottom edge of the
screen.
A tab bar gives users the ability to switch among different modes or
views in an application, and users
should be able to access these modes
from everywhere in the application.
However, a tab bar should never be
used as a toolbar, which contains
buttons that act on elements in the
current mode (see “Toolbars” for more
information on toolbars).
If you need to have context-specific actions, use a toolbar instead.