Coder Social home page Coder Social logo

slidr's Introduction

Hello, I'm Drew 👋🏻 🧑🏻‍💻

I'm currently a Staff Software Engineer @ reddit working to improve their Android app. I am passionate about building high quality Android and mobile applications as well as contributing to the world of open-source.

Some of my favorite topics in Android right now are:

  • Compose (Ui/Compiler/UiState)
  • Kotlin Multiplaform
  • Dependency Injection
  • Anvil

Here are a few of my projects

DeckBox

DeckBox is an unofficial deck building app for creating and managing your Pokémon TCG decklists. Whether you are building and tweaking the top decks in the meta or just experimenting with some spicy rogue decks, search through a large collection of Pokémon cards that span from the latest expansion all the way back to the base set.


Chipper

Archived Chipper is a keygen jukebox with over 1400 chiptunes sourced from key generators to play from.


See more of my work below   ⬇️

slidr's People

Contributors

aditya94a avatar ardacebi avatar davideas avatar gglabcenter avatar mfarid avatar r0adkll avatar waffle-iron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

slidr's Issues

Only left swipe

Hi,
I sent an email to you with details. Btw, shortly this is:
if I try to scroll up/down the activity with my finger, the library intercepts the few deltax I do with that action and starts moving the screen. The correct behavior should be that if I set: LEFT, only if I swipe exactly from left it works, and not also if I do diagonals motions. Please fix this problem, and thanks for the beautiful library. Another improvement should the possibility to use the library not only with activities but with fragments. Best regards

Problem with ViewPager

In my Activity, I use ViewPager and Slidr can not intercept ViewPager. Please fix it!

Change status bar color dynamically

Hello, thank you for the great library, I've the necessity to change the status bar color dynamically but this has an impact on your library as well since the status bar is set at the beginning when calling attach() and we cannot change it.
I'm using a ViewPager with fragments that dynamically regenerate the color of the status bar using Palette library based on the image displayed in each fragment, so this new color should be reflected in Slidr library as well.

I've tried to reattach when new color is regenerated, but it has weird behaviour... better to not explain.
I've seen the replace() function but how to use it? we should pass a new ViewGroup, what it should be?

Probably it's much better to update the primary/secondary color of the status bar instead of recreating everything. (Maybe these 2 colors could be static property in Slidr class so we can call set() everywhere, what do you think?).
If you agree I can do that change, but also put in common some code that now is repeated in many functions.

Only fullscreen activities can request orientation

when <item name="android:windowIsTranslucent">true</item> is set, app crashes on setOrientation method in activity.

java.lang.RuntimeException: Unable to start activity ComponentInfo{}: java.lang.IllegalStateException: Only fullscreen activities can request orientation
FATAL EXCEPTION: ControllerMessenger
Process: com.team_wye.gurunews, PID: 9834
java.lang.RuntimeException: Unable to start activity ComponentInfo{}: java.lang.IllegalStateException: Only fullscreen activities can request orientation
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2817)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
	at android.app.ActivityThread.-wrap11(Unknown Source:0)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
	at android.os.Handler.dispatchMessage(Handler.java:105)
	at android.support.test.espresso.base.Interrogator.loopAndInterrogate(Interrogator.java:148)
	at android.support.test.espresso.base.UiControllerImpl.loopUntil(UiControllerImpl.java:466)
	at android.support.test.espresso.base.UiControllerImpl.loopUntil(UiControllerImpl.java:420)
	at android.support.test.espresso.base.UiControllerImpl.injectMotionEvent(UiControllerImpl.java:234)
	at android.support.test.espresso.action.MotionEvents.sendUp(MotionEvents.java:140)
	at android.support.test.espresso.action.MotionEvents.sendUp(MotionEvents.java:123)
	at android.support.test.espresso.action.Tap.sendSingleTap(Tap.java:170)
	at android.support.test.espresso.action.Tap.access$100(Tap.java:31)
	at android.support.test.espresso.action.Tap$1.sendTap(Tap.java:46)
	at android.support.test.espresso.action.GeneralClickAction.perform(GeneralClickAction.java:136)
	at android.support.test.espresso.ViewInteraction$SingleExecutionViewAction.perform(ViewInteraction.java:355)
	at android.support.test.espresso.ViewInteraction.doPerform(ViewInteraction.java:242)
	at android.support.test.espresso.ViewInteraction.access$100(ViewInteraction.java:62)
	at android.support.test.espresso.ViewInteraction$1.call(ViewInteraction.java:149)
	at android.support.test.espresso.ViewInteraction$1.call(ViewInteraction.java:146)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at android.os.Handler.handleCallback(Handler.java:769)
	at android.os.Handler.dispatchMessage(Handler.java:98)
	at android.os.Looper.loop(Looper.java:164)
	at android.app.ActivityThread.main(ActivityThread.java:6541)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.IllegalStateException: Only fullscreen activities can request orientation
	at android.os.Parcel.readException(Parcel.java:1956)
	at android.os.Parcel.readException(Parcel.java:1894)
	at android.app.IActivityManager$Stub$Proxy.setRequestedOrientation(IActivityManager.java:5675)
	at android.app.Activity.setRequestedOrientation(Activity.java:5738)
	at com.team_wye.gurunews.activity.a.b(BaseActivity.kt:52)
	at com.team_wye.gurunews.activity.a.onCreate(BaseActivity.kt:30)
	at com.team_wye.gurunews.activity.NewsActivity.onCreate(NewsActivity.kt:49)
	at android.app.Activity.performCreate(Activity.java:6982)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213)
	at android.support.test.runner.MonitoringInstrumentation.callActivityOnCreate(MonitoringInstrumentation.java:667)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770)
	... 27 more

