安卓app_sl3.9表格布局与线性布局实现分类工具栏
style.xml
<?xml version="1.0" encoding="utf-8"?> <resources> <style name="text"> <item name="android:textColor">#000</item> <item name="android:textSize">30px</item> </style> </resources>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/tableLayout1" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="10px" android:background="@drawable/background" tools:context="com.example.sl3_9.MainActivity" > <!-- row1 --> <TableRow android:id="@+id/tableRow1" android:layout_width="fill_parent" android:layout_weight="1" > <LinearLayout android:id="@+id/linearLayout1" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="1" android:orientation="horizontal" android:background="@drawable/blockbg_big" > <TextView android:id="@+id/textView1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center" android:text="@string/time" /> </LinearLayout> <LinearLayout android:id="@+id/linearLayout2" android:layout_height="fill_parent" android:layout_weight="1" android:orientation="horizontal" android:padding="20px" android:background="@drawable/blockbg_big" > <ImageView android:id="@+id/imageView1" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="1" android:src="@drawable/img01" /> <ImageView android:id="@+id/imageView2" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="1" android:src="@drawable/img02" /> <ImageView android:id="@+id/imageView3" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/img03a" /> </LinearLayout> </TableRow> <!-- row2 --> <TableRow android:id="@+id/tableRow2" android:layout_width="fill_parent" android:layout_weight="1" > <LinearLayout android:orientation="horizontal" android:id="@+id/linearLayout3" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="1" android:background="@drawable/blockbg_big" > <ImageView android:id="@+id/imageView4" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="1" android:src="@drawable/img04" /> <ImageView android:id="@+id/imageView5" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="1" android:src="@drawable/img05" /> <ImageView android:id="@+id/imageView6" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="1" android:src="@drawable/img06" /> </LinearLayout> <LinearLayout android:orientation="horizontal" android:id="@+id/linearLayout4" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="1" android:background="@drawable/blockbg_big" > <ImageView android:id="@+id/imageView7" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="1" android:src="@drawable/img07" /> <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="3" android:gravity="center_vertical" style="@style/text" android:text="转到音乐" /> </LinearLayout> </TableRow> <!-- row3 --> <TableRow android:id="@+id/tableRow3" android:layout_width="fill_parent" android:layout_weight="1" android:background="@drawable/blockbg_big"> <LinearLayout android:id="@+id/linearLayout5" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginLeft="20px" android:orientation="horizontal" android:layout_weight="1" > <ImageView android:id="@+id/imageView8" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/email" /> <TextView android:id="@+id/textView3" android:layout_width="wrap_content" android:layout_height="fill_parent" style="@style/text" android:text="电子邮件" android:gravity="center_vertical" /> </LinearLayout> </TableRow> </TableLayout>
欢迎讨论,相互学习。
cdtxw@foxmail.com
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
2020-02-14 c++_primer_第4版目录
2020-02-14 cb06a_c++_顺序容器的定义
2020-02-14 cb05a_c++_STL优先级队列priority_queue_less_greater
2020-02-14 cb04a_c++_数据结构_STL_queue队列-一般用来做系统软件开发