I'm having a problem with some dinamically generated buttons, they get of the screen when the text is big enough. You can see it in the picture:
If the text in the buttons is small then no problem, but if the character number is high then is gets of the screen.
The layout of the button is the following:
<?xml version="1.0" encoding="UTF-8"?>
<Button xmlns:android="http://ift.tt/nIICcg"
android:id="@+id/newGuessButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_alignParentRight="true" >
</Button>
And the buttons are created in a table layout:
<TableLayout android:id="@+id/buttonTableLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" android:stretchColumns="0,1,2">
<TableRow android:id="@+id/tableRow0"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"></TableRow>
<TableRow android:id="@+id/tableRow1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"></TableRow>
<TableRow android:id="@+id/tableRow2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"></TableRow>
It's important to note that this table goes inside a linear layout.
Is there anyway I can limit the size of the buttons to the size of the screen that's using them?
Thnx in advance!
No comments:
Post a Comment