Android笔记之图文混排布局

让图片在文字左边
android:drawableLeft
="@drawable/activity_icon"
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="65.0dip"
    android:background="@drawable/tool_box_fragment_bg_selector" >

    <TextView
        android:id="@+id/toolbox_title"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:drawableLeft="@drawable/activity_icon"
        android:gravity="center"
        android:paddingLeft="15dp"
        android:singleLine="true"
        android:text="经典推荐"
        android:textColor="@color/main_color"
        android:textSize="16.0sp"
        android:textStyle="bold" />

</RelativeLayout>

 


Done!
posted @ 2014-03-22 11:18  行云有影  阅读(603)  评论(0编辑  收藏  举报