[Solved] TextView is not able to set ImageView


This works for me:

<?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="wrap_content"
android:background="@drawable/sample"
android:gravity="center"
android:orientation="vertical" >

<ImageView
    android:id="@+id/imageView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerInParent="true"
    android:layout_gravity="center_horizontal"
    android:background="@drawable/ic_launcher" />

<TextView
    android:id="@+id/textView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@id/imageView1"
    android:text="sbxcdgdbc dhwe hdejd djhe  dqe "
    android:textColor="#ffffff" />

 </LinearLayout>

enter image description here

solved TextView is not able to set ImageView