Related SO post here.

But if I want to publish this app to Google Play Store, I must update the target api level to the latest version, 27 for now. How to fix this?

application stop/cress

04-18 11:31:24.799 5271-5271/? E/cutils-trace: Error opening trace file: No such file or directory (2)
04-18 11:31:24.835 7136-7136/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:31:24.841 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:31:24.843 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:31:24.843 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:31:24.843 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:31:24.845 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:31:24.872 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:31:25.016 5271-5271/? E/memtrack: Couldn't load memtrack module (No such file or directory)
04-18 11:31:25.016 5271-5271/? E/android.os.Debug: failed to load memtrack module: -2
04-18 11:31:27.250 5300-5300/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.r0adkll.slidr.example, PID: 5300
java.lang.NoClassDefFoundError: org.jacoco.agent.rt.internal_773e439.Offline
at com.r0adkll.slidr.model.SlidrPosition.$jacocoInit(SlidrPosition.java)
at com.r0adkll.slidr.model.SlidrPosition.(SlidrPosition.java)
at com.r0adkll.slidr.example.ViewerActivity.onCreate(ViewerActivity.java:64)
at android.app.Activity.performCreate(Activity.java:5264)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1088)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2302)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5292)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
at dalvik.system.NativeStart.main(Native Method)
04-18 11:31:27.744 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:31:27.744 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:31:28.202 932-4876/? E/TelephonyProvider: iTelephony is null!!!
04-18 11:31:28.202 932-4876/? E/TelephonyProvider: iTelephony is null!!!
04-18 11:31:34.493 5367-5367/com.r0adkll.slidr.example E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.r0adkll.slidr.example, PID: 5367
java.lang.NoClassDefFoundError: org.jacoco.agent.rt.internal_773e439.Offline
at com.r0adkll.slidr.model.SlidrPosition.$jacocoInit(SlidrPosition.java)
at com.r0adkll.slidr.model.SlidrPosition.(SlidrPosition.java)
at com.r0adkll.slidr.example.ViewerActivity.onCreate(ViewerActivity.java:64)
at android.app.Activity.performCreate(Activity.java:5264)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1088)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2302)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5292)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
at dalvik.system.NativeStart.main(Native Method)
04-18 11:31:35.441 932-1163/? E/TelephonyProvider: iTelephony is null!!!
04-18 11:31:35.441 932-1163/? E/TelephonyProvider: iTelephony is null!!!
04-18 11:31:39.912 7136-7136/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:31:39.922 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:31:39.924 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:31:39.924 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:31:39.924 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:31:39.928 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:31:39.972 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:31:54.876 7136-7136/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:31:54.882 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:31:54.886 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:31:54.891 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:31:54.891 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:31:54.891 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:31:54.914 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:32:02.275 654-672/? E/CellLocation: create GsmCellLocation
04-18 11:32:02.277 897-18337/? E/CellLocation: create GsmCellLocation
04-18 11:32:02.280 897-1175/? E/CellLocation: create GsmCellLocation
04-18 11:32:02.295 654-654/? E/CellLocation: create GsmCellLocation
04-18 11:32:02.299 897-1175/? E/CellLocation: create GsmCellLocation
04-18 11:32:09.137 654-8466/? E/CellLocation: create GsmCellLocation
04-18 11:32:09.147 654-654/? E/CellLocation: create GsmCellLocation
04-18 11:32:09.882 7136-7136/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:32:09.892 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:32:09.894 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:32:09.896 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:32:09.899 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:32:09.900 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:32:09.922 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:32:24.985 7136-7136/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:32:24.992 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:32:24.994 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:32:24.995 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:32:24.999 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:32:24.999 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:32:25.021 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:32:26.513 5443-5443/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.r0adkll.slidr.example, PID: 5443
java.lang.NoClassDefFoundError: org.jacoco.agent.rt.internal_773e439.Offline
at com.r0adkll.slidr.model.SlidrPosition.$jacocoInit(SlidrPosition.java)
at com.r0adkll.slidr.model.SlidrPosition.(SlidrPosition.java)
at com.r0adkll.slidr.example.ViewerActivity.onCreate(ViewerActivity.java:64)
at android.app.Activity.performCreate(Activity.java:5264)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1088)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2302)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5292)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
at dalvik.system.NativeStart.main(Native Method)
04-18 11:32:30.517 654-664/? E/CellLocation: create GsmCellLocation
04-18 11:32:30.518 897-13216/? E/CellLocation: create GsmCellLocation
04-18 11:32:30.523 897-1175/? E/CellLocation: create GsmCellLocation
04-18 11:32:30.539 654-654/? E/CellLocation: create GsmCellLocation
04-18 11:32:30.543 897-1175/? E/CellLocation: create GsmCellLocation
04-18 11:32:39.891 7136-7136/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:32:39.897 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:32:39.900 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:32:39.901 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:32:39.904 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:32:39.904 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:32:39.924 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:32:53.138 654-8466/? E/CellLocation: create GsmCellLocation
04-18 11:32:53.146 897-915/? E/CellLocation: create GsmCellLocation
04-18 11:32:53.149 654-654/? E/CellLocation: create GsmCellLocation
04-18 11:32:53.152 897-1175/? E/CellLocation: create GsmCellLocation
04-18 11:32:53.169 897-1175/? E/CellLocation: create GsmCellLocation
04-18 11:32:54.887 7136-7136/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:32:54.894 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:32:54.894 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:32:54.894 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:32:54.895 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:32:54.898 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:32:54.920 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:32:59.091 7136-5487/? E/NativeCrypto: ssl=0x63df5748 cert_verify_callback x509_store_ctx=0x624d0938 arg=0x0
04-18 11:32:59.091 7136-5487/? E/NativeCrypto: ssl=0x63df5748 cert_verify_callback calling verifyCertificateChain authMethod=ECDHE_RSA
04-18 11:33:09.903 7136-7136/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:33:09.909 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:33:09.912 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:33:09.915 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:33:09.916 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:33:09.916 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:33:09.937 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:33:21.387 654-665/? E/CellLocation: create GsmCellLocation
04-18 11:33:21.399 897-1120/? E/CellLocation: create GsmCellLocation
04-18 11:33:21.404 654-654/? E/CellLocation: create GsmCellLocation
04-18 11:33:21.409 897-1175/? E/CellLocation: create GsmCellLocation
04-18 11:33:21.432 897-1175/? E/CellLocation: create GsmCellLocation
04-18 11:33:24.897 7136-7136/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:33:24.903 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:33:24.906 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:33:24.909 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:33:24.910 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:33:24.910 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:33:24.931 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:33:39.898 7136-7136/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:33:39.905 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:33:39.907 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:33:39.908 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:33:39.909 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:33:39.912 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:33:39.932 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:33:54.900 7136-7136/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:33:54.906 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:33:54.909 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:33:54.912 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:33:54.912 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:33:54.913 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:33:54.934 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:34:07.788 654-664/? E/CellLocation: create GsmCellLocation
04-18 11:34:07.804 654-654/? E/CellLocation: create GsmCellLocation
04-18 11:34:09.903 7136-7136/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:34:09.908 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:34:09.909 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:34:09.909 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:34:09.909 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:34:09.911 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:34:09.931 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:34:24.958 7136-7136/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:34:24.968 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:34:24.972 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:34:24.975 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:34:24.975 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:34:24.975 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:34:25.018 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:34:36.237 932-4877/? E/TelephonyProvider: iTelephony is null!!!
04-18 11:34:36.237 932-4877/? E/TelephonyProvider: iTelephony is null!!!
04-18 11:34:36.270 654-672/? E/CellLocation: create GsmCellLocation
04-18 11:34:36.276 932-7043/? E/TelephonyProvider: iTelephony is null!!!
04-18 11:34:36.277 932-7043/? E/TelephonyProvider: iTelephony is null!!!
04-18 11:34:36.306 654-654/? E/CellLocation: create GsmCellLocation
04-18 11:34:36.334 3200-3200/? E/ActivityThread: Failed to find provider info for com.android.tinno.theme.Provider
04-18 11:34:36.430 3200-3200/? E/ActivityThread: Failed to find provider info for com.android.tinno.theme.Provider
04-18 11:34:40.033 7136-7136/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:34:40.038 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:34:40.039 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:34:40.039 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:34:40.040 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:34:40.041 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:34:40.061 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:34:55.013 7136-7136/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:34:55.019 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:34:55.022 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:34:55.023 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:34:55.024 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)
04-18 11:34:55.027 654-654/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search
04-18 11:34:55.048 732-732/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /: open failed: EISDIR (Is a directory)

