开发者

Problem with TableLayout

开发者 https://www.devze.com 2023-04-04 06:25 出处:网络
<?xml version=\"1.0\" encoding=\"utf-8\"?> <LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"
 <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal" android:layout_width="fill_parent"
    android:layout_height="fill_parent" android:background="@null">

    <ImageView android:layout_width="70dip"
        android:layout_height="wrap_content" android:layout_marginLeft="10dip"
        android:src="@drawable/photo_profile" android:id="@+id/profil_image"
        android:layout_gravity="center" android:layout_marginRight="10dip" />
        <TableLayout android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:layout_marginLeft="15dip">
            <TableRow>
                <TextView android:layout_width="wrap_content" android:text="@string/experience"
                    android:layout_height="wrap_content" android:textStyle="bold"
                    android:textColor="@android:color/black" android:textSize="16sp" />
                <TextView android:id="@+id/profil_experience"
                    android:layout_width="wrap_content" android:layout_height="wrap_content"
                    android:textColor="@android:color/black" android:textSize="16sp" />
            </TableRow>
            <TableRow>
                <TextView android:layout_width="wrap_content" android:text="@string/secteur"
                    android:layout_height="wrap_content" android:textStyle="bold"
                    android:textColor="@android:color/black" android:textSize="16sp" />
                <TextView android:id="@+id/profil_secteur"
                    android:layout_width="wrap_content" android:layout_height="wrap_content"
                    android:textColor="@android:color/black" android:textSize="16sp" />
            </TableRow>
            <TableRow>
                <TextView android:layout_width="wrap_content" android:text="@string/lieu"
                    android:layout_height="wrap_content" android:textStyle="bold"
                    android:textColor="@android:color/black" android:textSize="16sp" />
                <TextView android:id="@+id/profil_lieu"
                    android:layout_width="wrap_content" android:layout_height="wrap_content"
                      android:singleLine="false"
                    android:textColor="@android:color/black" android:textSize="16sp" />
            </TableRow>
            <TableRow>
                <TextView android:layout_width="wrap_content" android:text="@string/niveau_etude"
                    android:layout_height="wrap_content" android:textStyle="bold"
                    android:textColor="@android:color/black" android:textSize="16sp" />
                <TextView android:id="@+id/profil_niveau"
                    android:layout_width="wrap_content" android:layout_height="wrap_content"
                    android:textColor="@android:color/black" android:textSize="16sp" />
            </TableRow>
            <TableRow>
                <TextView android:layout_width="wrap_content" android:text="@string/entreprise"
                    android:layout_height="wrap_content" android:textStyle="bold"
                    android:textColor="@android:color/black" android:textSize="16sp" />
                <TextView android:id="@+id/profil_societe"
                    android:layout_width="wrap_content" android:layout_height="wrap_content"
                    android:textColor="@android:color/black" android:textSize="16sp" />
            </TableRow>
        </TableLayout>
    <CheckBox android:layout_height="wrap_content" android:id="@+id/profil_checkbox"
        android:layout_width="wrap_conte开发者_运维知识库nt" android:layout_gravity="center_vertical" />
</LinearLayout>

and i got this :

http://img11.hostingpics.net/pics/819091Capture.png

I have two problems : * I can't see the Checkbox * The text is cutted

and thank you for your attention


You don't have any text in your checkbox. Try adding a text="Some Text" to see if it shows up. I'm guessing since you have it set to wrap_content, you don't actually have any content to wrap.


You can use your TableLayout in a ScrollView of fixed height.so bottom area can be used for CheckBox.

0

精彩评论

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