您现在的位置是:主页 > news > 如何做付费阅读网站/全网营销是什么意思

如何做付费阅读网站/全网营销是什么意思

admin2025/5/2 12:39:46news

简介如何做付费阅读网站,全网营销是什么意思,兰州市做网站的公司有哪些,坑梓网站建设基本流程我有一个Android活动,它使用CoordinatorLayout内的CollapsingToolbarLayout来实现滚动/折叠工具栏,其中图像作为背景/横幅.图像是从互联网上加载的,我事先并不知道它的大小.我希望工具栏最初是一定高度(160dp),但如果图像大于此值,我希望允许用户进一步向下滚动以显示图像的其余…

如何做付费阅读网站,全网营销是什么意思,兰州市做网站的公司有哪些,坑梓网站建设基本流程我有一个Android活动,它使用CoordinatorLayout内的CollapsingToolbarLayout来实现滚动/折叠工具栏,其中图像作为背景/横幅.图像是从互联网上加载的,我事先并不知道它的大小.我希望工具栏最初是一定高度(160dp),但如果图像大于此值,我希望允许用户进一步向下滚动以显示图像的其余…

我有一个

Android活动,它使用CoordinatorLayout内的CollapsingToolbarLayout来实现滚动/折叠工具栏,其中图像作为背景/横幅.

图像是从互联网上加载的,我事先并不知道它的大小.

我希望工具栏最初是一定高度(160dp),但如果图像大于此值,我希望允许用户进一步向下滚动以显示图像的其余部分.但是,这绝不应该自动发生.初始状态是160dp高度,但用户应该能够向下滚动以进一步增加图像的高度.

我似乎无法找到正确的高度/ minheight组合来实现这一目标.这甚至可能吗?

这是我的布局:

xmlns:app="http://schemas.android.com/apk/res-auto"

android:orientation="vertical"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:fitsSystemWindows="true"

android:background="@color/toolbar_text">

android:id="@+id/coordinatorLayout"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:fitsSystemWindows="true">

android:id="@+id/appBarLayout"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:fitsSystemWindows="true">

android:id="@+id/collapsing_toolbar"

android:layout_width="match_parent"

android:layout_height="match_parent"

app:layout_scrollFlags="scroll|exitUntilCollapsed"

app:contentScrim="?attr/colorPrimary"

android:fitsSystemWindows="true">

android:id="@+id/imgBanner"

android:layout_width="match_parent"

android:layout_height="160dp"

android:scaleType="centerCrop"

android:fitsSystemWindows="true"

app:layout_collapseMode="parallax"/>

android:id="@+id/toolbar"

android:layout_width="match_parent"

android:layout_height="?attr/actionBarSize"

app:layout_collapseMode="pin"

app:theme="@style/AppToolbarTheme" />

android:layout_width="match_parent"

android:layout_height="match_parent"

android:layout_gravity="fill_vertical"

android:clipToPadding="false"

app:layout_behavior="@string/appbar_scrolling_view_behavior" >

...

横幅图像的高度设置为160dp,它控制工具栏最初的大小,但显然这样我无法将其扩展到160dp以上,因为这是视图的高度.

我尝试将160dp高度设置为CollapsingToolbarLayout或AppBarLayout但没有任何帮助,它总是最大160dp的高度我只能向上滚动(较小的图像)而不是向下,即使图像更大并且ImageView设置为缩放为wrap_content.

这是我想要实现的图纸,如果不清楚的话: