bottom-sheet

Android BottomSheetBehavior, how to disable snap?

ぐ巨炮叔叔 提交于 2019-12-22 09:59:29
问题 Standard android BottomSheetBehavior has tree state: hidden, collapsed and expanded. I want to allow user to "leave" bottom sheet between collapsed and expanded. Now, with the default behavior, it will snap to collapsed or expanded based which is closest. How should I disable this snap functionality? 回答1: I will present a way to achievie such functionality for a View extending BottomSheetDialogFragment . Expanding: First of all overrive onResume : @Override public void onResume() { super

Android BottomSheetDialogFragment does not expand completely

谁说胖子不能爱 提交于 2019-12-17 22:47:07
问题 I have the following test bottom sheet implementation. When I set the peekHeight to a value less than 500, it works. After some value, any increase in peek height will not change how the bottom sheet is expanded. It Just remains there to only drag manually. How do we set the peekHeight programmatically to ensure that the bottom sheet is auto expanded to the peek height. bottom_sheet_dialog_main <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns

How to adjust size of BottomSheet with Edittext and button below it?

♀尐吖头ヾ 提交于 2019-12-14 03:58:12
问题 I want to build a BottomSheet to display a view with button and edit text. If I click on the Edittext the Keyboard shows up but it hides the button which is below the edit text. These pics should show my problems 1)BottomSheet in normal view-First Image 2)BottomSheet hides the button- Second Image Here is my code for creating BottomSheet addNewListBottomSheet = new BottomSheetDialog(this, R.style.BottomSheetDialogTheme); View bottomSheetRootView = getLayoutInflater().inflate(R.layout

Unexpected namespace prefix “app” found for tag RelativeLayout - Android?

本秂侑毒 提交于 2019-12-13 11:59:11
问题 I need to use BottomSheetBehavior with ScrollView but it says to me : Unexpected namespace prefix "app" found for tag RelativeLayout app:behavior_hideable="true" app:behavior_peekHeight="80dp" Here is my 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.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent">

Flutter: Pushing back button should allow the app to go to background when BottomSheet is Open and keep the Bootomsheet in View

一笑奈何 提交于 2019-12-13 02:45:32
问题 I have asked similar question here and based on the feedback I got, have tried few approaches, but couldn't get it working, as the original question was little old and already closed, I am posting with my new findings. Ideally, this is what I am trying to achieve: If the Flutter Bottomsheet is open, I would like to keep it open and let the app go to background when the 'back' button is pushed, i.e. when the app is bought back I have Bottomsheet in view as is. Have a MyApp with a root

Android “Top Sheet” equivalent of “Bottom Sheet”?

自闭症网瘾萝莉.ら 提交于 2019-12-12 08:23:11
问题 I am wanting to implement a "Bottom Sheet" type of layout, but with a twist where the "bottom" sheet will be a MapFragment, which won't work very well as an up/down draggable view. I had a probably naive thought to "flip" the logic to a "Top Sheet" design, where you drag the Top Sheet up/down to show more/less of the bottom MapFragment. ie: From this... ...to [something like] this... Is this possible given the Support Design Tools, or will I have to roll something like this on my own? 回答1:

android soft keyboard overlays the edittext in recyclerview in bottomsheet

為{幸葍}努か 提交于 2019-12-12 04:13:21
问题 I have a few EditText in RecyclerView that is inside of a BottomSheetDialog . The problem I have now is that when BottomSheetDialog is shown on the screen, I tap on for example the 7th EditText in the RecyclerView . Soft keyboard appears and overlays the EditText , so I can't see what I type. but if I dragged the BottomSheetDialog a bit up, EditText then won't be covered by soft keyboard even if I tap on last EditText on the screen. RecyclerView is definitely resized in this case but doesn't

Bottom Sheet does not EXPANDED or COLLAPSED

断了今生、忘了曾经 提交于 2019-12-11 23:50:55
问题 I have created very simple Bottom Sheet at my tested project flowing this page .First i created my layout : <?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.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/mainContent" android:fitsSystemWindows="true" tools

BottomSheetDialogFragment: how to prevent NavigationBar dimming

一曲冷凌霜 提交于 2019-12-11 02:56:26
问题 in my theme for API 27 I want to have a white navigation bar, which works fine, but when I show my bottomSheetDialogFragment the system dimmend my navigation bar like in a Dialog. Is it without the new components from the new material theme possible to prevent the dimming from the navigation bar? Here are some code snippets: // Theme API 27 <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="android:windowLightNavigationBar">true</item> <item name="android

android: bottomsheet doesn't disappear normally

对着背影说爱祢 提交于 2019-12-10 23:59:31
问题 Edit: package com.walkindeep.teammanagerpreview; import android.content.Context; import android.os.Bundle; import android.support.design.widget.BottomSheetBehavior; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackbar; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.widget.Toolbar; import android.view.LayoutInflater; import android.view.View; import android.widget.ListView; import android.widget.SimpleAdapter;