开发者

Button text loses allignment after clicking

Strange things happen. I have a 2x2 button table layout, which is the following:

        <TableLayout  
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" 
        android:layout_below="@+id/cerca">

        <TableRow
            android:layout_width = "fill_parent"
            android:layout_height = "wrap_content">

            <Button
                android:id = "@+id/btn1"
                android:layout_width = "wrap_content"
                android:layout_height = "wrap_content"
                android:layout_weight="1"
                android:text = "Scarica POI da server"
                android:onClick="downloadFromServer"
            /> 
            <Button
                android:id = "@+id/btn2"
                android:layout_width = "wrap_content"
                android:layout_height = "wrap_content"
                android:layout_weight="1"
                android:text = "Aggiungi POI"
                android:onClick="goCreatePOI"
            /> 
    </TableRow>
    <TableRow
        android:layout_width = "fill_parent"
        android:layout_height = "wrap_content"> 

     开发者_如何学C       <Button
                android:id = "@+id/btn3"
                android:layout_width = "wrap_content"
                android:layout_height = "wrap_content"  
                android:layout_weight="1"
                android:text = "Rimuovi i POI del server"
                android:onClick="removeServerPOI"
            />   

            <Button
                android:id = "@+id/btn4"
                android:layout_width = "wrap_content"
                android:layout_height = "wrap_content"
                android:layout_weight="1"
                android:text = "Rimuovi i POI personali"
                android:onClick="removePersonalPOI"
            />  

    </TableRow>   

</TableLayout>

This table layout is nested inside a relative layout, which is nested in a scrollview.

Now, whenever i click on one of them, everytime the text inside the button change allignment: if before clicking was centered and displayed on two lines, after the click it loses its alignment and is displayed only in one row (cutting off some part of the text). Am I doing something wrong, or maybe it's a bug?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