複製程式碼 程式碼如下:
<?xml version=”1.0″ encoding=”utf-8″?>
<LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android”
android:layout_width=”match_parent”
android:layout_height=”match_parent”
android:orientation=”vertical” >
<TextView
android:layout_height=”wrap_content”
android:layout_width=”wrap_content”
android:drawableLeft=”@drawable/icon”
android:text=”@string/app_name”
/>
</LinearLayout>
相信看到這個標籤的時候大家都明白了把!
複製程式碼 程式碼如下:
android:drawableLeft=””
android:drawableRight=””
android:drawableTop=””
android:drawableBottom=””
四個標籤,android:drawablePadding=””可以設定邊框大小,我覺得很使用,不用想以前那麼用RelativeLayout中去light或者right了!
您可能感興趣的文章:
Android自定義TextView實現文字傾斜效果最近較流行的效果 Android自定義View實現傾斜列表/圖片Android 中TextView的使用imageview被壓縮問題解決辦法Android中TextView和ImageView實現傾斜效果
写评论
很抱歉,必須登入網站才能發佈留言。