当前位置: 首页 > wzjs >正文

珠海高端网站建设公司参考文献网站开发

珠海高端网站建设公司,参考文献网站开发,网站项目建设所需成本,qq群引流推广平台关于如何在 ConstraintLayout 中将 ViewPager 始终置于 ll_title标题栏 的下方。。 如何将 ViewPager 始终置于 ll_title 下方 在 ConstraintLayout 中&#xff0c;可以通过约束来实现 ViewPager 始终位于 ll_title 标题栏的下方。以下是修改后的布局代码&#xff1a; <?…

关于如何在 ConstraintLayout 中将 ViewPager 始终置于 ll_title标题栏 的下方。。

如何将 ViewPager 始终置于 ll_title 下方

ConstraintLayout 中,可以通过约束来实现 ViewPager 始终位于 ll_title 标题栏的下方。以下是修改后的布局代码:

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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"android:background="@color/white"><!-- 标题栏 --><RelativeLayoutandroid:id="@+id/ll_title"android:layout_width="match_parent"android:layout_height="wrap_content"app:layout_constraintTop_toTopOf="parent"app:layout_constraintLeft_toLeftOf="parent"app:layout_constraintRight_toRightOf="parent"><LinearLayoutandroid:id="@+id/ll_title_part"android:layout_width="match_parent"android:layout_height="48dp"android:padding="5dp"android:orientation="horizontal"><ImageViewandroid:id="@+id/commonTitle_iv_back"android:layout_width="wrap_content"android:layout_height="match_parent"android:gravity="center"android:layout_marginTop="-10dp"android:padding="10dp"android:src="@drawable/smssdk_ic_popup_dialog_close" /></LinearLayout></RelativeLayout><!-- ViewPager --><android.support.v4.view.ViewPagerandroid:id="@+id/view_pager"android:layout_width="match_parent"android:layout_height="0dp"app:layout_constraintTop_toBottomOf="@id/ll_title"app:layout_constraintBottom_toBottomOf="parent"app:layout_constraintLeft_toLeftOf="parent"app:layout_constraintRight_toRightOf="parent" />
</android.support.constraint.ConstraintLayout>

关键点说明

  1. ll_title 的约束

    • app:layout_constraintTop_toTopOf="parent":将 ll_title 置于顶部。

    • app:layout_constraintLeft_toLeftOf="parent"app:layout_constraintRight_toRightOf="parent":让 ll_title 横向充满父布局。

  2. ViewPager 的约束

    • app:layout_constraintTop_toBottomOf="@id/ll_title":将 ViewPager 的顶部约束到 ll_title 的底部。

    • app:layout_constraintBottom_toBottomOf="parent":将 ViewPager 的底部约束到父布局的底部。

    • app:layout_constraintLeft_toLeftOf="parent"app:layout_constraintRight_toRightOf="parent":让 ViewPager 横向充满父布局。

    • android:layout_height="0dp":通过约束来分配高度,确保 ViewPager 填充剩余空间。

注意事项

  • 确保 ll_title 的高度不会过大,否则可能会挤压 ViewPager 的显示空间。

  • 如果 ViewPager 的内容较多,可以考虑设置滚动条或分页指示器,以提升用户体验。

通过上述布局代码,ViewPager 将始终位于 ll_title 的下方,并且会自动填充剩余空间。


文章转载自:

http://kdN7xEHg.ssmhn.cn
http://LNcNLVoN.ssmhn.cn
http://nwRVfVlv.ssmhn.cn
http://oyDxCZJP.ssmhn.cn
http://2ZPgm8iz.ssmhn.cn
http://IChTSPcN.ssmhn.cn
http://m2oxjw5p.ssmhn.cn
http://9FMdYF3m.ssmhn.cn
http://cWiZcM7V.ssmhn.cn
http://ExgoDvEg.ssmhn.cn
http://Iz3ObhQw.ssmhn.cn
http://ZQfofbSq.ssmhn.cn
http://pz6OOYMh.ssmhn.cn
http://dAHlzirr.ssmhn.cn
http://Xk0M2TmA.ssmhn.cn
http://hQ6WS27G.ssmhn.cn
http://TxzysRRJ.ssmhn.cn
http://5M1z3DZf.ssmhn.cn
http://hZbHRcBP.ssmhn.cn
http://dRFP5lyQ.ssmhn.cn
http://iOTCenJc.ssmhn.cn
http://F3KUeSW5.ssmhn.cn
http://OKoGvlrz.ssmhn.cn
http://Kn2TdNSP.ssmhn.cn
http://je24iDvd.ssmhn.cn
http://AhwoKs2A.ssmhn.cn
http://c7uRzQmH.ssmhn.cn
http://NiSXaf60.ssmhn.cn
http://ZSYQS3Et.ssmhn.cn
http://XXJlFie7.ssmhn.cn
http://www.dtcms.com/wzjs/714014.html

相关文章:

  • 平板网站开发如何在网站页面做标注
  • 电子商务网站APP名聚优品 一家只做正品的网站
  • 陵水网站建设宁波网站建设制作方法
  • 找做cad彩拼的网站wordpress右浮动
  • 深圳 网站制作 哪家织梦网站栏目管理
  • 郑州网站建做视频搬运哪个网站最赚钱
  • 宁波市江北区建设局网站网站做支付需要准备什么条件
  • 西安摩高网站建设德州做网站建设的公司
  • 漯河哪里做网站重庆传媒公司
  • 兰州房地产网站建设济南智能网站建设
  • 闵行区网站开发wordpress攻防
  • 网站500镇江 网站
  • 做外贸网站用什么空间五台网站建设
  • 焦作做网站公司天元建设集团有限公司商票逾期
  • 国外房屋设计网站淘宝开网店怎么运营
  • 佛山网站商城建设专业 网站设计
  • 中国建设会计协会网站企业网站策划应该怎么做
  • 什么网站可以做新闻听写常见的网站建设技术
  • 邯郸网站改版找谁做传媒公司制作网站
  • 网站的营销方案wordpress 个人简介 换行
  • 国家重大项目建设库网站太原网站建设注意
  • 广州网站设计公司哪里济南兴田德润怎么联系汽车制造行业网站模板
  • 不懂网站建设.怎么销售宁波市建设工程检测协会网站
  • 官方网站建设专家磐石网络深圳企业网站制作维护
  • 企业网站设计的基本原则有哪些ae如何做视频模板下载网站
  • 兰州做网站改版的公司百度联盟是什么
  • 东莞高端网站建设多少钱如何跟客户介绍网站建设和推广
  • 网站keyword如何排列flash是怎么做网站的
  • 网站界面设计起着决定性作用wordpress增加关键词和描述
  • iis搭建网站时网站访客qq抓取统计系统