-
Notifications
You must be signed in to change notification settings - Fork 34
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
Dialog Screenshot #221
Dialog Screenshot #221
Conversation
import org.rm3l.maoni.sample.R | ||
import org.rm3l.maoni.sample.utils.MaoniUtils | ||
|
||
class MaoniBottomSheetDialogFragment : BottomSheetDialogFragment() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added custom BottomSheetDialogFragment
to test in sample app
import org.rm3l.maoni.sample.extensions.getMaoniFeedbackBuilder | ||
import org.rm3l.maoni.sample.extensions.getMaoniFeedbackHandler | ||
|
||
object MaoniUtils { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactored setup code into a MaoniUtils
class
* @param dialog the caller dialog | ||
*/ | ||
public void start(@Nullable Dialog dialog) { | ||
Activity activity = ContextUtils.scanForActivity(dialog.getContext()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added scanForActivity
in case the Dialog
context isn't an activity (i.e. ContextThemeWrapper
)
@@ -53,8 +55,17 @@ public static Object getBuildConfigValue(@NonNull final Context context, | |||
.getField(fieldName) | |||
.get(null); | |||
} catch (final Exception e) { | |||
//No worries | |||
e.printStackTrace(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed printStackTrace
since it leads to some unnecessary noise for apps that integrate with Maoni
@rm3l Not sure why CI build is failing, any ideas?
|
@dennisdeng2002 Thanks for this PR, which adds a nice and useful feature 👍🏿 As per the CI, yesterday, I had few other PRs not passing, but still couldn't figure out why. Re-running the corresponding Workflows fixed the issue. |
Looks like the CI issue still persists. |
f3593e7
to
9990908
Compare
Yeah was thinking it might be fork related, let me rebase and see |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dennisdeng2002 Looks good to me! Thanks again for this PR. I'll merge it as soon as possible.
Add the ability to pass a
Dialog
toMaoni.start()
, which will take a screenshot of theDialog
window. I useBottomSheetDialogFragment
pretty extensively for one of my apps, and it'd be nice if a user could capture feedback for theDialog
window as opposed to just the underlyingActivity