我的代码和老师一样,却没有图标而且报错。图标问题后面会讲吗?
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:orientation="horizontal" android:background="#ff0000" android:layout_weight="2" > <RelativeLayout android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="2" android:background="#ff0000"> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@mipmap/ic_launcher_round"></ImageView> </RelativeLayout> <LinearLayout android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:orientation="vertical"> <RelativeLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:background="#ffff00"> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@mipmap/icon_imax2d"></ImageView> </RelativeLayout> <RelativeLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:background="#f000"> </RelativeLayout> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:orientation="horizontal" android:background="#fff000" android:layout_weight="1" > <RelativeLayout android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:background="#00ffff"></RelativeLayout> <RelativeLayout android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:background="#0000ff"></RelativeLayout> <RelativeLayout android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:background="#ff00ff"></RelativeLayout> </LinearLayout></LinearLayout>
正在回答 回答被采纳积分+1
- 参与学习 人
- 提交作业 1789 份
- 解答问题 2907 个
Android大楼Java起,本阶段是Android攻城狮培养计划的第一部分语法与界面基础篇,将带大家从0开始入门Android开发。
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星