andrefrsousa / superbottomsheet Goto Github PK
View Code? Open in Web Editor NEWAndroid native BottomSheet on steroids 💪
Home Page: https://andrefrsousa.github.io/SuperBottomSheet/
License: MIT License
Android native BottomSheet on steroids 💪
Home Page: https://andrefrsousa.github.io/SuperBottomSheet/
License: MIT License
Error inflating class android.constraintlayout.Contrainlayout and android.support.design.widget.CoordinatorLayout
This sheet is not opening till full height of screen on expanding
Is it possible to expand the modal bottom sheet at swipe up action?
Hi
I have issue with BottomSheetDialogFragment. I want BottomSheetDialogFragment with outside view touchable. I want bottom sheet open half expanded on map and when it is open half at that time want to move map and want click event for other markers on map. Is it possible with BottomSheetDialogFragment.
Status bar color not changing until i set
override fun animateStatusBar() = false
override fun getDim() = 0F
i want that animation too.
well! Thank you so much for this magical library 💞
Am trying to attach an onclick to a button to dismiss instead of swipe but it does not work, How do i implement this functionality?
hii
when I use 1.1.0-alpha10, got this error message
superbottomsheet.SuperBottomSheetDialog cannot be cast to com.google.android.material.bottomsheet.BottomSheetDialog
but when change material version to 1.1.0-alpha09 it's worked correctly
Add support for disabling the status bar color animation.
Suggested flag: superBottomSheet_animateStatusBar
I want to remove the parent toolbar and as soon as bottom sheet reaches top i want to show a toolbar with image with cancel button with animation like this https://github.com/HeyAlex/BottomDrawer
Hi @andrefrsousa ,
Thank you for publishing lib SuperBottomSheet
, this lib help our project a lot.
However, Firebase Crashlytics report a crash as below:
Fatal Exception: java.lang.IllegalArgumentException
Parameter specified as non-null is null: method kotlin.d0.d.l.g, parameter args
com.andrefrsousa.superbottomsheet.SuperBottomSheetDialog$wrapInBottomSheet$2.performAccessibilityAction (SuperBottomSheetDialog.java:7)
androidx.core.view.AccessibilityDelegateCompat$AccessibilityDelegateAdapter.performAccessibilityAction (AccessibilityDelegateCompat.java:126)
android.view.View.performAccessibilityAction (View.java:13037)
android.view.AccessibilityInteractionController.performAccessibilityActionUiThread (AccessibilityInteractionController.java:691)
android.view.AccessibilityInteractionController.access$500 (AccessibilityInteractionController.java:75)
android.view.AccessibilityInteractionController$PrivateHandler.handleMessage (AccessibilityInteractionController.java:1396)
android.os.Handler.dispatchMessage (Handler.java:107)
android.os.Looper.loop (Looper.java:230)
android.app.ActivityThread.main (ActivityThread.java:7815)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:526)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1034)
After taking a short time to review this bug, and this lib also. I found that: This crash occurred from wrong parameter, maybe came from Kotlin migration:
override fun performAccessibilityAction(host: View, action: Int, args: Bundle): Boolean {
}
It should be:
override fun performAccessibilityAction(host: View, action: Int, args: Bundle?): Boolean {
}
=> args: Bundle?
: args is Nullable
I checked the current lib version, 2.0.0
, and found that there is no changes/updates for this bug
Please take a look and fix it
Thank you very much,
I get a crash right when trying the sample:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.andrefrsousa.superbottomsheet.demo/com.andrefrsousa.superbottomsheet.demo.MainActivity}: android.view.InflateException: Binary XML file line #2 in com.andrefrsousa.superbottomsheet.demo:layout/activity_main: Binary XML file line #2 in com.andrefrsousa.superbottomsheet.demo:layout/activity_main: Error inflating class androidx.constraintlayout.ConstraintLayout
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3270)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Caused by: android.view.InflateException: Binary XML file line #2 in com.andrefrsousa.superbottomsheet.demo:layout/activity_main: Binary XML file line #2 in com.andrefrsousa.superbottomsheet.demo:layout/activity_main: Error inflating class androidx.constraintlayout.ConstraintLayout
Caused by: android.view.InflateException: Binary XML file line #2 in com.andrefrsousa.superbottomsheet.demo:layout/activity_main: Error inflating class androidx.constraintlayout.ConstraintLayout
Caused by: java.lang.ClassNotFoundException: androidx.constraintlayout.ConstraintLayout
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:454)
at android.view.LayoutInflater.createView(LayoutInflater.java:815)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1006)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:961)
at android.view.LayoutInflater.inflate(LayoutInflater.java:659)
at android.view.LayoutInflater.inflate(LayoutInflater.java:534)
at android.view.LayoutInflater.inflate(LayoutInflater.java:481)
at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:555)
at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:161)
at com.andrefrsousa.superbottomsheet.demo.MainActivity.onCreate(MainActivity.kt:39)
at android.app.Activity.performCreate(Activity.java:7802)
at android.app.Activity.performCreate(Activity.java:7791)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1306)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
2019-10-17 13:06:10.306 30684-30684/com.andrefrsousa.superbottomsheet.demo E/AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.constraintlayout.ConstraintLayout" on path: DexPathList[[zip file "/data/app/com.andrefrsousa.superbottomsheet.demo-eVeuOh4vgM5BaZM3Layqvw==/base.apk"],nativeLibraryDirectories=[/data/app/com.andrefrsousa.superbottomsheet.demo-eVeuOh4vgM5BaZM3Layqvw==/lib/arm64, /system/lib64, /system/product/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 26 more
In my app, all the three colors (colorPrimary, colorPrimaryDark and accentColor) are shades of Orange but still in the SuperBottomSheetFragment, I am seeing the default teal color everywhere.
I'm testing with an emulator (Pixel 4 API 29) and I am noticing a strange effect when opening a SuperBottomSheet. It happens at the top, it's like a flick when opening. Seems like it's not doing the slide animation in a smooth way for some reason. I also tested in a device (Realme X2 PRO) with a similar effect.
But here's the weird thing: using exactly the same example with the same code, I tested in 2 other devices (Redmi and Huawei), and it works very well and smooth, without any strange effect or anything similar.
I assume this is not an easy bug to identify, but just in case, any idea what could it be, and how to solve it?
Attached video for a better understanding of the issue:
i want some have action when dialog expanded
and other question,
how can i change the dialog height when expanded? I want to change dialog height some lower
Is there any possibility to support same features (status bar animation, corner animation etc) for non modal bottom sheets?
How disable show dialog after returning to the app from background?
Hi,
I'm attaching logs for an NPE happening across multiple devices. (The report comes from play store ANR/crashes)
java.lang.NullPointerException:
at com.andrefrsousa.superbottomsheet.SuperBottomSheetFragment.animateStatusBar (SuperBottomSheetFragment.java:1)
at com.andrefrsousa.superbottomsheet.SuperBottomSheetFragment.onCreateDialog (SuperBottomSheetFragment.java:1)
at androidx.fragment.app.DialogFragment.onGetLayoutInflater (DialogFragment.java:1)
at androidx.fragment.app.Fragment.performGetLayoutInflater (Fragment.java)
at androidx.fragment.app.Fragment.getLayoutInflater (Fragment.java:4)
Hello, is there any simple way to change the color of the navigation bar when the fragment is active? I could not enter a custom color. It is turning a default gray when you open Bottom Sheet.
how can move up bottom sheet when keyboard is visible?
my recycler view not showing the sheet
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".ui.BottomAddressFragment">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_change_addres_category"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/_8sdp"
android:layout_marginEnd="@dimen/_8sdp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
tools:itemCount="2"
tools:listitem="@layout/list_change_addr_item" />
</androidx.constraintlayout.widget.ConstraintLayout>
Hi, I'am testing the demo and using and returning isSheetAlwaysExpanded true but it collapsed
i'm facing issue with opening bottom sheet fragment from another fragment!
i wanted to disable the dialog dragging but i am not able to do that, i searched about this and get a solution where i have to access behavior from dialog but behavior is a private variable in the SuperBottomSheetFragment.
Add support for keeping the rounded corners even if the user scrolls the sheet to the top.
Suggested flag: superBottomSheet_animateCornerRadius
The Bottom sheet fragment stops scrolling when I add items into the layout.
Crash log:
Fatal Exception: java.lang.IllegalStateException: dialog must not be null
at com.andrefrsousa.superbottomsheet.SuperBottomSheetFragment.setStatusBarColor(SourceFile:3)
at com.andrefrsousa.superbottomsheet.SuperBottomSheetFragment.setStatusBarColorOnScroll(SourceFile:5)
at com.andrefrsousa.superbottomsheet.SuperBottomSheetFragment.access$setStatusBarColorOnScroll(SourceFile:1)
at com.andrefrsousa.superbottomsheet.SuperBottomSheetFragment$iniBottomSheetUiComponents$3.onSlide(SourceFile:2)
at com.google.android.material.bottomsheet.BottomSheetBehavior.dispatchOnSlide(SourceFile:6)
at com.google.android.material.bottomsheet.BottomSheetBehavior$3.onViewPositionChanged(SourceFile:1)
at f.j.a.c.n(SourceFile:9)
at com.google.android.material.bottomsheet.BottomSheetBehavior$SettleRunnable.run(SourceFile:1)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:179)
at android.app.ActivityThread.main(ActivityThread.java:5730)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:681)
Device: 100% OPPO phone. For now only see Android 5 & 6.
I have a weird issue with library. When I set isSheetAlwaysExpanded
to true
dialog will show views inside. In other case it appears as blank white nothing inside. My container is build by 2 RecyclerViews
, TextView
, ImageButton
and WebView
. Maybe WebView
causes this weird issue. I'm attaching working and not working scenarios.
Hey,Thanks for your awesome library .
How can i set margin to my bottom sheet Or at least setcontentview to my layout?
Hi, Just wondering if you have the feature of multiple navigations in the same bottom sheet.
Like I open the bottom sheet, I should be able to push new child fragments in the same bottom sheet.
Just like iOS Controle here:
https://github.com/gordontucker/FittedSheets
Regards
Hassan
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.