techisfun / androidtopsheet Goto Github PK
View Code? Open in Web Editor NEWA "top" version of BottomSheetDialog
License: Apache License 2.0
A "top" version of BottomSheetDialog
License: Apache License 2.0
Steps to reproduce:
Actual:
Top sheet is fully closed
Expected
Top sheet is still visible with a height of 3dp.
I'm currently using the BottomSheetBehavior within my layout by using the following code:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:behavior_hideable="false"
app:behavior_peekHeight="35dp"
app:layout_behavior="android.support.design.widget.BottomSheetBehavior">
</RelativeLayout>
I'd love that by replacing the app:layout_behavior parameter value with com.my.app.components.TopSheetBehavior will work out of the box, as it does with the BottomSheetBehavior.
Am I missing anything? At the moment I'm getting a NullPointerException, with the following trace:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.walkaholic.hikeapp.debug, PID: 20213
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.widget.ViewDragHelper.processTouchEvent(android.view.MotionEvent)' on a null object reference
at com.walkaholic.hikeapp.components.TopSheetBehavior.onTouchEvent(TopSheetBehavior.java:285)
at android.support.design.widget.CoordinatorLayout.resetTouchBehaviors(CoordinatorLayout.java:396)
at android.support.design.widget.CoordinatorLayout.onAttachedToWindow(CoordinatorLayout.java:238)
at android.view.View.dispatchAttachedToWindow(View.java:16638)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3149)
at android.view.ViewGroup.addViewInner(ViewGroup.java:4695)
at android.view.ViewGroup.addView(ViewGroup.java:4497)
at android.view.ViewGroup.addView(ViewGroup.java:4437)
at android.view.ViewGroup.addView(ViewGroup.java:4410)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1434)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1759)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1827)
at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:797)
at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2596)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2383)
at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2338)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2245)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:703)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6682)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
add HALF_EXPANDED state that open half of screen even layout height is bigger than screen
like bottom sheet:
BottomSheetBehavior.STATE_HALF_EXPANDED
Failed to resolve: com.github.TechIsFun:AndroidTopSheet:Tag
Show in Project Structure dialog
Affected Modules: app
Even though I added:
allprojects {
repositories {
mavenCentral()
google()
jcenter()
maven { url 'https://jitpack.io' }
}
}
I am suspecting it has something to do with:
Plugin with id 'com.github.dcendents.android-maven' not found.
I am trying to use the "TopSheetBehavior" with NestedScrollView.
if i replace NestedScrollView with LinearLayout, everything work fine. But if i use NestedScrollView, the "FrameLayout (i.e. top Sheet)" cannot be collapsed.
Just more understanding:
I have NestedScrollView
|
|----->NestedScrollView has TabLayout.
|
|------> Tablayout has Fragment
|
|------> Fragment has this "Top Sheet"
Could you please help... :-)
Hello, thanks for your lib she is really usefull, everything is in the title, can I slow down the animation ?
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.