title: Add view to a vertical LinearLayout at bottom (programmatically)
body: <p>I need to add views to a vertical Linearlayout at bottom programmatically. (Yes we know that, it's in the title).</p>
  
  <p>Ok : i can add views to the linearlayout, it's not a problem. But it's for a chat, so i need to add views at the bottom for each message which is displayed. I don't find any attributes to the LinearLayout to do that. </p>
  
  <p>Adding messages : </p>
  
  <pre><code>mHandler.post(new Runnable() {
              @Override
              public void run() {
                  TextView message = new TextView(ChatActivity.this);
                  String[] splitMessage = text.split(":");
                  message.setText(splitMessage[0]+"\n"+splitMessage[1]);
                  message.setGravity(Gravity.LEFT);
                  message.setMaxWidth(200);
                  message.setBackgroundColor(getResources().getColor(android.R.color.tertiary_text_light));
                  message.setTextColor(getResources().getColor(android.R.color.black));
                  message.setSingleLine(false);
                  mLayout.addView(message);
              }
          });
  </code></pre>
  
  <p>chat_layout.xml :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/live_obs_mainLayout"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@drawable/empty"
      android:orientation="vertical" &gt;
  
      &lt;ScrollView
          android:id="@+id/chat_layout"
          android:layout_width="fill_parent"
          android:layout_height="0dp"
          android:layout_weight="10" &gt;
  
          &lt;LinearLayout
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              android:orientation="vertical"
              android:isScrollContainer="tue"
               &gt;
          &lt;/LinearLayout&gt;
      &lt;/ScrollView&gt;
  
      &lt;LinearLayout
          android:layout_width="fill_parent"
          android:layout_height="0dp"
          android:layout_weight="1"
          android:gravity="bottom"
          android:orientation="horizontal" &gt;
  
          &lt;EditText
              android:id="@+id/edit_chat"
              android:layout_width="wrap_content"
              android:layout_height="45dp"
              android:layout_gravity="left|center_vertical"
              android:layout_weight="5" /&gt;
  
          &lt;Button
              android:id="@+id/chat_submit"
              android:layout_width="wrap_content"
              android:layout_height="45dp"
              android:layout_gravity="right|center_vertical"
              android:onClick="onSubmit"
              android:text="OK" /&gt;
      &lt;/LinearLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>