kennyc1012 / bottomsheetmenu Goto Github PK
View Code? Open in Web Editor NEWBottomSheetMenu style dialogs for Android
License: Apache License 2.0
BottomSheetMenu style dialogs for Android
License: Apache License 2.0
I got this error when I uses vector icon in a menu
android.content.res.Resources$NotFoundException: File res/drawable-hdpi-v4/ic_translate_grey_48dp.xml from drawable resource ID #0x7f02008d. If the resource you are trying to use is a vector resource, you may be referencing it in an unsupported way. See AppCompatDelegate.setCompatVectorFromResourcesEnabled() for more info.
at android.content.res.Resources.loadDrawable(Resources.java:2600)
at android.content.res.Resources.getDrawable(Resources.java:795)
at com.kennyc.bottomsheet.b.b.setIcon(Unknown Source)
at android.view.MenuInflater$MenuState.setItem(MenuInflater.java:399)
at android.view.MenuInflater$MenuState.addItem(MenuInflater.java:451)
at android.view.MenuInflater.parseMenu(MenuInflater.java:188)
at android.view.MenuInflater.inflate(MenuInflater.java:110)
i have custom view with single edit text on it, when soft keyboard has opened, bottom sheet still under keyboard
When using createShareBottomSheet(), many unnecessary built-in sharing options (like Bluetooth, WLAN-Direct, built-in QR code apps and much more) are displayed. I there any way I can filter out specific sharing options by mentioning their package name.
A similar feature is available with BottomSheet library offered by Flipboard
If no such feature is available adding such a feature would be helpful for the developers
Looks like the library is constantly looking for icons and tries to use resource 0x0 for items that do not have icons
10-14 14:30:53.178 31113-31113/[redacted] E/AndroidRuntime: android.content.res.Resources$NotFoundException: Resource ID #0x0
10-14 14:30:53.178 31113-31113/[redacted] E/AndroidRuntime: at android.content.res.Resources.getValue(Resources.java:1266)
10-14 14:30:53.178 31113-31113/[redacted] E/AndroidRuntime: at android.content.res.Resources.getDrawable(Resources.java:785)
10-14 14:30:53.178 31113-31113/[redacted] E/AndroidRuntime: at android.content.res.Resources.getDrawable(Resources.java:752)
10-14 14:30:53.178 31113-31113/[redacted] E/AndroidRuntime: at com.kennyc.bottomsheet.menu.BottomSheetMenuItem.setIcon(BottomSheetMenuItem.java:222)
10-14 14:30:53.178 31113-31113/[redacted] E/AndroidRuntime: at android.view.MenuInflater$MenuState.setItem(MenuInflater.java:440)
10-14 14:30:53.178 31113-31113/[redacted] E/AndroidRuntime: at android.view.MenuInflater$MenuState.addItem(MenuInflater.java:493)
10-14 14:30:53.178 31113-31113/[redacted] E/AndroidRuntime: at android.view.MenuInflater.parseMenu(MenuInflater.java:189)
10-14 14:30:53.178 31113-31113/[redacted] E/AndroidRuntime: at android.view.MenuInflater.inflate(MenuInflater.java:110)
10-14 14:30:53.178 31113-31113/[redacted] E/AndroidRuntime: at com.kennyc.bottomsheet.BottomSheet$Builder.setSheet(BottomSheet.java:633)
10-14 14:30:53.178 31113-31113/[redacted] E/AndroidRuntime: at [redacted].feed.adapter.FeedAdapter$2.onClick(FeedAdapter.java:106)
10-14 14:30:53.178 31113-31113/[redacted] E/AndroidRuntime: at android.view.View.performClick(View.java:4780)
10-14 14:30:53.178 31113-31113/[redacted] E/AndroidRuntime: at android.view.View$PerformClick.run(View.java:19866)
10-14 14:30:53.178 31113-31113/[redacted] E/AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:739)
10-14 14:30:53.178 31113-31113/[redacted] E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)
10-14 14:30:53.178 31113-31113/[redacted] E/AndroidRuntime: at android.os.Looper.loop(Looper.java:135)
10-14 14:30:53.178 31113-31113/[redacted] E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5254)
10-14 14:30:53.178 31113-31113/[redacted] E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
10-14 14:30:53.178 31113-31113/[redacted] E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372)
10-14 14:30:53.178 31113-31113/[redacted] E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
10-14 14:30:53.178 31113-31113/[redacted] E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Hello,
Is it possible to remove android:supportsRtl="true" from your manifest?
we use android:supportsRtl="false" in our manifest because set Rtl to true, make problems for our projects(we have 2 projects and in both of them we have this problem).
so now we can not add your library to gradle of our app and we should download it and add it as a module to our project.so we have problems with updates and ... .
android studio sets supportsRtl to true automatically when you create a new project. i want to see if it is possible for you to remove this field from your manifest.
thanks in advance.
Hi i really like the bottomsheet it looks great i'm working on a web browser and i've implemented it to launch an app from a web url but i've got a problem with the bottom sheet items not working or crashing when you load it from shouldOverrideUrlLoading i have attached the code so you can see and when i click these items the app crashes can you give me any suggestions ?
I am testing this library on a physical device with Android v17 (Jellybean). I am noticing 2 issues
Regards
On my emulator, BottomSheet works perfectly, anchored to bottom margin of screen. With the same code, on my device, there is a gap appearing between bottom of screen and bottom sheet. The sheet inflates a custom layout view, but there is nothing in the XML to suggest why a margin should appear, nor why different devices might render different end results. Any idea? I can post my XML...
I want to dismiss the bottomSheet when i click on a button to show another one.
In the current case the new one shows in front of the previous one.
I'm trying to do something like on Google Maps, where the content above the bottom sheet is touchable, there is no dimming, and I can scroll the bottom sheet till it shows its whole content , and even further if there is a lot of content.
Is it possible on this library to have this behavior ?
I think it maybe animate behind the virtual button.
I test it in Nexus 5x.
Please fix it. I soooooo need this library!
Hello dear.
is it possible for u to remove or change this line
supportsRtl="true"
(here)
from ur project?
i do not want to support RTL but i cant set it to false, because ur library set it true and for result android studio give me this:
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application@supportsRtl value=(false) from AndroidManifest.xml:21:9-36
is also present at [com.github.Kennyc1012:BottomSheet:2.1.1] AndroidManifest.xml:11:18-44 value=(true).
Suggestion: add 'tools:replace="android:supportsRtl"' to <application> element at AndroidManifest.xml:15:5-62:19 to override.
Sometimes custom view's animation will be quickly that is different from default.
Hi. Your library is great. But it has the issue. When list is large, scroll down works fine, but scroll to the up direction sometimes intercepts by BottomSheet and it begins dragging.
Here is the video of the issue https://www.dropbox.com/s/uc1f7kvfp6exjrn/scroll_coflicts.mp4?dl=0
i got the following issue when using library 3.1.1
error: resource color/bottom_sheet_list_item_color_dark (aka bottom_sheet_list_item_color_dark) not found.
When I click on an item, it executes the method associated to that item and also the method associated to the item under it.
in bottom_sheet_message_layout.xml, the id is not defined correctly. + is missing and it is causing issue during build . Could you please look into it.
Bottom sheet with lot of content will cover whole screen. So can or should possibility adding such a maximum height? So I do this...
BottomSheet build = new BottomSheet.Builder(this) .setSheet(R.menu.bulk_option_menu) .setListener(this) .grid() .create(); ViewGroup.LayoutParams param = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,200); build.getLayout().setLayoutParams(param);
But setlayoutparam returning java.lang.NullPointerException
I define custom width in XML view, but it not work.
<LinearLayout... android:layout_width="XXXdp" ... />
Is there an other way to do that?
If someone chooses to explicitly set the allowBackup=false then lint complaints and user must set tools:replace="allowBackup".
How to use this library in Eclipse IDE? please help me in this.
Hi, great library! I'd like to know if there is anyway to dismiss the dialog programmatically? I can't seem to find any bottomsheet.dismiss() or anything like that?
i .setCancelable(false) and use custom view, how i can hide bottom sheet when click one item of my custom view?
is there any way to change menu items or title fonts?
After upgrade to 3.x version, I created a bottom sheet menu on 10" tablet landscape orientation. I found that only bottom sheet title is shown and i need to swipe up the sheet to show all menu item.
But when i change orientation to portrait, it works perfectly.
How can i show all menu items when bottom sheet is shown when in landscape mode
I found that the hiding of MenuItem doesn't work. Is it my way of using it?
So i have some buttons in my custom layout which i need to click to do some actions. Is it possible to do it and if yes how?
when we pause the app and the resume it again the bottom sheet first disappears then reappears. Is it possible to keep it fixed unless canceled.
Thanks for the great library but just a small point that I've seen while using it. To build a bottom sheet the method name that you used is create()
while the standard used by all the other Java/Android libraries is build()
Hi! Your library is great ๐
but I can't understand how to access to Menu Items for change visibility/title/icon of each item using static menu resource as sheet.
How can I do that? ( before the sheet is visible )
Thanks ๐
Hey!
I've implemented a BottomSheet. But when I try to start it, this crash happens:
04-30 15:37:11.151 19805 19805 E AndroidRuntime: Process: com.fa.touch.app, PID: 19805
04-30 15:37:11.151 19805 19805 E AndroidRuntime: java.lang.ClassCastException: io.codetail.widget.RevealLinearLayout cannot be cast to com.kennyc.bottomsheet.CollapsingView
04-30 15:37:11.151 19805 19805 E AndroidRuntime: at com.kennyc.bottomsheet.BottomSheet.initLayout(BottomSheet.java:252)
04-30 15:37:11.151 19805 19805 E AndroidRuntime: at com.kennyc.bottomsheet.BottomSheet.onCreate(BottomSheet.java:134)
04-30 15:37:11.151 19805 19805 E AndroidRuntime: at android.app.Dialog.dispatchOnCreate(Dialog.java:394)
04-30 15:37:11.151 19805 19805 E AndroidRuntime: at android.app.Dialog.show(Dialog.java:295)
04-30 15:37:11.151 19805 19805 E AndroidRuntime: at com.kennyc.bottomsheet.BottomSheet$Builder.show(BottomSheet.java:925)
04-30 15:37:11.151 19805 19805 E AndroidRuntime: at com.fa.touch.activity.BrowserActivity$3.onClick(BrowserActivity.java:145)
04-30 15:37:11.151 19805 19805 E AndroidRuntime: at android.view.View.performClick(View.java:5232)
04-30 15:37:11.151 19805 19805 E AndroidRuntime: at android.view.View$PerformClick.run(View.java:21290)
04-30 15:37:11.151 19805 19805 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:739)
04-30 15:37:11.151 19805 19805 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)
04-30 15:37:11.151 19805 19805 E AndroidRuntime: at android.os.Looper.loop(Looper.java:168)
04-30 15:37:11.151 19805 19805 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5821)
04-30 15:37:11.151 19805 19805 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
04-30 15:37:11.151 19805 19805 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797)
04-30 15:37:11.151 19805 19805 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687)
0
Do you know where this is coming from?
Is there any plan for supporting right to left languages?
When i switch from Left to right the icons appears in the right but the menu title and the BottomSheet Title is to left
how can i support RTL
thanks in advance.
in this sample:
new BottomSheet.Builder(activity)
.setView(R.layout.custom_bottom_sheet_layout)
.setListener(new BottomSheetListener() {
@Override
public void onSheetShown() {
}
@Override
public void onSheetItemSelected(MenuItem menuItem) {
}
@Override
public void onSheetDismissed(int i) {
}
}).show();
how can i get clicked on views? for example this is my own layout:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/bottom_sheet_click"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_launcher" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="A Custom Layout" />
</LinearLayout>
it means get click event on bottom_sheet_click
id
Setting setCancelable(false) on the BottomSheet stop users from dismissing the sheet by tapping, but still allows users to drag the sheet down and dismissing it that way.
I am unable to get dark background for my custom view, though the app theme is dark. I've also tried setting background for the view group of the layout.
I'm inflating my layout like this:
binding = DataBindingUtil.inflate(
getLayoutInflater(), R.layout.my_layout, activityBinding.activityRoot, false)
binding.getRoot()
is given to bottom sheet builder.
I have tried setting the theme and background to my_layout
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="16dp"
app:theme="@style/MyDarkTheme"
android:background="?attr/colorBottomSheetBackground"
>
Also tried setting bottom_sheet_bg_color
as part of MyDarkTheme
What am I missing? I'm using 2.4.1
can make a dim background color customizable?
BottomSheets should be able to be dragged and dismissed by swiping away.
Is there any way to set the number of columns using the grid? I have the same number of items like in the example. It doesnt look good having 4 icons on the first row and then 2 icons on the bottom row. Is there any settings I could change to set number of columns?
Thanks
Hello. Is it possible to open the bottom sheet dialog in two steps? I mean when we touch a button,bottom sheet opens up to half of screen height and if the user sweeps it, it covers all screen height.
I am using createShareBottomSheet method
I wonder if it would be possible to build a bottomsheet with both the message (would be displayed at the top) and the menu (would be displayed below the message). I've been asked to have both a title and a short description message within the bottomsheet.
i want to setListener event for each item on the Sheet
how to write it ?thank u !
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.