title: android: calling Button.setText() causes undesired relocation of Button
body: <p>I'm having this problem where a <code>TableLayout</code> of <code>Button</code>s is relocating all <code>Button</code> objects whenever i call <code>Button.setText(String)</code>.  i've given no indication that the <code>View</code> should be moved...  and i really don't want it to.  if anyone knows how to keep these <code>Views</code> from moving (without a whole lot of hassle if possible), please let me know.</p>
  
  <p>i'm using some unorthodox methods for getting the screen setup.  here's the code:</p>
  
  <p>static_grid_layout.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
          android:layout_height="fill_parent"
          android:layout_width="fill_parent"
          android:stretchColumns="*"
          android:gravity="center"&gt;
      &lt;TableRow android:layout_height="fill_parent"
              android:layout_width="fill_parent"&gt;
          &lt;Button android:id="@+id/btn1"
              android:layout_width="100dip"
              android:layout_height="80dip"
              android:gravity="center"
              android:ellipsize="marquee"/&gt;
          &lt;Button android:id="@+id/btn2"
              android:layout_width="100dip"
              android:layout_height="80dip"
              android:gravity="center"
              android:ellipsize="marquee"/&gt;
          &lt;Button android:id="@+id/btn3"
              android:layout_width="100dip"
              android:layout_height="80dip"
              android:gravity="center"
              android:ellipsize="marquee"/&gt;
      &lt;/TableRow&gt;
      &lt;TableRow&gt;
          &lt;Button android:id="@+id/btn4"
              android:layout_width="100dip"
              android:layout_height="80dip"
              android:gravity="center"
              android:ellipsize="marquee"/&gt;
          &lt;Button android:id="@+id/btn5"
              android:layout_width="100dip"
              android:layout_height="80dip"
              android:gravity="center"
              android:ellipsize="marquee"/&gt;
          &lt;Button android:id="@+id/btn6"
              android:layout_width="100dip"
              android:layout_height="80dip"
              android:gravity="center"
              android:ellipsize="marquee"/&gt;
      &lt;/TableRow&gt;
      &lt;TableRow&gt;
          &lt;Button android:id="@+id/btn7"
              android:layout_width="100dip"
              android:layout_height="80dip"
              android:gravity="center"
              android:ellipsize="marquee"/&gt;
          &lt;Button android:id="@+id/btn8"
              android:layout_width="100dip"
              android:layout_height="80dip"
              android:gravity="center"
              android:ellipsize="marquee"/&gt;
          &lt;Button android:id="@+id/btn9"
              android:layout_width="100dip"
              android:layout_height="80dip"
              android:gravity="center"
              android:ellipsize="marquee"/&gt;
      &lt;/TableRow&gt;
      &lt;TableRow&gt;
          &lt;Button android:id="@+id/btn10"
              android:layout_width="100dip"
              android:layout_height="80dip"
              android:gravity="center"
              android:ellipsize="marquee"/&gt;
          &lt;Button android:id="@+id/btn11"
              android:layout_width="100dip"
              android:layout_height="80dip"
              android:gravity="center"
              android:ellipsize="marquee"/&gt;
          &lt;Button android:id="@+id/btn12"
              android:layout_width="100dip"
              android:layout_height="80dip"
              android:gravity="center"
              android:ellipsize="marquee"/&gt;
      &lt;/TableRow&gt;
      &lt;TableRow&gt;
          &lt;Button android:id="@+id/btn13"
              android:layout_width="100dip"
              android:layout_height="80dip"
              android:gravity="center"
              android:ellipsize="marquee"/&gt;
          &lt;Button android:id="@+id/btn14"
              android:layout_width="100dip"
              android:layout_height="80dip"
              android:gravity="center"
              android:ellipsize="marquee"/&gt;
          &lt;Button android:id="@+id/btn15"
              android:layout_width="100dip"
              android:layout_height="80dip"
              android:gravity="center"
              android:ellipsize="marquee"/&gt;
      &lt;/TableRow&gt;
      &lt;TableRow&gt;
          &lt;Button android:id="@+id/btn16"
              android:layout_width="100dip"
              android:layout_height="80dip"
              android:gravity="center"
              android:ellipsize="marquee"/&gt;
          &lt;Button android:id="@+id/btn17"
              android:layout_width="100dip"
              android:layout_height="80dip"
              android:gravity="center"
              android:ellipsize="marquee"/&gt;
          &lt;Button android:id="@+id/btn18"
              android:layout_width="100dip"
              android:layout_height="80dip"
              android:gravity="center"
              android:ellipsize="marquee"/&gt;
      &lt;/TableRow&gt;
      &lt;TableRow&gt;
          &lt;Button android:id="@+id/btn19"
              android:layout_width="100dip"
              android:layout_height="80dip"
              android:gravity="center"
              android:ellipsize="marquee"/&gt;
          &lt;Button android:id="@+id/btn20"
              android:layout_width="100dip"
              android:layout_height="80dip"
              android:gravity="center"
              android:ellipsize="marquee"/&gt;
          &lt;Button android:id="@+id/btn21"
              android:layout_width="100dip"
              android:layout_height="80dip"
              android:gravity="center"
              android:ellipsize="marquee"/&gt;
      &lt;/TableRow&gt;
  &lt;/TableLayout&gt;
  </code></pre>
  
  <p>MainActivity.java: the part of particular interest will be here:</p>
  
  <pre><code>query = "SELECT * FROM "+DbSchema.ProductSchema.TABLE_NAME+
          " ORDER BY "+DbSchema.ProductSchema.COLUMN_PRIORITY+" ASC";
  updateList(listQuery(query));
  fillPage(mPage);
  setContentView(mPage);
  </code></pre>
  
  <p>toward the bottom of the code in the <code>onResume()</code> override.  here is the undesired behavior in an image.  the <code>Button</code>s ONLY get that retarded y offset when i call setText().  if i call setText("") [empty String] the location of the button does not change.  what gives?</p>
  
  <p><img src="https://i335.photobucket.com/albums/m470/jmartin866/fedup.png"></p>