Previous activity doesn't show

screenshot_20160501-171728

Java code:
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_client_detail);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setHomeButtonEnabled(true);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
SlidrConfig config = new SlidrConfig.Builder()
.scrimEndAlpha(0f)
.scrimStartAlpha(0.5f)
.build();
Slidr.attach(this, config);
}

Theme:

<style name="AppTheme.Slidr" parent="@style/AppTheme"> <item name="android:windowIsTranslucent">true</item> <item name="android:windowBackground">@android:color/transparent</item> </style>

Standart window animation when using Slidr

Is it possible to use custom window animation with Slidr?
For now using windowIsTranslucent sets animation to default.

<item name="android:windowAnimationStyle">@style/Animation.MyAnimation</item>

<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>

ListActivity causes wrong slide

a little issue that when the sliding activity is a ListActivity or has a long list, sliding the list fast could cause the activity slide-back. look forward to the new version.

API 23+ issues

I am checking with the API 23+ platform. It came out that when i move the panel the whole screen offset upward with the height of the status bar. Is there a fix for this? @r0adkll Thank you so much!

MainActivity not visible while sliding

I have 2 activities -> MainActivity & SubActivity.
Attached Slidr to SubActivity. But while sliding, MainActivity is not visible. When sliding is complete, MainActivity appears.

