
<androID.support.design.Widget.CollapsingToolbarLayout androID:ID="@+ID/collapsing_toolbar" androID:layout_wIDth="match_parent" androID:layout_height="300dp" androID:fitsSystemwindows="true" app:contentScrim="@color/them_color" app:expandedTitleTextAppearance="@androID:color/transparent" app:layout_scrollFlags="scroll|exitUntilCollapsed"> <ImageVIEw androID:ID="@+ID/header_image" androID:layout_wIDth="match_parent" androID:layout_height="300dp" androID:contentDescription="@string/app_name" androID:fitsSystemwindows="true" androID:scaleType="fitXY" app:layout_collapseMode="parallax"/> <androID.support.v7.Widget.Toolbar androID:ID="@+ID/toolbar" androID:layout_wIDth="match_parent" androID:layout_height="?androID:attr/actionbarSize" app:layout_collapseMode="pin" app:contentInsetleft="0dp" app:popuptheme="@style/themeOverlay.AppCompat.light"/> </androID.support.design.Widget.CollapsingToolbarLayout>
我试过app:collapsedTitleGravity =“center”但它没有解决问题.我怎样才能让它在牛轧糖上起作用?
解决方法 问题是 reported.除了fitsSystemwindows之外,还有更好的选择,只需添加到onCreate collapsingToolbarLayout.post {collapsingToolbarLayout.requestLayout()}
总结以上是内存溢出为你收集整理的android – 在Nougat上运行时,为什么在使用CollapsingToolbarLayout时标题会被切断?全部内容,希望文章能够帮你解决android – 在Nougat上运行时,为什么在使用CollapsingToolbarLayout时标题会被切断?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)