0

** How to achieve this view? I can able to show text on right side. how to show it right side and  below image view.**

**How to achieve this view? I can able to show text on right side. How to show it on right side and below image view? It is TextView contains description. So, text can be of one line or 10 lines.

Please Help!!!**

Krishna Kachhela
  • 773
  • 1
  • 7
  • 24
AmitCharkha
  • 209
  • 4
  • 18

3 Answers3

1

Use the following layout

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:orientation="vertical">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="0.6">

        <ImageView
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1" />

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:orientation="vertical">

            <ImageView
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_weight="1" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_weight="1"
                android:text="Hello" />

        </LinearLayout>
    </LinearLayout>
    <TextView
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="0.4"/>
</LinearLayout>
Sarfaraz
  • 324
  • 1
  • 3
  • 13
0

You can use this:

editText.setCompoundDrawables(getResources().getDrawable(R.drawable.your_image), null, null, null);

Similar question

Community
  • 1
  • 1
Hoven
  • 563
  • 1
  • 5
  • 24
0

WebView would be best for this.. Add image view in web and text filling the webview