Here's the onCreate method of SubActivity

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_add_account);

    SlidrConfig config = new SlidrConfig.Builder()
            .primaryColor(getResources().getColor(R.color.colorPrimary))
            .secondaryColor(getResources().getColor(R.color.colorAccent))
            .position(SlidrPosition.LEFT)
            .sensitivity(1f)
            .build();

    Slidr.attach(this, config);

    // ACTION BAR
    mToolbar = (Toolbar) findViewById(R.id.app_bar);
    setSupportActionBar(mToolbar);
    getSupportActionBar().setHomeButtonEnabled(true);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);

}

photo8811761519142839

Specify bounds for slidr activity.

Thank you for this module! I have been looking for something like this to include in my application.
It would be nice to specify how far from the edge, and which edge we want the swipe to be activated.
i.e. EDGE_LEFT, EDGE_BOTTOM, LEFT, BOTTOM, etc.

runtime error

i import this project,and run this example,here is the error log when i jump to the ViewerActivity.
04-27 10:25:42.805 29616-29616/com.r0adkll.slidr.example E/AndroidRuntime: FATAL EXCEPTION: main Process: com.r0adkll.slidr.example, PID: 29616 java.lang.NoClassDefFoundError: Failed resolution of: Lorg/jacoco/agent/rt/internal_b0d6a23/Offline; at com.r0adkll.slidr.model.SlidrPosition.$jacocoInit(SlidrPosition.java) at com.r0adkll.slidr.model.SlidrPosition.<clinit>(SlidrPosition.java) at com.r0adkll.slidr.example.ViewerActivity.onCreate(ViewerActivity.java:66) at android.app.Activity.performCreate(Activity.java:6272) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2387) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2494) at android.app.ActivityThread.access$900(ActivityThread.java:157) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1356) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5530) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:733) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:623) Caused by: java.lang.ClassNotFoundException: Didn't find class "org.jacoco.agent.rt.internal_b0d6a23.Offline" on path: DexPathList[[zip file "/data/app/com.r0adkll.slidr.example-2/base.apk"],nativeLibraryDirectories=[/data/app/com.r0adkll.slidr.example-2/lib/arm, /vendor/lib, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469) at com.r0adkll.slidr.model.SlidrPosition.$jacocoInit(SlidrPosition.java)  at com.r0adkll.slidr.model.SlidrPosition.<clinit>(SlidrPosition.java)  at com.r0adkll.slidr.example.ViewerActivity.onCreate(ViewerActivity.java:66)  at android.app.Activity.performCreate(Activity.java:6272)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2387)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2494)  at android.app.ActivityThread.access$900(ActivityThread.java:157)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1356)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:148)  at android.app.ActivityThread.main(ActivityThread.java:5530)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:733)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:623)  Suppressed: java.lang.ClassNotFoundException: org.jacoco.agent.rt.internal_b0d6a23.Offline at java.lang.Class.classForName(Native Method) at java.lang.BootClassLoader.findClass(ClassLoader.java:781) at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) at java.lang.ClassLoader.loadClass(ClassLoader.java:504) ... 16 more Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

Update the documentation and the code.

The latest version of the library (1.0.1) works in a different way as it's indicated in the README. To attach the Slider to the Activity the code is:

SlidableAttacher.attach(this);

Additionally, the class SliderAttacher can not be found in the code published on GitHub.

Error from the image zoom

I have used the slidr with the photoview from chrisbanes. There are some out of bounds error i have found and they are listed here:

03-11 20:52:31.899  15048-15048/com.buildsystemexample.app.test_native E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: com.buildsystemexample.app.test_native, PID: 15048
    java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
            at android.support.v4.widget.ViewDragHelper.saveLastMotion(ViewDragHelper.java:848)
            at android.support.v4.widget.ViewDragHelper.shouldInterceptTouchEvent(ViewDragHelper.java:1049)
            at com.r0adkll.slidr.widget.SliderPanel.onInterceptTouchEvent(SliderPanel.java:155)
            at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2059)
            at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2436)
            at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2178)
            at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2383)
            at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1724)
            at android.app.Activity.dispatchTouchEvent(Activity.java:2764)
            at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2332)
            at android.view.View.dispatchPointerEvent(View.java:8655)
            at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4238)
            at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4094)
            at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3635)
            at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3694)
            at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3660)
            at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3773)
            at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3668)
            at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3830)
            at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3640)
            at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3694)
            at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3660)
            at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3668)
            at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3640)
            at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5940)
            at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5908)
            at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5872)
            at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6030)
            at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:211)
            at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
            at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:197)
            at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:6001)
            at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:6062)
            at android.view.Choreographer$CallbackRecord.run(Choreographer.java:792)
            at android.view.Choreographer.doCallbacks(Choreographer.java:596)
            at android.view.Choreographer.doFrame(Choreographer.java:555)
            at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:778)
            at android.os.Handler.handleCallback(Handler.java:739)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:155)
            at android.app.ActivityThread.main(ActivityThread.java:5696)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1028)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)

It triggers when first there are two fingers touch the screen.

IllegalStateException: The specified child already has a parent... in Samsung Multi-window

Multi-window example

 4. Multi-window has been overhauled
https://www.androidcentral.com/galaxy-s7-nougat-update-top-10-features-know

Exception


Exception java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
android.view.ViewGroup.addViewInner (ViewGroup.java:4656)
android.view.ViewGroup.addView (ViewGroup.java:4497)
com.android.internal.widget.DecorCaptionView.addView (DecorCaptionView.java:358)
android.view.ViewGroup.addView (ViewGroup.java:4469)
com.android.internal.policy.DecorView.onConfigurationChanged (DecorView.java:2035)
com.android.internal.policy.PhoneWindow.onMultiWindowModeChanged (PhoneWindow.java:747)
android.app.Activity.dispatchMultiWindowModeChanged (Activity.java:7177)
android.app.ActivityThread.handleMultiWindowModeChanged (ActivityThread.java:3205)
android.app.ActivityThread.-wrap16 (ActivityThread.java)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1859)
android.os.Handler.dispatchMessage (Handler.java:102)
android.os.Looper.loop (Looper.java:154)
android.app.ActivityThread.main (ActivityThread.java:6646)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1468)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1358)

Code

I have solved this problem.
Please check the code below.

OLD - MyActivity.java

setContentView( R.layout.activity_layout);
mSlidr = SlidrCompat.attach(this, new SlidrConfig.Builder().build());

NEW - MyActivity.java

mSlidr = SlidrCompat.attach(this, R.layout.activity_layout, new SlidrConfig.Builder().build());

Slidr.java

