Giter Club home page Giter Club logo

Comments (9)

MFlisar avatar MFlisar commented on July 19, 2024

Do you use a custom theme for the activity? If so make sure you use a theme with an action bar...

Is this the issue here?

from changelog.

gonemad avatar gonemad commented on July 19, 2024

Perhaps. I have toobars but they are in the fragments and are assigned to the activity in code. A changelog dialog shouldn't require a toolbars tho (I also don't want the title to be changed regardless). Could you make that optional

from changelog.

MFlisar avatar MFlisar commented on July 19, 2024

The dialog does not require one...

The activity does not have a title element by default, so you need to add one. Either by theme (what the activity mode here assumes) or manually...

Extending this means, you must provide in the builder if the activity's theme has a toolbar or not though...

from changelog.

MFlisar avatar MFlisar commented on July 19, 2024

This release solves the issue: v1.0.2

from changelog.

gonemad avatar gonemad commented on July 19, 2024

I'm only using the dialog... Either way thanks for the fix

from changelog.

MFlisar avatar MFlisar commented on July 19, 2024

your log says ChangelogActivity.onCreate(ChangelogActivity.java:43)

If you use buildAndShowDialog a dialog will be shown, if you use buildAndStartActivity an activity will be started... Crash log can only occur with second option...

from changelog.

gonemad avatar gonemad commented on July 19, 2024

This is my code and i am as confused as you why i received multiple crash reports about an activity. I could not use buildAndShowDialog since it only accepted an activity as a parameter.. i was doing this in a nested fragment. The code is in kotlin

val builder = ChangelogBuilder().withUseBulletList(true)

val dialog = ChangelogDialogFragment.create(builder, GMThemeEngine.getInstance(context).currentTheme.isDark)
dialog.show(this.fragmentManager, ChangelogDialogFragment::class.java.name)

from changelog.

MFlisar avatar MFlisar commented on July 19, 2024

Weird. Check out this class:

https://github.com/MFlisar/changelog/blob/master/lib/src/main/java/com/michaelflisar/changelog/internal/ChangelogDialogFragment.java

It's a simple fragment (support fragment). Nothing in there can trigger anything in the activity class...

Can you reproduce this? Are you sure the above usage it the one triggering the crash or the only way you use it?

BTW

You should be able to use builder.buildAndShowDialog(this.activity, GMThemeEngine.getInstance(context).currentTheme.isDark)...

from changelog.

gonemad avatar gonemad commented on July 19, 2024

My app is a single activity with fragments so no where in my code am i creating another activity. For now i'll just assume the crash report i got came from some user who tried modifying the code? Not going to worry about it for now unless i start seeing a lot more from multiple users.

buildAndShowDialog would not work for me because of the nested fragments. The code would crash using this.activity. From what i remember of the stack trace.. it did not like using the activity's fragment manager, which is why i pass the fragment manager of the nested fragment in. I'll see if i can recreate the crash and open another issue for it

from changelog.

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.