android-collapsingtoolbarlayout 相关问题

CollapsingToolbarLayout是工具栏的包装器,它提供了几个绑定到内容滚动事件的视觉效果。

一个协调器布局上的多个应用栏布局

我想要一个像 Telegram 那样的聊天个人资料屏幕。但有些部分我看不懂。对于那些可能不知道的人来说,它有一个可折叠工具栏,后面有一个滚动内容区域......

回答 1 投票 0

我怎样才能用ReactNative制作像CollapsingToolbarLayout这样的视图?

我想要一个这样的视图,或者喜欢这个视频 我使用了react-native-collapsible-tab-view,但它有错误。 我可以用react-native-reanimated和react-native-gesture-handler来实现吗? 这是

回答 1 投票 0

使用Jetpack compose实现CollapsingToolbar

我正在尝试使用 Jetpack compose 在详细信息屏幕中实现折叠工具栏:https://github.com/alirezaeiii/Compose-MultiModule-Cache/blob/master/feature_list/src/main/java/com/android/是...

回答 1 投票 0

Android:Recyclerview 滚动并出现折叠工具栏问题

在我的应用程序中,我使用 CollapsingtoolbarLayout 和 RecyclerView。两人都在工作。但我在滚动它们时遇到问题。我想要的是每当我直接滚动 RecyclerView 时我想要...

回答 1 投票 0

Android 折叠工具栏有太多填充

我有一个折叠工具栏设置如下: 我有一个折叠工具栏,如下所示: <android.support.design.widget.CollapsingToolbarLayout android:id="@+id/collapsing_toolbar" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" app:collapsedTitleGravity="right" app:paddingStart="5dp" app:titleEnabled="true" app:expandedTitleGravity="top|center_horizontal" app:contentScrim="?attr/colorPrimary" app:layout_scrollFlags="scroll|exitUntilCollapsed|snap" app:expandedTitleMarginEnd="0dp" app:expandedTitleMarginStart="0dp" app:expandedTitleMarginTop="0dp"> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> <ImageView android:id="@+id/backdrop" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" android:scaleType="centerCrop" app:layout_collapseMode="parallax"/> <com.ashojash.android.customview.VenueScoreIndicator android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignParentBottom="true" android:id="@+id/venueScoreIndicator"/> </RelativeLayout> <!-- As our statusBar is transparent below and content is moved behind our toolbar has to include the padding on top so we use this area --> <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:paddingRight="8dp" app:layout_collapseMode="pin" app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/> </android.support.design.widget.CollapsingToolbarLayout> </android.support.design.widget.AppBarLayout> 正如您所看到的,折叠标题的顶部和底部有一些额外的填充,我没有看到任何将 app:collapsedTitlePaddingTop 设置为 0dp 的选项。 我错过了什么? 删除所有边距 只需使用 app:expandedTitleMargin="@dimen/your_dimen_value" 我认为问题在于 RelativeLayout 和 match_parent 高度。尝试删除它,如果问题解决了,请以某种方式编写没有match_parent高度的布局 请尝试一下......这会有帮助 <?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:id="@+id/main_content" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/white"> <android.support.design.widget.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" app:layout_scrollFlags="scroll|enterAlways|snap" app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /> <android.support.design.widget.TabLayout android:id="@+id/tabLayout" android:layout_width="match_parent" android:layout_height="wrap_content" /> </android.support.design.widget.AppBarLayout> <android.support.v4.view.ViewPager android:id="@+id/viewPager" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior" /> </android.support.design.widget.CoordinatorLayout>

回答 3 投票 0

折叠工具栏折叠和展开时状态栏颜色发生变化

我有一个要求,比如当折叠的工具栏展开时,状态栏颜色应该是透明的,当工具栏折叠时,状态栏应该获得主题颜色。有很多关系...

回答 1 投票 0

折叠工具栏布局的渲染问题

我有一个项目,其中一个片段使用折叠工具栏布局。 直到最近,一切都很好。但上次我在 Android Studio 中遇到了折叠工具栏渲染的问题

回答 1 投票 0

如何使工具栏背景透明

我设置了折叠工具栏,一切都按预期工作。只有一个问题,当工具栏折叠时,工具栏后面有一个白色的矩形视图,如图...

回答 1 投票 0

Jetpack compose 中的折叠工具栏

如何使用 Jetpack compose 构建 Instagram 个人资料页面。我已经尝试了多个库,如 NestedScrollView、CollapsingToolbar 来获得可折叠/可滚动的顶栏,但它们看起来并不漂亮......

