<TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:text="钱包"/> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="15dp" android:background="#FFF" android:orientation="horizontal" android:padding="15dp"> <ImageView android:layout_width="30dp" android:layout_height="30dp" android:background="@mipmap/ic_launcher_1"/> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:text="钱包"/> </LinearLayout> ... ... 
以前,我们会这么写:
如不雅点击项多的话,反而显得乱,并且多了很多无用的代码,今天我们来测验测验新的弄法~
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="15dp"
- android:background="#FFF"
- android:drawableLeft="@mipmap/ic_launcher_1"
推荐阅读
球星们要失业?机器人在2050年可以击败专业足球队
人工智能和机械人成长越来越快,人们也开端担心本身的工作在某一天被机械人代替。别怕,别说一般技能的工作,就是像内马尔如许的大年夜球星,也许很快都邑“掉业”了。近日,Ro>>>详细阅读
本文标题:Android Coding利器之掌握小技巧,助你Coding更上一层楼~
地址:http://www.17bianji.com/lsqh/36506.html
1/2 1