Hi.

I have a problem. I want to create a TableLayout, with 7 TableRows.
Each TableRow contain 4 ImageViews in it in one row.

Problem is for now, i have only 4 TableRows drawn with ImageViews in
it. The last one 5th TableRow is shrinked to fit the space on the
screen that has left after drawing first 4 TableRows. 6th and 7th
TableRows are not drawn at all, since there is no space for them on
the screen left.

Question is: Is it possible to make ImageViews being auto scalable ,
so that all TableRows fit into screen.
Or make TableRows shrinkable, so that all TableRow heights are being
equal, so they all fit into the screen.
And then ImageViews fill in the table row.


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="horizontal" >

        <TableLayout android:id="@+id/TableLayout01"
android:layout_height="fill_parent" android:layout_width="fill_parent"
android:shrinkColumns="*" android:layout_marginLeft="8dp"
android:hapticFeedbackEnabled="false" android:longClickable="true">
                <TableRow android:id="@+id/TableRow01"
android:layout_height="match_parent"
android:layout_width="wrap_content">
                        <ImageView android:id="@+id/image1" 
android:background="@drawable/
a001">
                        <ImageView android:id="@+id/image2" 
android:background="@drawable/
a002">
                        <ImageView android:id="@+id/image3" 
android:background="@drawable/
a003">
                        <ImageView android:id="@+id/image4" 
android:background="@drawable/
a004"></ImageView>
                </TableRow><TableRow android:layout_height="match_parent"
android:layout_width="wrap_content" android:id="@+id/TableRow02">
                        <ImageView android:id="@+id/image1" 
android:background="@drawable/
a001">
                        <ImageView android:id="@+id/image2" 
android:background="@drawable/
a002">
                        <ImageView android:id="@+id/image3" 
android:background="@drawable/
a003">
                        <ImageView android:id="@+id/image4" 
android:background="@drawable/
a004"></ImageView>
                </TableRow><TableRow android:layout_height="match_parent"
android:layout_width="wrap_content" android:id="@+id/TableRow03">
                        <ImageView android:id="@+id/image1" 
android:background="@drawable/
a001">
                        <ImageView android:id="@+id/image2" 
android:background="@drawable/
a002">
                        <ImageView android:id="@+id/image3" 
android:background="@drawable/
a003">
                        <ImageView android:id="@+id/image4" 
android:background="@drawable/
a004"></ImageView>
                </TableRow><TableRow android:layout_height="match_parent"
android:layout_width="wrap_content" android:id="@+id/TableRow04">
                        <ImageView android:id="@+id/image1" 
android:background="@drawable/
a001">
                        <ImageView android:id="@+id/image2" 
android:background="@drawable/
a002">
                        <ImageView android:id="@+id/image3" 
android:background="@drawable/
a003">
                        <ImageView android:id="@+id/image4" 
android:background="@drawable/
a004"></ImageView>
                </TableRow><TableRow android:layout_height="match_parent"
android:layout_width="wrap_content" android:id="@+id/TableRow05">
                        <ImageView android:id="@+id/image1" 
android:background="@drawable/
a001">
                        <ImageView android:id="@+id/image2" 
android:background="@drawable/
a002">
                        <ImageView android:id="@+id/image3" 
android:background="@drawable/
a003">
                        <ImageView android:id="@+id/image4" 
android:background="@drawable/
a004"></ImageView>
                </TableRow><TableRow android:layout_height="match_parent"
android:layout_width="wrap_content" android:id="@+id/TableRow06">
                        <ImageView android:id="@+id/image1" 
android:background="@drawable/
a001">
                        <ImageView android:id="@+id/image2" 
android:background="@drawable/
a002">
                        <ImageView android:id="@+id/image3" 
android:background="@drawable/
a003">
                        <ImageView android:id="@+id/image4" 
android:background="@drawable/
a004"></ImageView>
                </TableRow><TableRow android:layout_height="match_parent"
android:layout_width="wrap_content" android:id="@+id/TableRow07">
                        <ImageView android:id="@+id/image1" 
android:background="@drawable/
a001">
                        <ImageView android:id="@+id/image2" 
android:background="@drawable/
a002">
                        <ImageView android:id="@+id/image3" 
android:background="@drawable/
a003">
                        <ImageView android:id="@+id/image4" 
android:background="@drawable/
a004"></ImageView>
                </TableRow>
        </TableLayout>
</LinearLayout>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to