[android] 天气app布局练习(三)

[android] 天气app布局练习(三),第1张

概述主要练习LinearLayout和layout_weight属性

主要练习linearLayout和layout_weight属性

<relativeLayout xmlns:androID="http://schemas.androID.com/apk/res/androID"    xmlns:tools="http://schemas.androID.com/tools"    androID:layout_wIDth="match_parent"    androID:layout_height    androID:background="#3186D9"    tools:context="${relativePackage}.${activityClass}" >    ImageVIEw        androID:layout_wIDth="wrap_content"        androID:layout_height        androID:layout_marginleft="10dp"        androID:layout_margintop        androID:src="@drawable/icon_home" />    TextVIEw                androID:layout_centerHorizontal="true"="12dp"        androID:text="北京"        androID:textcolor="#FDFDFD"         androID:layout_alignParentRight        androID:layout_marginRight="@drawable/icon_more" androID:ID="@+ID/tv_number"        androID:layout_wIDth="70dp"="29"="#fff"        androID:textSize="50sp"         androID:layout_aligntop="@ID/tv_number"        androID:layout_toRightOf="°"="#FDFDFD"="30sp" linearLayout        ="@+ID/ll_weather"        androID:layout_below        androID:orIEntation="horizontal" >        TextVIEw                        androID:layout_height            androID:layout_centerHorizontal            androID:text="多云"            androID:textcolor/>        =" | "="#bbb" ="空气优"/>    </linearLayout        androID:layout_alignParentBottom="vertical" linearLayout                        androID:layout_marginBottom="15dp"            androID:orIEntation>            linearLayout                                androID:layout_height                androID:layout_weight="1"                androID:gravity="center_horizontal"                androID:orIEntation>                TextVIEw                                        androID:layout_height                    androID:text="今天"                    androID:textcolor="#eee" />                ImageVIEw                                        androID:src="@drawable/icon_weather" ="20 /25°"/>            ="明天"="后天">        >        GrIDVIEw            ="@+ID/gv_airs"            androID:layout_wIDth            androID:background="#ddd"            androID:gravity="center"            androID:horizontalSpacing="1dp"            androID:ListSelector="@androID:color/transparent"            androID:numColumns="3"            androID:padding            androID:scrollbars="none"            androID:stretchMode="columnWIDth"            androID:verticalSpacing="1dp" >relativeLayout>

 

总结

以上是内存溢出为你收集整理的[android] 天气app布局练习(三)全部内容,希望文章能够帮你解决[android] 天气app布局练习(三)所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.54852.com/web/1121205.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-29
下一篇2022-05-29

发表评论

登录后才能评论

评论列表(0条)

    保存