Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have BaseCrashReportDialog extend FragmentActivity #485

Closed
str4d opened this issue Jul 16, 2016 · 3 comments
Closed

Have BaseCrashReportDialog extend FragmentActivity #485

str4d opened this issue Jul 16, 2016 · 3 comments

Comments

@str4d
Copy link
Contributor

str4d commented Jul 16, 2016

In Briar's crash report and feedback activity, we were considering using fragments to improve the crash UX for users. However, FragmentActivity has no delegate alternative (unlike AppCompatActivity, which we can replicate in our subclass of BaseCrashReportDialog using AppCompatDelegate), and because ACRA only accepts subclasses of BaseCrashReportDialog, it is currently not possible to use fragments with ACRA.

The easiest and IMHO best solution is to simply change BaseCrashReportDialog to extend FragmentActivity instead of Activity. This is a one-line change (plus import), should have zero effect on existing usages, and does not require any additional dependencies (because FragmentActivity is part of support-v4, which is already leveraged by ACRA).

@str4d
Copy link
Contributor Author

str4d commented Jul 16, 2016

Note that it is possible to do something similar by using FrameLayout and showing/hiding a series of views (like used to be commonly done before fragments were introduced), but that is messier to implement, and requires more work to handle transitions between views.

@william-ferguson-au
Copy link
Member

Happy to review a pull request.

@william-ferguson-au
Copy link
Member

Closed with merge of #488

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants