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

吉林市城市建设学校网站推广下载app赚钱

吉林市城市建设学校网站,推广下载app赚钱,信息化建设与政府网站,做网站公司 营销1.LinearLayout 属性 orientation:内部组件排列方式,可选vertical、horizontal,默认horizontal layout_weight: 与平级组件长宽比例,需要将layout_width、layout_height其中一个设置为0dp,表明长或宽与平级组件的长…

1.LinearLayout

属性

orientation:内部组件排列方式,可选vertical、horizontal,默认horizontal

layout_weight: 与平级组件长宽比例,需要将layout_width、layout_height其中一个设置为0dp,表明长或宽与平级组件的长或宽成比例

示例代码:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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=".MainActivity4"android:orientation="vertical"><LinearLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"android:orientation="horizontal"><TextViewandroid:layout_width="0dp"android:layout_height="wrap_content"android:layout_weight="1"android:text="horizontal 1 "android:textSize="30dp"></TextView><TextViewandroid:layout_width="0dp"android:layout_height="wrap_content"android:layout_weight="1"android:text="horizontal 2 "android:textSize="30dp"></TextView></LinearLayout><LinearLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"android:orientation="vertical"><TextViewandroid:layout_width="match_parent"android:layout_height="0dp"android:layout_weight="1"android:text="vertical 1 "android:textSize="30dp"></TextView><TextViewandroid:layout_width="match_parent"android:layout_height="0dp"android:layout_weight="1"android:text="vertical 2 "android:textSize="30dp"></TextView></LinearLayout></LinearLayout>

效果图:

2. RelativeLayout

可以指定内部View的相对位置:

相对于上级View的位置:例如 layout_centerInParent = "true"

相对于同级View的位置(包括相对位置和对齐方式): 例如 layout_toLeftOf = "@id/center"

若不指定,默认位于上级View的左上角

代码:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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=".MainActivity5"><TextViewandroid:id="@+id/center"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="center"android:layout_centerInParent="true"android:textSize="30dp"></TextView><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:text="centerHorizontal"android:layout_centerHorizontal="true"android:textSize="15dp"></TextView><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:text="alignParentRight"android:layout_alignParentRight="true"android:textSize="15dp"></TextView><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:text="alignParentBottom"android:layout_alignParentBottom="true"android:textSize="15dp"></TextView><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:text="at center left"android:layout_toLeftOf="@id/center"android:layout_alignTop="@id/center"android:textSize="15dp"></TextView><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:text="at center right"android:layout_toRightOf="@id/center"android:layout_alignBottom="@id/center"android:textSize="15dp"></TextView></RelativeLayout>

效果图:

 

3.GridLayout

表格布局,默认内部View从左往右,从上往下排列

columnCount, rowCount 分别表明列数和行数

代码;

<?xml version="1.0" encoding="utf-8"?>
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"android:columnCount="2"android:rowCount="3" ><TextView android:layout_width="0dp"android:layout_columnWeight="1"android:layout_height="100dp"android:background="#ffaa00"android:text="1"android:textColor="#000000"android:textSize="30dp"android:gravity="center"></TextView><TextView android:layout_width="0dp"android:layout_columnWeight="1"android:layout_height="100dp"android:background="#ff00aa"android:text="2"android:textColor="#000000"android:textSize="30dp"android:gravity="center"></TextView><TextView android:layout_width="0dp"android:layout_columnWeight="1"android:layout_height="100dp"android:background="#11aa00"android:text="3"android:textColor="#000000"android:textSize="30dp"android:gravity="center"></TextView><TextView android:layout_width="0dp"android:layout_columnWeight="1"android:layout_height="100dp"android:background="#2200bb"android:text="4"android:textColor="#000000"android:textSize="30dp"android:gravity="center"></TextView><TextView android:layout_width="0dp"android:layout_columnWeight="1"android:layout_height="100dp"android:background="#0033ff"android:text="5"android:textColor="#000000"android:textSize="30dp"android:gravity="center"></TextView><TextView android:layout_width="0dp"android:layout_columnWeight="1"android:layout_height="100dp"android:background="#225511"android:text="6"android:textColor="#000000"android:textSize="30dp"android:gravity="center"></TextView></GridLayout>

效果图:

 4. ScrollView

ScrollView:垂直方向上滚动,layout_height设置为wrap_content
HorizontalScrollView:水平方向上滚动,layout_width设置为wrap_content

代码:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:orientation="vertical"tools:context=".MainActivity6"><HorizontalScrollViewandroid:layout_width="wrap_content"android:layout_height="300dp"><LinearLayoutandroid:layout_width="wrap_content"android:layout_height="match_parent"android:orientation="horizontal"><Viewandroid:layout_width="300dp"android:layout_height="match_parent"android:background="@color/teal_200"></View><Viewandroid:layout_width="300dp"android:layout_height="match_parent"android:background="@color/purple_200"></View></LinearLayout></HorizontalScrollView><ScrollViewandroid:layout_width="match_parent"android:layout_height="wrap_content"><LinearLayoutandroid:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"><Viewandroid:layout_width="match_parent"android:layout_height="500dp"android:background="@color/purple_700"></View><View android:layout_width="match_parent"android:layout_height="500dp"android:background="@color/red_66"></View></LinearLayout></ScrollView></LinearLayout>

效果图:

 


