TextView 文字加圖片顯示效果

TextView中經常出文本加圖片的顯示效果:

android:drawableLeft=""
android:drawableRight=""
android:drawableTop=""
android:drawableBottom=""//圖片相對於文本的位置
android:drawablePadding=""//圖片與文字間距
//代碼中設置textView中的圖片,圖片顯示的位置,圖片要顯示那個位置,就把圖片放在那個位置
//int left, int top, int right, int bottom
textView.setCompoundDrawablesWithIntrinsicBounds(
                    R.drawable.dynamic_praise, 0, 0, 0);
發佈了42 篇原創文章 · 獲贊 3 · 訪問量 11萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章