Simple instructions for Android TextView and ImageView

  • 2020-05-09 19:19:59
  • OfStack


<?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>  
 

I believe we all understand when we see this label!

        android:drawableLeft=""
        android:drawableRight=""
        android:drawableTop=""
        android:drawableBottom=""

4 tabs, android:drawablePadding="" you can set the border size, I think it is very useful, do not want to use RelativeLayout to light or right as before!

Related articles: