2010-11-24 3 views
1

나는 안드로이드 어플리케이션을 위해서 create this layout[ImageShack Link]에 어려움을 겪고있다.안드로이드 레이아웃으로 고생하다

여러 항목을 서로 중첩 시키려고했지만 오류가 계속 발생하여 마침내 원하는 코드가 전혀없는 코드가 생겼습니다. 내가 사용해야 할 레이아웃과 함께 어떻게 중첩하는지에 대한 아이디어를 얻길 바랍니다.

<?xml version="1.0" encoding="utf-8"?> 

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

    <TableRow android:id="@+id/TableRow01" android:layout_width="fill_parent" android:layout_height="fill_parent"> 

     <TextView android:text="94.6" android:id="@+id/id_number" android:layout_width="fill_parent" android:layout_height="fill_parent"></TextView> 

    </TableRow> 

    <TableRow android:id="@+id/TableRow02" android:layout_width="fill_parent" android:layout_height="fill_parent"> 

     <TextView android:text="KG" android:id="@+id/id_unit" android:layout_width="fill_parent" android:layout_height="fill_parent"></TextView> 

    </TableRow> 

    <TableRow android:id="@+id/TableRow03" android:layout_width="fill_parent" android:layout_height="fill_parent"> 

     <Button android:text="@+id/Add" android:id="@+id/add_button" android:layout_width="fill_parent" android:layout_height="wrap_content"></Button> 

     <Button android:text="@+id/View" android:id="@+id/view_button" android:layout_width="fill_parent" android:layout_height="wrap_content"></Button> 

</TableRow> 

</TableLayout> 

답변

2

내가 화면 (여기 빅 말씀과 나머지)

0

의 상부에 대한 또 다른 RelativeLayout을 포함하는 모든 일에 대한 RelativeLayout와 함께 가고 싶어요 : 여기

내 XML 코드 당신이 안드로이드 디바이스에 새로운이고, 당신이 droiddraw 사용할 수있는 WYSIWYG IDE에 레이아웃을 테스트하려는 경우 나 또한 ..., 아마, RelativeLayout의로 가고 싶어

0

의사 XML :

,
<Vertical LinearLayout> 

    <BigWord TextView align="center" /> 
    <Horizontal LinearLayout> 
     <TextView 1 /> 
     <TextView 2 /> 
    <Horizontal LinearLayout> 

</Vertical LinearLayout> 

<TableLayout> 

    <TableRow> 
     <TextView NothingHere /> 
     <TextView TextHere /> 
    </TableRow> 
    <TableRow> 
     <Button 1 /> 
     <Button 2 /> 
    </TableRow> 

</TableLayout> 
0

TableLayout 대신 RelativeLayout을 사용해야합니다. 당신이 열 수를 추가하는 데 도움이됩니다 것을,이 tutorial 내가 생각

0

, 또한 속성 'stretchColumns'테이블 레이아웃을 사용 & 버튼을 .. ViewFlipper에서 TableLayout을 사용하고있는 모든 텍스트에 대한 TableRow를 사용할 수 있습니다 확인

.. 당신은 ..

을 원하고이 http://www.knowledge-transfers.com/it/android-layout-tutorial/

이 작용할에서 또한 당신이 나에게 많은 도움이 도움이 걸릴 수 있습니다

관련 문제