GithubHelp home page GithubHelp logo

Comments (9)

pandulapeter avatar pandulapeter commented on May 27, 2024 2

@rahulsainani I've just released a new version for you: 1.9.0 adds an optional parameter to the imprint() method called excludedActivities which you can use to specify the classes where you don't want to use Beagle. You can use it like this:

Beagle.imprint( application = this, excludedActivities = listOf(LoginActivity::class.java, AnotherActivity::class.java) )

In the future I might deprecate this API and move to a callback-based solution like you suggested, but right now that would require more effort, hopefully this temporary fix is okay for the time being.

from beagle.

fabiocarballo avatar fabiocarballo commented on May 27, 2024 1

thanks!

from beagle.

rahulsainani avatar rahulsainani commented on May 27, 2024 1

Working as Intended, thanks again! 👍

from beagle.

pandulapeter avatar pandulapeter commented on May 27, 2024

Hi!

Thanks for reporting the issue, I wasn't aware of this. The screens where you need the keyboard to appear are Activities or Fragments?

To be honest I had some bad experiences with the soft keyboard's automatic opening on different devices so to be sure, I always manually call for showing / hiding it. post()-ing something like this:

fun showKeyboard(focusedView: View?) = focusedView?.also { it.requestFocus() (it.context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager).showSoftInput(it, 0) }

...might be the most certain way to make sure that the keyboard appears. Anyway, I'll need to look into it, the way Beagle is added to the View hierarchy in the Activity's onCreate() can definitely mess up things.

Thanks again, I'll let you know if I find something!

from beagle.

fabiocarballo avatar fabiocarballo commented on May 27, 2024

The both cases I noticed are Activities hosting Fragments! We are also trying to force the showing of the keyboard. I will check if it is exactly in that way you suggested and if it alleviates the problem. Thanks!

from beagle.

rahulsainani avatar rahulsainani commented on May 27, 2024

Would it be possible to exclude some activities so the drawer is not added on them? Perhaps with lifecycleCallbacks?

from beagle.

pandulapeter avatar pandulapeter commented on May 27, 2024

@fabiocarballo I definitely managed to reproduce the keyboard issue you mentioned. I usually test with single-Activity apps so that's the reason why I didn't notice...

As I don't see at the moment how I could fix this from the library, I have two suggestions for you:

  1. Keep in mind that the beagle-noop dependency that you should be using in release builds does absolutely nothing so the issue should not be affecting end-users: leave it as it is.
  2. Use the hacky workaround I suggested before in a postDelayed() call. It seems to be working, you can check it out here.

from beagle.

rahulsainani avatar rahulsainani commented on May 27, 2024

Thank you so much for the quick reply and feature! Will try now and update here.

from beagle.

pandulapeter avatar pandulapeter commented on May 27, 2024

v2 uses a completely different way to inject itself into the app (instead of re-organizing the original view hierarchy it just adds a Fragment on top of the layout). Hopefully this less hacky solution no longer interferes with focus handling, but if it does, problems can be solved on a per-case basis (and surely won't affect release builds at all).

from beagle.

Related Issues (20)

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.