bottom-sheet

Keyboard hides BottomSheetDialogFragment

做~自己de王妃 提交于 2019-11-28 17:37:56
There are more fields below the keyboard. This happened when i updated the support library. I know it's Kotlin but it looks almost the same as java. How do I fix this issue? This is what it looks like: My code: class ProjectsEditBottomSheetFragment(val privateID: String, val publicID: String) : BottomSheetDialogFragment() { private val mBottomSheetBehaviorCallback = object : BottomSheetBehavior.BottomSheetCallback() { override fun onStateChanged(bottomSheet: View, newState: Int) { if (newState == BottomSheetBehavior.STATE_HIDDEN) { dismiss() } } override fun onSlide(bottomSheet: View,

BottomSheetBehavior not in androidX libraries

陌路散爱 提交于 2019-11-28 17:19:11
问题 I was using the BottomSheetBehavior with the original support library: implementation 'com.android.support:design:27.1.1' When I migrated to use the new androidx libraries though the BottomSheetBehavior is missing. The mapping from the above support library isn't in the AndroidX Refactoring List either, but the migration tool removed it. What am I missing to include the BottomSheetBehavior with the new androidx libraries. dependencies { implementation fileTree(dir: 'libs', include: ['*.jar'])

Android - Show BottomSheetDialogFragment above Keyboard

懵懂的女人 提交于 2019-11-28 12:05:33
I'm trying to show a BottomSheetDialogFragment with a few EditText fields for the user to enter information. I want to show it directly above the keyboard, but it keeps covering up the contents. This is what happens when I bring up the BottomSheetDialogFragment , you can see it's selecting Card Number EditText , but covering the other content. Ideally, this is what I'm looking for, you can see both EditTexts , and the padding of the View. I've tried a lot of solutions revolving around windowSoftInputMode , but nothing seems to work. I've set it to adjustResize for the parent Activity and the

Make bottomSheetDialog full screen over status bar

不问归期 提交于 2019-11-28 06:59:39
I recently used android.support.design.widget.BottomSheetDialogFragment. I wanted to do something which is similar to the Google contact app, its BottomSheet can overlay the toolbar and statusbar. However, when I use the BottomSheetDialogFragment to implement this, it turns out to this: As you can see the activity's toolbar is still visible. Here is my code of the BottomSheetDialogFragment : public class KeyDetailFragment extends BottomSheetDialogFragment { private BottomSheetBehavior.BottomSheetCallback mBottomSheetBehaviorCallback = new BottomSheetBehavior.BottomSheetCallback() { @Override

Sliding up image with Official Support Library 23.x.+ bottomSheet like google maps

倖福魔咒の 提交于 2019-11-28 03:06:27
Update I want to accomplish the same behavior that google maps has with Support Library 23.x.+ and without ANY 3rd library NOTE: this in not a duplicated question because: I want to use Behaviors, Support Library and without ANY 3rd party library (I added it in question title and above description) I wanted ALL behaviors that you see in next gif, the other questions are asking for one or two behaviors and using ANY WAY to achieve it. I have already the Official bottomSheet working (even inside a tab and view pager). What is making me going crazy is how to achieve the image behavior that come

BottomNavigationView is not full width

纵饮孤独 提交于 2019-11-27 22:57:25
问题 I am working on an Android app and implementing BottomNavigationView from the design library. I have looked at many examples and I can't figure out what is wrong with my layout. The BottomNavigationView is not displayed as full width. Another issue is the status bar color is not getting applied. activity_main.xml <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android

Bottom Sheet Fragment comes up with keyboard

泪湿孤枕 提交于 2019-11-27 18:50:47
I have an edit text inside a bottom sheet fragment. when the focus come on the edit text the layout goes up . i tried android:windowSoftInputMode="adjustNothing" its work for the parent activity but not for the dialog fragment. This is my bottom sheet class: public class CustomBottomSheetDialogFragment extends BottomSheetDialogFragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.content_dialog_bottom_sheet, container, false); getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams

Prevent dismissal of BottomSheetDialogFragment on touch outside

痞子三分冷 提交于 2019-11-27 14:39:21
I have implemented a BottomSheet Dialog and I want to prevent the bottomsheet from dismissing when the user touches outside of the bottomsheet when it's peeking (Not fully expanded state). I have set dialog.setCanceledOnTouchOutside(false); in the code but it doesn't seem to take any affect. Here's my BottomSheetDialogFragment class: public class ShoppingCartBottomSheetFragment extends BottomSheetDialogFragment { private BottomSheetBehavior.BottomSheetCallback mBottomSheetBehaviorCallback = new BottomSheetBehavior.BottomSheetCallback() { @Override public void onStateChanged(@NonNull View

ListView in BottomSheet

血红的双手。 提交于 2019-11-27 11:19:37
问题 I ran into a problem where I had a simple ListView in a BottomSheet and ListView had enough items to fill the screen and scroll even more. When I scroll down, everything seems to work however when I tried to scroll back up, it was scrolling the BottomSheet itself and closing the view instead of just scrolling the ListView . I was able to find a solution after a while and since I couldn't find it anywhere here, I figured I would post it here. 回答1: The solution is to extend the ListView like

Android ViewPager with RecyclerView works incorrectly inside BottomSheet

六月ゝ 毕业季﹏ 提交于 2019-11-27 10:37:57
问题 When I try to scroll list, sometimes this works incorrect - BottomSheet intercepts the scroll event and hides. How to reproduce this: Open Bottom Sheet Change a page of ViewPager Try scroll the list Result: BottomSheet will be hidden. Here is sample code: compile 'com.android.support:design:23.4.0' MainActivity.java package com.nkdroid.bottomsheetsample; import android.os.Bundle; import android.support.design.widget.BottomSheetBehavior; import android.support.design.widget.TabLayout; import