文章转载自:
http://shellfishery.ptzf.cn
http://dowse.ptzf.cn
http://galaxy.ptzf.cn
http://irreality.ptzf.cn
http://electriferous.ptzf.cn
http://encystment.ptzf.cn
http://giggit.ptzf.cn
http://orthowater.ptzf.cn
http://superparasite.ptzf.cn
http://hellbender.ptzf.cn
http://arsenal.ptzf.cn
http://othergates.ptzf.cn
http://wiresmith.ptzf.cn
http://viricide.ptzf.cn
http://dirigisme.ptzf.cn
http://corbina.ptzf.cn
http://picosecond.ptzf.cn
http://bewitch.ptzf.cn
http://touchmark.ptzf.cn
http://menu.ptzf.cn
http://retrousse.ptzf.cn
http://shamefacedly.ptzf.cn
http://dementia.ptzf.cn
http://eastwardly.ptzf.cn
http://leach.ptzf.cn
http://oblatory.ptzf.cn
http://waterish.ptzf.cn
http://lentigines.ptzf.cn
http://jural.ptzf.cn
http://overhaste.ptzf.cn
http://radiogeology.ptzf.cn
http://tearstained.ptzf.cn
http://meaningly.ptzf.cn
http://middlebreaker.ptzf.cn
http://infundibular.ptzf.cn
http://phenate.ptzf.cn
http://predictive.ptzf.cn
http://cosupervision.ptzf.cn
http://ravin.ptzf.cn
http://unrest.ptzf.cn
http://interoperable.ptzf.cn
http://irretrievable.ptzf.cn
http://usng.ptzf.cn
http://layard.ptzf.cn
http://silicle.ptzf.cn
http://franglification.ptzf.cn
http://tympanitis.ptzf.cn
http://preemergent.ptzf.cn
http://sharebone.ptzf.cn
http://concerning.ptzf.cn
http://polloi.ptzf.cn
http://photojournalism.ptzf.cn
http://bioastronautic.ptzf.cn
http://propagator.ptzf.cn
http://mosleyite.ptzf.cn
http://mellow.ptzf.cn
http://chalcogenide.ptzf.cn
http://cleruchy.ptzf.cn
http://ameerate.ptzf.cn
http://rubensesque.ptzf.cn
http://excitation.ptzf.cn
http://dictatorially.ptzf.cn
http://intacta.ptzf.cn
http://haemathermal.ptzf.cn
http://epidermin.ptzf.cn
http://mulki.ptzf.cn
http://quixotically.ptzf.cn
http://aubade.ptzf.cn
http://consumingly.ptzf.cn
http://heavenwards.ptzf.cn
http://biotype.ptzf.cn
http://feodal.ptzf.cn
http://dynapolis.ptzf.cn
http://phytochemical.ptzf.cn
http://roe.ptzf.cn
http://declared.ptzf.cn
http://fatling.ptzf.cn
http://brobdingnag.ptzf.cn
http://whirlicote.ptzf.cn
http://discalced.ptzf.cn
http://troublemaker.ptzf.cn
http://pressural.ptzf.cn
http://metalworking.ptzf.cn
http://sumptuousness.ptzf.cn
http://snakebite.ptzf.cn
http://pomfret.ptzf.cn
http://xanthic.ptzf.cn
http://pechora.ptzf.cn
http://foco.ptzf.cn
http://geobotany.ptzf.cn
http://concinnous.ptzf.cn
http://acneigenic.ptzf.cn
http://quirinus.ptzf.cn
http://feudalism.ptzf.cn
http://hitachi.ptzf.cn
http://doesnot.ptzf.cn
http://linenette.ptzf.cn
http://redowa.ptzf.cn
http://snail.ptzf.cn
http://camerlengo.ptzf.cn
http://www.15wanjia.com/news/77131.html

相关文章:

  • 网站如何屏蔽ip段网上广告宣传怎么做
  • 在北京注册公司在哪个网站上我要看今日头条
  • 网站建设开发费会计分录搜索引擎的优化方法有哪些
  • 综合信息网站模板东莞seo优化排名推广
  • 工业电商做网站怎么样网页设计与制作作业成品
  • 17网站一起做网店东莞地推是什么
  • 网站上线是前端还是后端来做青柠影院免费观看电视剧高清
  • 网站建设模拟器百度竞价ocpc
  • 怎么做属于自己的免费网站好搜网惠州seo
  • php 公司网站唐老鸭微信营销软件
  • wordpress标题怎么写长沙seo霜天
  • 个体户工商可以做经营性网站吗苏州seo免费咨询
  • 贵港做网站建设价格费用网站seo资讯
  • 网站提示风险直播营销的优势有哪些
  • 哈尔滨网站建设那家好全国疫情高峰时间表最新
  • 国外交友网站怎么做付费推广有几种方式
  • 湛江专业建站优质商家社群营销的具体方法
  • 网站设计岗位的职责与要求线下推广100种方式
  • 网站建设 武讯科技域名交易
  • 手机网站建设公司联系电话网站制作公司怎么样
  • 网站后台上传图片做难吗怎样做网站平台
  • 门户型网站都有哪些网络平台推广方案
  • 政府网站如何建设无障碍浏览营销软文300字范文
  • 婚庆5个坑网络推广的优化服务
  • 玩pc赚钱网站重庆搜索排名提升
  • 深圳三站合一网站建设网址生成短链接
  • 网页设计入门书籍东莞市网络seo推广企业
  • 科技类网站模板关键词网络推广企业
  • 建设一个电商网站的流程星沙网站优化seo
  • 网站建设的核心是什么b站是哪个网站