Giter VIP home page Giter VIP logo

alligator's People

Contributors

aartikov avatar akhbulatov avatar jamal-wia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alligator's Issues

Can an Instagram Like navigation be done with this Library

I tested the advanceSwitcher sample and noticed that when the stacks for a tab are emptied, it closes the app, while other stacks are still on other stab.

Question 1. Can i make just one entry point to the app - (this way all stacks can end inn this tab)
Question 2. Can all stacks be emptied before closing the App

Handle result if activity is destroyed

Hi,

Would this lib allow a result to be passed across multiple activities like :
A need result D produce result But B is destroyed by android
A -> B (destroyed) -> C -> D

AndroidX

Hi, Artur!
Do you plan to migrate the lib to use AndroidX?

CurrentScreen

Is there possibility to know what current screen is now?

It makes sense to have a method returning the current screen (and maybe the activity/fragment) on AndroidNavigator?

It can be useful for example for knowing which screen is being displayed when receiving a notification, to know if you must resume that activity in case is already on the stack or if you need to recreate that screen.

And another question, there are plans to implement some sort of navigation stack using screens? Like the one you can create on a notification using intents, to preserve the navigation stack when navigating to a hierarchically deep screen.

"Race condition" when using switchTo()

I have activity A that is calling switchTo() to load a fragment, but the command is queued because I have a LockActivity that shows a pin lock screen when "onStart()" is called from any Activity.
That makes the switchTo() command to wait in the queue because the navigation to the lock activity is being executed. Then when the navigation context is set on that lock activity the switchTo command is executed, but on that activity I don't have a ScreenSwitcher set because I don't need to load any fragment there. That throws a NavigationException.

I propose to give access to the command queue to be able to manage that weird cases, but maybe there's a more elegant or more robust solution for that.

EDIT: I added a flag on the command interface meaning if the command can be discarded if no screen switcher is present, by default is always false, I'll make a pull request if you want to accept it.

Cannot generate Class

screen shot 2018-10-31 at 7 10 42 pm

Please assist me as the expected generated class is not generating. I have annnotated all the fragments and activities with The @Register annotation :(
@aartikov Thanks

Pop fragments/screens if

What would be the best approach to solve case as described below:

I have fragments/screens [A, B, C, D] in backstack. D is currently active.

Given, that I don't know what fragments are currently in backstack I want to navigate to E, but also remove from backstack D, C, B if they are there.
So that end result would be [A, E]

Intention is that user shouldn't see some flow that is no longer relevant to him. And so, that he wouldn't be able to navigate to it via goBack()

I imagine something that. Does it make sense?

fun goToScreenE() {
  [`D`, `C`, `B`].each { screen ->
     if (getCurrentTopScreen()  is screen) {
       navigator.goBack()
     }
  }
  
  navigator.goForward(E())
}

fun getCurrentTopScreen() {
   ???
}

Nested fragment ScreenSwitcher

Is it possible to implement nested FragmentScreenSwitcher?
One of my fragments(let's call it HostFragment) has a bottom navigation implemented, and I want to use switchTo to switch betweed child fragments of HostFragment.
Furthermore, I have AnotherHostFragment with different set of fragments.
I want to solve this problem without additional activities, in a single activity app setup.

Thank you in advance

screenResolver.getScreen() returns null

Hi ๐Ÿ‘‹,

Thank you for this great lib!

I have a problem when I try to get a the current activity Screen in the onCreate() of it. The screenResolver returns a null for the .getScreen() call curiously.

I have registered my Activity and it's corresponding Screen in the NavigationFactory.

Here is my Activity and Screen declaration :

class LoginActivity : BaseActivity() {
...
data class Screen(
        val myString: String? = null
    ): me.aartikov.alligator.Screen, Serializable
}
override fun onCreate(savedInstanceState: Bundle?) {
     screenResolver.getScreen(this) //returns null
}

Note that because I haven't migrate my app to AndroidX, I am currently on the version 2.2.0. That's why the #16 issue didn't help me a lot for the moment.

Have you any suggestion for me ?

Thank you in advance ๐Ÿ‘

Question: How to get the activity result from a fragment?

I've been searching how to get the activity result from a Fragment on the docs and on the examples but I cannot find how to do it. I've successfully retrieved the activity result from an activity, but I don't see the way to get it directly from a fragment.

Is possible to get the result from a fragment instead of its parent activity? Can you give me some hints to do it?

Thanks.

Kotlin

Do you have plans to migrate this project to Kotlin?

Help Needed

Can you explain this Part of the code
Fragment fragment = mScreenSwitcher.getCurrentFragment(); if (fragment != null && fragment instanceof ContainerIdProvider) { builder.containerId(((ContainerIdProvider) fragment).getContainerId()) .fragmentManager(fragment.getChildFragmentManager()); // Use child fragment manager for nested navigation }

I am trying to play with nested screens but cannot get them to work when i press the back button

Fragments and ViewPager

Is there a way to use switchTo() or other command on a fragment view pager?
Or a way to imitate the ViewPager behavior using animations without losing the swipe functionality?

Navigation tree

Artur, thanks for your library! I'm happy to use it since ver.1.0.
May be you'd met with this case and know how to solve it.
For example application have complex screens structure.
A -> B -> ะก
|
v
D -> E
Current activity is C. Then application gets push-notification, user tap on it and application should open activity E. I.e. it goes from C to E. BUT when user tap on back from current activity (now it is E) it should go to D, and on next back - to A. Is it possible to solve the issue with your lib?

Integration with AAC Navigator

Hi, as part of the new JetPack along with android architecture components Google released a navigation component (https://developer.android.com/topic/libraries/architecture/navigation/). While the java part seems quite close to what Alligator does, there is a XML/UI integration with features like deep links. (I don't care much about the XML thing but the way it's allow you to build flows with deep links is convenient)

So I'm wondering :

  • is there is something to do to make this new component works great with alligator ?
  • will you maintain alligator while google will push people to its navigator ?

Translucent activity not finished with result

Hi, I have android:windowIsTranslucent activity which should return result, but it happens only if rotate screen after call FinishWithResult.

Example.1

Open ForegroundActivity from BackgroundActivity
unbind BackgroundActivity
bind ForegroundActivity
Call FinishWithResult in ForegroundActivity
unbind ForegroundActivity
bind BackgroundActivity
Now we stay in the BackgroundActivity

Example.2

Open ForegroundActivity from BackgroundActivity
unbind BackgroundActivity
bind ForegroundActivity
Rotate 1
unbind ForegroundActivity
bind ForegroundActivity
bind BackgroundActivity
unbind BackgroundActivity
Call FinishWithResult, bat nothing happens. We stay at ForegroundActivity, but need BackgroundActivity
Rotate 2
unbind ForegroundActivity
bind ForegroundActivity
bind BackgroundActivity
unbind BackgroundActivity
unbind ForegroundActivity
bind BackgroundActivity
Now we stay in the BackgroundActivity

I think lifecycle for BackgroundActivity if we use android:windowIsTranslucent is not typical:
https://tech.pic-collage.com/something-about-android-windowistranslucent-641cc02ff66f

I have the same problem when test sample app from this repository. Is library knows about it ?

Fragment BackStack Handling

Hello, Im trying to understand how can I achieve the fragment backstack handling. Im running the sample advancedscreenswitchersample but when I go though fragments and touch on back button it closes the app.

Im running on Nexus 5x - Android 8.1.0

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.