I am using a fragment in which I have a layout consisting on text on top(headline) and an image below it followed by another chunk of text below it. I want to make it such that the image goes to the left and the text including the headline and the rest goes to the right and once the image boundaries are over it starts from left, more so like wraps around like on a webpage( excuse me for my terrible explanation, hope i was able to put it well). Any clue how to rearrange my existing code or make changes to serve the purpose?
Thanks! Here's my code (the autoresizeimage is the image code):
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:foo="http://schemas.android.com/apk/res/com.cookie.halloween"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/login_background_gradient" >
<ScrollView
android:id="@+id/news_details_container"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="6dp ">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/background_article_body"
android:orientation="vertical"
android:paddingLeft="10dp"
android:paddingTop="@dimen/common_top_padding"
android:paddingRight="10dp"
android:paddingBottom="10dp" >
<com.cookie.halloween.utils.FontTextView
android:id="@+id/news_headline"
foo:customFont="Cabin-Medium.ttf"
android:textSize="18sp"
android:textColor="@color/article_headline"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<com.cookie.halloween.utils.FontTextView
android:id="@+id/news_timestamp_and_source"
foo:customFont="Roboto-Regular.ttf"
android:textSize="11sp"
android:textColor="@color/article_source"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<com.cookie.halloween.views.AutoResizeImageView
android:id="@+id/news_image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/common_top_padding"
android:layout_marginBottom="@dimen/common_bottom_padding" />
<com.cookie.halloween.views.LinkableTextView
android:id="@+id/news_body"
foo:customFont="Roboto-Regular.ttf"
android:textSize="13sp"
android:lineSpacingExtra="3dp"
android:textColor="@color/article_body"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:id="@+id/related_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="9dp"
android:background="@drawable/background_article_body"
android:orientation="vertical" >
<TextView
android:id="@+id/related_articles"
style="@style/related_buttons"
android:layout_width="match_parent"
android:layout_height="50dp"
android:contentDescription="@string/content_description_related_articles"
android:text="@string/content_description_related_articles" />
<View
android:id="@+id/related_divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/related_divider"
android:layout_marginLeft="1dp"
android:layout_marginRight="1dp"
android:visibility="gone" />
<TextView
android:id="@+id/related_quotes"
style="@style/related_buttons"
android:layout_width="match_parent"
android:layout_height="50dp"
android:contentDescription="@string/content_description_related_quotes"
android:text="@string/content_description_related_quotes" />
</LinearLayout>
</LinearLayout>
</ScrollView>
<include layout="@layout/loading_no_results" />
</FrameLayout>