...
  public static SlidrInterface attach(final Activity activity,
                                      @LayoutRes final int layoutId,
                                      final SlidrConfig config) {

    // Setup the slider panel and attach it to the decor
    final SliderPanel panel = initSliderPanel(activity, layoutId, config);
...

private static SliderPanel initSliderPanel(final Activity activity,
                                             @LayoutRes final int layoutId,
                                             final SlidrConfig config) {
    ViewGroup decorView = (ViewGroup) activity.getWindow().getDecorView();
    View contentView = LayoutInflater.from(activity).inflate(layoutId, decorView, false);

    FrameLayout frameLayout = new FrameLayout(activity);
    frameLayout.setLayoutParams(new ViewGroup.LayoutParams(-1, -1));
    frameLayout.setId(com.r0adkll.slidr.R.id.slidable_content);
    frameLayout.addView(contentView);

    SliderPanel panel = new SliderPanel(activity, frameLayout, config);
    panel.setId(com.r0adkll.slidr.R.id.slidable_panel);
    panel.addView(frameLayout);
    activity.setContentView(panel);
    return panel;
}

when SlidrPosition.HORIZONTAL, how handle slide conflicts with viewpager,seekbar

English: when SlidrPosition.HORIZONTAL, how handle slide conflicts with viewpager, seekbar? child view have touch events, can you provide setDisallowInterceptTouchEvent(true) method?

中:当SlidrPosition.HORIZONTAL时,如何处理与viewpager, seekbar的滑动冲突?子view拥有触摸事件时,能提供一个setDisallowInterceptTouchEvent(true)的方法吗?

java.lang.NoClassDefFoundError

Process: com.r0adkll.slidr.example, PID: 30122 java.lang.NoClassDefFoundError: org.jacoco.agent.rt.internal_773e439.Offline at com.r0adkll.slidr.model.SlidrConfig$Builder.$jacocoInit(SlidrConfig.java) at com.r0adkll.slidr.model.SlidrConfig$Builder.<init>(SlidrConfig.java)

Change helper.cancel() to helper.abort() in lock/unlock method.

I wish to change mDragHelper.cancel(); to mDragHelper.abort(); in lock/unlock method because the following case.

I use pullToRrefresh listview and Slidr in an activity. I lock Slidr when listView is pulled to refresh and unlock when the touch is released. Unfortunately, Slidr will eat the first touch event after being unlocked. That means I can not scroll the listview, but only to slide the whole view.

Even though Slidr is disabled, the dragHelper is still tracking touch event silently. onInterceptTouchEvent of SlidrPanel may return true once Slidr is enabled and touch occurs.

It is a bit confusing because I did not drag at all after unlocking Slidr.

So, how about calling abort to clean touch history instead of cancel in lock/unlock method?

Transparent activity in adnroid 4.4.2

In Android 4.4.2 causing the main activity to "fall behind" the OS view when using NavUtils for up-navigation to the main activity.
I searched on StackOverflow, and thought android:theme="@android:style/Theme.Translucent.NoTitleBar" can help, but in my case I need AppCompat theme and AppCompat haven't tpansparent theme.

Request: Allow dynamic changing of close direction

It would be nice to have an option to change the Slidr direction/position while in an Activity.

I currently use Slidr in an Activity with a RecyclerView. I detect the scroll events and enable/disable Slidr when necessary, but updating the closing direction (TOP when at the start of the list, BOTTOM when at the end) requires the creation of a new SlidrConfig and SlidrInterface.
This also does not work very well when using a ViewPager with multiple RecyclerViews.

I implemented a quick method of changing the direction here (Simon-Raes@6178de1), but there's probably a better way to achieve this.

android8.0 compatibility problem

version : Android 8.0
exception: Only fullscreen opaque activities can request orientation
reason: <item name="android:windowIsTranslucent"> true </item>
the solution is not found , can you fix it ?

When I slide the activity, the background shows the home screen

This is my code:

public class MyActivity extends ActionBarActivity {
  public void onCreate(Bundle savedInstanceState) {
      ...
      if (currentapiVersion >= android.os.Build.VERSION_CODES.HONEYCOMB) {
            SlidrConfig config = new SlidrConfig.Builder()
                    .position(SlidrPosition.LEFT)
                    .sensitivity(0.3f)
                    .build();
            Slidr.attach(this, config);
        }
      ...
  }
}

_theme.xml_

<style name="MyTheme" parent="AppTheme">
  <item name="android:windowIsTranslucent">true</item>
  <item name="android:windowBackground">@android:color/transparent</item>
</style>

_In the layout, I set the background to #ffffff._

That's all !

I check the slidr lib codes:

ViewGroup decorView = (ViewGroup)activity.getWindow().getDecorView();
View oldScreen = decorView.getChildAt(0);

I guess that oldScreen is transparent and empty or oldScreen is home screen.

try at the edge mode

The edge detection is not working. I just realized that your component on using dragviewhelper doesnt work in detection of edge detection to trigger the movement of the panel does not work. I discovered that the down detection was ACTION_MOVE instead of ACTION_DOWN. As the result it just triggered the move before considering the edge touch distance. I think we should build a brand new drag detection instead of using the one from android sdk.

返回后闪烁

在用GLSurfaceView的Activity里,返回时会闪烁。
Activity的源码:
public class AndroidGLSurfaceViewActivity extends Activity {
private GLSurfaceView mGLView;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mGLView = new GLSurfaceView(this);
    mGLView.setRenderer(new ClearRenderer());
    setContentView(mGLView);

    Slidr.attach(this);
}

@Override
protected void onPause() {
    super.onPause();
    mGLView.onPause();
}

@Override
protected void onResume() {
    super.onResume();
    mGLView.onResume();
}

class ClearRenderer implements GLSurfaceView.Renderer {
    public void onSurfaceCreated(GL10 gl, EGLConfig config) {
        // Do nothing special.
    }

    public void onSurfaceChanged(GL10 gl, int w, int h) {
        gl.glViewport(0, 0, w, h);
    }

    public void onDrawFrame(GL10 gl) {
        gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
    }
}

}

Remove status bar rect

When I swipe activity, I can see white space for status bar. How can I remove this region?

SNAPSHOT build

I had an issue from the build.

It looks like this.

Error:Failed to resolve: com.android.support:support-v4:22.2.1
Install Repository and sync project
Open File
Show in Project Structure dialog

i think i am using

compile 'com.android.support:support-annotations:22.2.0'
compile 'com.android.support:support-v13:22.2.0'
compile 'com.android.support:appcompat-v7:22.2.0'

for all my modules.

what do i need to change in order to match to your configuration?

Undo Slide After Close

After a user slides the activity, I show a confirmation dialog. If they click cancel, I need to undo the slide and show the activity again. How can I do this?

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.