Go Back   Android Forums > Android Development > Application Development
Application Development Dev Lounge for the Coder Folks
Gamers - Check out our new sister sites!
Nintendo Wii U!    |    OUYA - $99 Android System!

test: Reply
 
LinkBack Thread Tools
Old November 30th, 2012, 05:36 AM   #1 (permalink)
New Member
Thread Author (OP)
 
Join Date: Nov 2012
Posts: 2
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default a problam with TableRow height

I have a tablelayout and i want the second row to be 15% of the height and the first row to be 85% of the height, so i use weights and it's work just fine.
But when i put ImageButton on the second row the height of the second row becomes bigger then it was before. The height of the imageButton is no more then the 15% of the total height so i don`t understand why it happenes.
Here is my xml code:
Code:
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:weightSum="100" >

    <TableRow
        android:id="@+id/tableRow1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="85" >
    </TableRow>

    <TableRow
        android:id="@+id/tableRow2"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="15" >

        <ImageButton
            android:id="@+id/ibTakePic"
            android:layout_width="75dp"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:src="@drawable/profile" />
    </TableRow>

</TableLayout>

Piece_Of_Meat is offline  
Reply With Quote
Sponsors
Reply


Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 11:56 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.