回答 2 投票 0

视差和引脚折叠模式在折叠工具栏布局中不起作用

这是我的测试项目的代码:- 主要活动 包 com.invento.defcomm.collapsingtoolbarlayout; 导入 android.support.design.widget.CollapsingToolbarLayout; 导入 android.support.v7.app。

回答 2 投票 0

如何像Watsapp一样通过tablayout实现折叠工具栏

Xml 文件 Xml 文件 <?xml version="1.0" encoding="utf-8"?> <androidx.coordinatorlayout.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" tools:context=".MainActivity"> <com.google.android.material.appbar.AppBarLayout android:id="@+id/app_bar_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:fitsSystemWindows="true" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> <com.google.android.material.appbar.CollapsingToolbarLayout android:id="@+id/collapsingToolbar" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_scrollFlags="scroll|exitUntilCollapsed"> <androidx.appcompat.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/app_name" android:textSize="22sp" android:textColor="@color/black" /> </androidx.appcompat.widget.Toolbar> </com.google.android.material.appbar.CollapsingToolbarLayout> <com.google.android.material.tabs.TabLayout android:id="@+id/tab_layout" android:layout_width="match_parent" android:layout_height="wrap_content" app:layout_collapseMode="pin" /> </com.google.android.material.appbar.AppBarLayout> <androidx.viewpager2.widget.ViewPager2 android:id="@+id/view_pager" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"/> </androidx.coordinatorlayout.widget.CoordinatorLayout> 在 Watsapp 主屏幕中,当用户向上滚动时,工具栏会消失,只有选项卡布局可见。我只是想实现这个功能。我浏览了很多 youtube 教程但找不到任何解决方案。 类似这样的东西 - 将工具栏放入 CollapsingToolbarLayout 将 app:layout_scrollFlags="scroll|exitUntilCollapsed" 添加到折叠工具栏 从工具栏中删除app:layout_collapseMode="pin" 将 app:layout_collapseMode="pin" 添加到选项卡 将 app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" 添加到您的视图页面

回答 1 投票 0

折叠工具栏折叠时图像模糊

我的工具栏需要一些帮助。 现在我使用带有图像的折叠工具栏,当我向上滚动时该工具栏会折叠。 我知道我可以使用 contentScrim 使工具栏透明,因此可以看到

回答 1 投票 0

折叠工具栏布局不会折叠

我有一个折叠的工具栏布局,它有两个问题: 1)它是静态的,不会崩溃,我找不到原因 2) recyclerview 中的最后一行显示一半

回答 4 投票 0

仅在向上滚动时在折叠工具栏布局中启用快速滚动

仅当滚动方向向上时,我才尝试在应用栏布局中的折叠工具栏中启用快速滚动。就像向上滚动 50% 的应用栏内容应该展开或折叠工具栏。

回答 0 投票 0

如何在坐标布局中修改 Imageview 的行为

我希望我的 imageView 在折叠工具栏达到一定高度时消失

回答 1 投票 0

折叠工具栏不能钉住卡片视图

我创建了一个XML,其中包含appbar布局、带imageeview的折叠工具栏布局和嵌套滚动视图,以便预先实现视差滚动。然而,我想在里面添加一个carview ...

回答 1 投票 0

Collapsingtoolbar和cardview格式不正确

我正在尝试制作一个Android应用,该应用的上半部分具有地图,并且具有可折叠的工具栏以及Cardview列表。由于某些原因,我似乎无法使该应用正常运行。工具栏有巨大的空白...

回答 2 投票 0

Collapsingtoolbar与标题栏有很大的距离,并且卡片视图列表中的项目相距很远

我正在尝试制作一个Android应用,该应用的上半部分具有地图,并且具有可折叠的工具栏以及Cardview列表。由于某些原因,我似乎无法使该应用正常运行。工具栏有巨大的空白...

回答 2 投票 0

将折叠的工具栏与地图一起使用时,Cardview列表会覆盖整个屏幕

我正在尝试制作一个Android应用,该应用的上半部分具有地图,并且具有可折叠的工具栏以及Cardview列表。由于某些原因,我似乎无法使该应用正常运行。工具栏位于...

回答 1 投票 0

完全展开时折叠式工具栏底部的工具栏菜单项

我的菜单中有项目,但它本身在折叠的工具栏中。我想做的是,当折叠工具栏折叠时,菜单项在顶部,当...

回答 1 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.