Comments (7)
The library functions primarily as a dialog, so the request behavior isn't supported easily. The view used in Google Maps is most likely not a dialog but apart of the layout. You can wrap your view in a CollapsingView and add it to your view and manipulate it yourself.
from bottomsheetmenu.
@Kennyc1012 Too bad.
Can you help me with this though?
I've tried doing it for a long time on other libraries, and still failed:
http://stackoverflow.com/q/34160423/878126
from bottomsheetmenu.
Heres the approach I would take if I were try to replicate the Google Maps app.
Activity A- The wrapping activity for the views. Would contain 2 fragments. The activity theme should extend from Theme.AppCompat.NoActionBar
Map Fragment- This is where the map view would be held and manipulated. There should NO actionbar/toolbar here
Bottomsheet Fragment- This is where the actionbar/toolbar will be. The fragment will be added with a transaction when wanting to me shown. Upon dismissing by either the back arrow or dragging, the fragment should be removed from the fragment manager.
If communication is needed between both fragments and/or with the parent activity, you can create an interface that the activity will implement and the fragments can make calls to the interface(Activity A) which can then communicate down to either or both of the fragments.
from bottomsheetmenu.
The activity and fragments part is ok and I can already customize it, but I don't get how to use the bottom sheet itself (which is why I try out multiple libraries that support bottom sheet), and work well with its listeners.
in a POC, I've tried now using the CollapsingView inside the layout of the activity, as such:
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="some normal content behind the bottom sheet, not a part of it"/>
<com.kennyc.bottomsheet.CollapsingView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include layout="@layout/custom_view"/>
</com.kennyc.bottomsheet.CollapsingView>
</FrameLayout>
The "custom_view" layout is a large one, which also includes CollapsingToolbarLayout.
Yet, the bottom sheet takes the whole screen from the beginning. Isn't there a function to tell it to take the space of a certain view within or something? Only when scrolling, it should take the whole screen...
from bottomsheetmenu.
The CollapsingView will wrap to the whole views total height, not partially show it. I don't think this library is a good solution for what you need, sorry.
from bottomsheetmenu.
Too bad. Thank you for your help.
If you do know how to handle it well, please let me know.
Bottom sheet is supposed to initially show only a part of it. That's why it's also called "bottom"...
from bottomsheetmenu.
This can be achieved using the BottomSheetBehavior in the V23.2.0 support library described here
from bottomsheetmenu.
Related Issues (20)
- On Resume bottom sheet Hides and expands HOT 7
- Set click listener for customview buttons HOT 2
- Bottom sheet with lot of content will cover whole screen? HOT 2
- hey HOT 9
- Unable to set background for custom view HOT 2
- The exit animation often blocked when press the back button. HOT 2
- Open keyboard on custom layout with edittext HOT 1
- BottomSheet not anchoring to bottom of screen HOT 2
- Failed to resolve HOT 1
- There is a problem HOT 1
- how to show menu in State_Expanded when bottom sheet is shown in landscape mode? HOT 2
- Error when building project "bottom_sheet_list_item_color_dark not found HOT 1
- Impossible to change font size? HOT 1
- MinSdk 19 is required HOT 1
- Crash on rotation
- More than one file was found with OS independent path 'META-INF/library_release.kotlin_module'.
- Crash On Rotation
- QUERY_ALL_PACKAGES permission HOT 4
- Crash when app goes to background HOT 1
- Top padding remains visible after we define empty title HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bottomsheetmenu.