I'm trying to build an android application and I've created a screen with a table layout and added to the first table row an image view and two large texts, to the second row I've added one button.
When I change the text of the button it automatically changes the size of the image view above to match the size of the button.
Here is the code:
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/TableLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".ChildInfoActivity" >
<TableRow
android:id="@+id/tableRow1"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_launcher"
android:contentDescription="@string/child_info_image_descreption" />
<TextView
android:id="@+id/childInfoNameTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/name_text_view"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_gravity="center_vertical" />
<TextView
android:id="@+id/childInfoHasArrivedTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/has_arrived_text_view"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_gravity="center_vertical" />
</TableRow>
<TableRow
android:id="@+id/tableRow2"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/more_info_button"
android:layout_weight="1" />
</TableRow>
why is that?