Git Product home page Git Product logo

superbottomsheet's Introduction

Hi there, I'm André 👋

Android Engineer working in Leiria, Portugal.

TL;DR

  • 💻 I currently work at WIT Software as Android Principal Engineer
  • ☀️ I use these file extensions daily: .kt, .py
  • 💬 Ask me about Android, UI/UX Design & Software Architecture
  • 📫 How you can reach me: Twitter, LinkedIn, GitHub, Stack Overflow, Medium
  • ⚡ Fun fact: I am also a full-time father and a big fan of StarWars

📊 Github Stats

andrefrsousa's github stats

superbottomsheet's People

Contributors

andrefrsousa avatar asousawit 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

superbottomsheet's Issues

NPE in animateStatusBar

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)

Non modal bottom sheet

Is there any possibility to support same features (status bar animation, corner animation etc) for non modal bottom sheets?

Error inflating class

Error inflating class android.constraintlayout.Contrainlayout and android.support.design.widget.CoordinatorLayout

App crash in callback performAccessibilityAction

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,

Crash when setStatusBarColor: dialog must not be null

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.

Issue with recycler view

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>

problem with material 1.1.0-alpha10

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

Keyborad

how can move up bottom sheet when keyboard is visible?

Strange background effect on emulator (and some devices)

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:

Screen.Recording.2021-03-09.at.19.21.17.mov

BottomSheetDialog fragment outside area touchable

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.

Dismiss botttomsheet

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?

SuperBottomSheet blank

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.

screen_not_working
working_screen

background shadow transition was very unnatural

Hello! After I upgraded from version 1.5.0 to version 2.0.0, when the Sheet dialog popped up from the screen, the background shadow transition was very unnatural.

The gif below shows the problem.

Hope it can be optimized, thank you for your contribution!🍭

isSheetAlwaysExpanded

Hi, I'am testing the demo and using and returning isSheetAlwaysExpanded true but it collapsed

colorPrimary is not getting overrided

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.

Disable rounded corner animation

Add support for keeping the rounded corners even if the user scrolls the sheet to the top.

Suggested flag: superBottomSheet_animateCornerRadius

Set NavigationBar custom color

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.

Crash when trying sample

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

2019-10-17_13-06-09.zip

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.