gpt4 book ai didi

android - appBarLayout 中的图像

转载 作者:太空宇宙 更新时间:2023-11-03 11:39:16 26 4
gpt4 key购买 nike

我想要实现的结果与图片上的结果几乎相同,但没有折叠并且在工具栏文本下有选项卡布局。我使用 CollapsingTollbarLayout 完成了它,但如果我不希望它折叠,我认为这不是一个好方法。我应该如何正确实现图像,使其位于工具栏和选项卡布局下?

Example

最佳答案

好的,这是解决方案:

 <android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

<ImageView
android:id="@+id/imageViewplaces"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/pyrros" />

<android.support.design.widget.TabLayout
android:id="@+id/caj_tab_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/imageViewplaces"
android:elevation="6dp"
android:minHeight="?attr/actionBarSize"
app:tabTextAppearance="@style/MineCustomTabText"
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"
app:popupTheme="@style/AppTheme.PopupOverlay"
android:layout_marginTop="12dp"
app:titleTextAppearance="@style/Toolbar.TitleText" />

</RelativeLayout>


</android.support.design.widget.AppBarLayout>

关于android - appBarLayout 中的图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35479532/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com