I am trying to enlarge my buttons height. I am trying to inflate the row but it is not working any idea?
check out my updated code with a relative layout and tablelayot...
tried enlarging the row and the tablelayout same result...
I tried enl XML
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/black_bg"
android:layout_centerVertical="true">
<TableLayout android:id="@+id/row1"
android:layout_width="fill_parent"
android:layout_height="45dip"
android:paddingRight="5px"
android:paddingLeft="5px"
android:paddingTop="15px"
android:paddingBottom="5px"
android:layout_weight="1">
<TableRow
android:layout_weight="1"
android:layout_height="50dip">
<ToggleButton android:id="@+id/btn_service_plus"
android:layout_marginRight="4px"
android:textColor="@android:color/white"
android:textStyle="bold"
android:textSize="12dip"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:text="1"
android:layout_weight="1"
/>
<Button
android:layout_marginLeft="4px"
android:layout_marginRight="4px"
android:textColor="@android:color/white"
android:textStyle="bold"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:textSize="12dp"
android:layout_weight="1"
/>
<Button
android:layout_marginLeft="4px"
android:layout_marginRight="4px"
android:textColor="@android:color/white"
android:textStyle="bold"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:textSize="12dp"
android:layout_weight="1"
/>
<ToggleButton
android:layout_marginLeft="4px"
android:textColor="@android:color/white"
android:textStyle="bold"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:textSize="12dp"
android:layout_weight="1"
android:background="@drawable/menu_button_layout"/>
</TableRow>
I might be a bit late to the party, but I think CJBS (see comment on Akram) is right. Unfortunately I cannot make a comment so I will post this as an answer (which should be good too because I give an answer).
Since the answer of the OP is already answered, I'll provide an answer that will help the people with the same question:
This will make the button text larger:
android:textSize=""
This will make the button-height larger:
android:height=""
This will make the button-width larger:
android:width=""
EDIT:
Using 'min' before 'width' or 'height' might also be a good idea.
Example:
android:minWidth=""
Edited your code now check this
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/black_bg"
android:layout_centerVertical="true">
<TableLayout android:id="@+id/row1"
android:layout_width="fill_parent"
android:layout_height="100dip"
android:paddingRight="5px"
android:paddingLeft="5px"
android:paddingTop="15px"
android:paddingBottom="5px"
>
<TableRow
android:layout_weight="1"
android:layout_height="50dip">
<ToggleButton android:id="@+id/btn_service_plus"
android:layout_marginRight="4px"
android:textColor="@android:color/white"
android:textStyle="bold"
android:textSize="12dip"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:text="1"
android:layout_weight="1"
/>
<Button
android:layout_marginLeft="4px"
android:layout_marginRight="4px"
android:textColor="@android:color/white"
android:textStyle="bold"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:textSize="12dp"
android:layout_weight="1"
/>
<Button
android:layout_marginLeft="4px"
android:layout_marginRight="4px"
android:textColor="@android:color/white"
android:textStyle="bold"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:textSize="12dp"
android:layout_weight="1"
/>
<ToggleButton
android:layout_marginLeft="4px"
android:textColor="@android:color/white"
android:textStyle="bold"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:textSize="12dp"
android:layout_weight="1"
android:background="@drawable/menu_button_layout"/>
</TableRow>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.