Coder Social home page Coder Social logo

bottomsheetmenu's Issues

Menu items

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 ?

Bottom sheet with lot of content will cover whole screen?

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

Icons are displayed with a colored background when using createShareBottomSheet()

I am testing this library on a physical device with Android v17 (Jellybean). I am noticing 2 issues

  1. The icons of Shae Intents are filled with some background color. I am attaching an image for reference. Please have a closer look at the icons of Gmail, SHAREit and TubeMate. All have a blue background instead of plain white.
  2. The other issue is the icon size. They seem to appear small (I might be wrong, but probably not). I read this line "icons for a linear list styled BottomSheet should be 24dp", but...

device-2016-07-16-234440

Regards

hey

i want to setListener event for each item on the Sheet
how to write it ?thank u !

get clicked on views when i try to use custom layout

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

Bug when trying to use BottomSheet

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?

Dismiss on Button Clicked

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.

how to show menu in State_Expanded when bottom sheet is shown in landscape mode?

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

bottom_sheet_message_layout

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.

There is a problem

I found that the hiding of MenuItem doesn't work. Is it my way of using it?

A sheet crashes when using vector icon

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)

Number of columns if Grid?

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

Show both a message and a menu?

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.

BottomSheet not anchoring to bottom of screen

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...

Emulator
emulator
Device
device

Create method for the builder is confusing

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()

open ShareBottomSheet in two steps

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

Unable to set background for custom view

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

Resource not found exception for menus with no icons

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)

How to filter out specific built-in sharing Options

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

Menu Item Edit

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 ๐Ÿ˜„

supportsRtl

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. 

Customize Size

I define custom width in XML view, but it not work.
<LinearLayout... android:layout_width="XXXdp" ... />
Is there an other way to do that?

Eclipse Setup

How to use this library in Eclipse IDE? please help me in this.

Is it possible to remove android:supportsRtl="true" from your manifest?

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.

hide bottom sheet

i .setCancelable(false) and use custom view, how i can hide bottom sheet when click one item of my custom view?

RTL Support

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.

Project not available on Gradle

When I tried to integrate this library with below dependency line, it is giving me error.

compile 'com.github.Kennyc1012.BottomSheet:2.3.1'

image

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.