I think the solution will be quite obvious, but as long as I’m rookie in android forgive me 🙂
I want to place some picture on the right upper side of the view, and a textview, which will fit the rest of the view. Here’s what I’ve done:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ImageView
android:id="@+id/logo_in_listing"
android:layout_width="100dip"
android:layout_height="100dip"
android:layout_alignParentRight="true"
android:layout_marginRight="11dip"
android:layout_marginTop="11dip"
android:background="@drawable/border_for_imageview"
android:src="@drawable/facebook_logo" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/someString"
android:id="@+id/textview1"
android:layout_toLeftOf="@id/logo_in_listing"
android:layout_margin="3dip"/>
</RelativeLayout>
Here’s what I get:

My questions:
1) How to make the textview fit also the lower part of imageview? I don’t want that space to be left unused.
2) As you see, I’ve used dips for placing ImageView. What would you recommend in this case? I mean, how to write in a way, that it will be same for all screen sizes? Or maybe dip is OK?
You have to use
Spannedinterface. Here’s a good example