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

Permission slide behavior #70

Closed
iffa opened this issue Jun 3, 2016 · 1 comment
Closed

Permission slide behavior #70

iffa opened this issue Jun 3, 2016 · 1 comment
Assignees
Labels
Milestone

Comments

@iffa
Copy link

iffa commented Jun 3, 2016

When granting permissions, the button does not disappear until I interact with the slide: swipe/press a button etc. If you press the button a second time (after granting the permissions already), this happens:
java.lang.NullPointerException: permission cannot be null or empty at android.content.pm.PackageManager.buildRequestPermissionsIntent(PackageManager.java:3058) at android.app.Activity.requestPermissions(Activity.java:4166) at android.support.v4.app.ActivityCompatApi23.requestPermissions(ActivityCompat23.java:32) at android.support.v4.app.ActivityCompat.requestPermissions(ActivityCompat.java:316) at com.heinrichreimersoftware.materialintro.slide.SimpleSlide$1.onClick(SimpleSlide.java:130) at android.view.View.performClick(View.java:5697) at android.widget.TextView.performClick(TextView.java:10814) at android.view.View$PerformClick.run(View.java:22526) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:158) at android.app.ActivityThread.main(ActivityThread.java:7229) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

the button could also be animated and look pretty when showing up or disappearing

@heinrichreimer
Copy link
Owner

The button normally hides and shows with a simple alpha transition when you scroll to the next slide.
The problem here is that the permission slide can only update its permissions when it's in focus. That has something to do with how an Activity attaches and detaches from a Fragment.

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

No branches or pull requests

2 participants