android-support-design

Using BottomSheetBehavior with a inner CoordinatorLayout

十年热恋 提交于 2021-01-20 14:12:28
问题 The design support library v. 23.2 introduced BottomSheetBehavior , which allows childs of a coordinator to act as bottom sheets (views draggable from the bottom of the screen). What I’d like to do is to have, as a bottom sheet view , the following view (the typical coordinator + collapsing stuff): <CoordinatorLayout app:layout_behavior=“@string/bottom_sheet_behavior”> <AppBarLayout> <CollapsingToolbarLayout> <ImageView /> </CollapsingToolbarLayout> </AppBarLayout> <NestedScrollView>

Using BottomSheetBehavior with a inner CoordinatorLayout

本秂侑毒 提交于 2021-01-20 14:09:18
问题 The design support library v. 23.2 introduced BottomSheetBehavior , which allows childs of a coordinator to act as bottom sheets (views draggable from the bottom of the screen). What I’d like to do is to have, as a bottom sheet view , the following view (the typical coordinator + collapsing stuff): <CoordinatorLayout app:layout_behavior=“@string/bottom_sheet_behavior”> <AppBarLayout> <CollapsingToolbarLayout> <ImageView /> </CollapsingToolbarLayout> </AppBarLayout> <NestedScrollView>

TabLayout position at the bottom of the screen

一笑奈何 提交于 2020-04-17 13:03:44
问题 I'm using android.support.design.widget and I need to set the position of TabLayout at the activity_main.xml in the bottom of the screen . I've seen that you can use TabHost, but I prefer to use android.support.design ativity_main.xml <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> <android.support.design.widget.TabLayout android:id="@+id/tabs" android:layout

TabLayout position at the bottom of the screen

对着背影说爱祢 提交于 2020-04-17 13:02:28
问题 I'm using android.support.design.widget and I need to set the position of TabLayout at the activity_main.xml in the bottom of the screen . I've seen that you can use TabHost, but I prefer to use android.support.design ativity_main.xml <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> <android.support.design.widget.TabLayout android:id="@+id/tabs" android:layout

Changing Toolbar and CollapsingToolbarLayout scroll flags programmatically

≯℡__Kan透↙ 提交于 2020-04-09 08:53:35
问题 I have a single Activity android app with lots of fragments. When I'm showing a list screen I want to use the Toolbar with the, app:layout_scrollFlags="scroll|enterAlways" property. And in the detail fragments I want to use the CollapsingToolbarLayout with an image in it. Since it's a single Activity app, I have only one Toolbar . Is it possible to modify my layout programmatically to suit both cases? 回答1: Yes. Let's say you are going from the CollapsingToolbarLayout fragment to the Toolbar

Changing Toolbar and CollapsingToolbarLayout scroll flags programmatically

允我心安 提交于 2020-04-09 08:49:01
问题 I have a single Activity android app with lots of fragments. When I'm showing a list screen I want to use the Toolbar with the, app:layout_scrollFlags="scroll|enterAlways" property. And in the detail fragments I want to use the CollapsingToolbarLayout with an image in it. Since it's a single Activity app, I have only one Toolbar . Is it possible to modify my layout programmatically to suit both cases? 回答1: Yes. Let's say you are going from the CollapsingToolbarLayout fragment to the Toolbar

Changing Toolbar and CollapsingToolbarLayout scroll flags programmatically

安稳与你 提交于 2020-04-09 08:48:28
问题 I have a single Activity android app with lots of fragments. When I'm showing a list screen I want to use the Toolbar with the, app:layout_scrollFlags="scroll|enterAlways" property. And in the detail fragments I want to use the CollapsingToolbarLayout with an image in it. Since it's a single Activity app, I have only one Toolbar . Is it possible to modify my layout programmatically to suit both cases? 回答1: Yes. Let's say you are going from the CollapsingToolbarLayout fragment to the Toolbar

Changing Toolbar and CollapsingToolbarLayout scroll flags programmatically

房东的猫 提交于 2020-04-09 08:42:51
问题 I have a single Activity android app with lots of fragments. When I'm showing a list screen I want to use the Toolbar with the, app:layout_scrollFlags="scroll|enterAlways" property. And in the detail fragments I want to use the CollapsingToolbarLayout with an image in it. Since it's a single Activity app, I have only one Toolbar . Is it possible to modify my layout programmatically to suit both cases? 回答1: Yes. Let's say you are going from the CollapsingToolbarLayout fragment to the Toolbar

OnUnhandledKeyEventListener class not found

落爺英雄遲暮 提交于 2020-02-03 10:58:02
问题 I am having error on every support design widget. Like the recyclerview, coordinator layout etc. Everytime, I add a support design widget it is showing java.lang.ClassNotFoundException: android.view.View$OnUnhandledKeyEventListener on layout issue section. I'm using api 28.0.0-rc01, gradle 4.4 android 3.1.4. Here, is my build.gradle (app) file apply plugin: 'com.android.application' android { compileSdkVersion 28 defaultConfig { applicationId "com.example.android.test5test" minSdkVersion 23

OnUnhandledKeyEventListener class not found

青春壹個敷衍的年華 提交于 2020-02-03 10:54:31
问题 I am having error on every support design widget. Like the recyclerview, coordinator layout etc. Everytime, I add a support design widget it is showing java.lang.ClassNotFoundException: android.view.View$OnUnhandledKeyEventListener on layout issue section. I'm using api 28.0.0-rc01, gradle 4.4 android 3.1.4. Here, is my build.gradle (app) file apply plugin: 'com.android.application' android { compileSdkVersion 28 defaultConfig { applicationId "com.example.android.test5test" minSdkVersion 23