title: Want to Show Image and Text side by side in android
body: <p>I am new to android development, I am building an app and on that I want to show Imageview and Textview side by side in android layout. Below code is showing textview below the imagview. Here I am using linearlayout.</p>
  
  <p>In this layout I am showing some data from database. </p>
  
  <p><strong>Expected layout design:</strong></p>
  
  <pre><code>Imageview Text1
            Text2
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.constraint.ConstraintLayout 
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  tools:context="com.example.spand.krishnasoftwares.Main2Activity"&gt;
  &lt;RelativeLayout
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical"
      android:background="@color/colorBackground"&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical"
          android:paddingTop="20px"
          android:id="@+id/vly"&gt;
          &lt;ImageView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:id="@+id/imageView"
              android:src="@drawable/gym_logo1"/&gt;
          &lt;LinearLayout
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:orientation="horizontal"
              android:id="@+id/ly1"&gt;
              &lt;TextView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Exercise 1"
                  android:textAlignment="center"
                  android:textAllCaps="true"
                  android:textColor="#ffffff"
                  android:layout_marginTop="20px"
                  android:textSize="10dp"/&gt;
          &lt;/LinearLayout&gt;
          &lt;LinearLayout
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_below="@+id/ly1"
              android:paddingLeft="5px"
              android:paddingRight="5px"
              android:id="@+id/ly2"
              android:orientation="horizontal"&gt;
  
              &lt;TextView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Exercise Name:"
                  android:textColor="#ffffff"
                  android:layout_marginTop="20px"
                  android:layout_weight="1"/&gt;
  
              &lt;TextView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:id="@+id/en1"
                  android:textColor="#ffffff"
                  android:layout_marginTop="20px"
                  android:layout_weight="1"/&gt;
          &lt;/LinearLayout&gt;
          &lt;LinearLayout
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_below="@+id/ly2"
              android:id="@+id/ly3"
              android:paddingLeft="5px"
              android:paddingRight="5px"
              android:orientation="horizontal"&gt;
  
              &lt;TextView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Speed: "
                  android:textColor="#ffffff"
                  android:layout_marginTop="10px"
                  android:layout_weight="1"/&gt;
  
              &lt;TextView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:id="@+id/es1"
                  android:textColor="#ffffff"
                  android:layout_marginTop="10px"
                  android:layout_weight="1"/&gt;
          &lt;/LinearLayout&gt;
          &lt;LinearLayout
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_below="@+id/ly3"
              android:paddingLeft="5px"
              android:paddingRight="5px"
              android:orientation="horizontal"
              android:id="@+id/ly4"&gt;
  
              &lt;TextView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Repetition: "
                  android:textColor="#ffffff"
                  android:layout_marginTop="10px"
                  android:layout_weight="1"/&gt;
  
              &lt;TextView
                  android:id="@+id/erep1"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginTop="10px"
                  android:layout_weight="1"
                  android:textColor="#ffffff"
                  android:textDirection="ltr" /&gt;
              &lt;TextView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:id="@+id/erep2"
                  android:textColor="#ffffff"
                  android:layout_marginTop="10px"
                  android:layout_weight="1"/&gt;
              &lt;TextView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:id="@+id/erep3"
                  android:textColor="#ffffff"
                  android:layout_marginTop="10px"
                  android:layout_weight="1"/&gt;
          &lt;/LinearLayout&gt;
          &lt;LinearLayout
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_below="@+id/ly4"
              android:paddingLeft="5px"
              android:paddingRight="5px"
              android:orientation="horizontal"
              android:id="@+id/ly5"&gt;
  
              &lt;TextView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Weight: "
                  android:textColor="#ffffff"
                  android:layout_marginTop="10px"
                  android:layout_weight="1"/&gt;
  
              &lt;TextView
                  android:id="@+id/ew1"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginTop="10px"
                  android:layout_weight="1"
                  android:textColor="#ffffff"
                  android:textDirection="ltr" /&gt;
  
          &lt;/LinearLayout&gt;
      &lt;/LinearLayout&gt;
  
  
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p></p>