table_result_1_grammar has a layout_height of fill_parent. This probably is pushing anything else out of the parent view. Try wrap_content.
On Mar 27, 10:31 am, "LE THANH TUNG" <[EMAIL PROTECTED]> wrote: > Hi all ! > > I made a RelativeLayout that holds two table (*table_result_1_grammar *and* > **table_result_2_grammar**) *and a *TableRow* under the > table_result_2_grammar*.* > > I have tested by Droidraw, it's ok. But when I run it in Eclipse, there is > only the table_result_1_grammar that displays, the > table_result_2_grammarand TableRow > don't. I use M3 SDK > > Please have a look at the layout file xml. It's long but easy to see. > > Thanks for help ! > > <?xml version="1.0" encoding="utf-8"?> > > *<RelativeLayout* > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="vertical" > > *<TableLayout* > *id="@+id/table_result_1_grammar"* > android:layout_width="fill_parent" > android:layout_height="fill_parent" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="vertical" > > <TableRow > id="@+id/result_head_grammar" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > > <TextView > id="@+id/result_head_question_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="Question :" > > </TextView> > <TextView > id="@+id/result_head_answer_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="Right answer :" > > </TextView> > <TextView > id="@+id/result_head_right_answer_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="Your answer :" > > </TextView> > </TableRow> > <TableRow > id="@+id/cau_1_row_grammar" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > > <TextView > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="1" > > </TextView> > <TextView > id="@+id/cau_1_answer_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="your answer 1" > > </TextView> > <TextView > id="@+id/cau_1_result_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="right answer 1" > > </TextView> > </TableRow> > <TableRow > id="@+id/cau_2_row_grammar" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > > <TextView > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="2" > > </TextView> > <TextView > id="@+id/cau_2_answer_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="your answer 2" > > </TextView> > <TextView > id="@+id/cau_2_result_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="right answer 2" > > </TextView> > </TableRow> > <TableRow > id="@+id/cau_3_row_grammar" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > > <TextView > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="3" > > </TextView> > <TextView > id="@+id/cau_3_answer_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="your answer 3" > > </TextView> > <TextView > id="@+id/cau_3_result_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="right answer 3" > > </TextView> > </TableRow> > <TableRow > id="@+id/cau_4_row_grammar" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > > <TextView > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="4" > > </TextView> > <TextView > id="@+id/cau_4_answer_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="your answer 4" > > </TextView> > <TextView > id="@+id/cau_4_result_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="right answer 4" > > </TextView> > </TableRow> > <TableRow > id="@+id/cau_5_row_grammar" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > > <TextView > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="5" > > </TextView> > <TextView > id="@+id/cau_5_answer_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="your answer 5" > > </TextView> > <TextView > id="@+id/cau_5_result_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="right answer 5" > > </TextView> > </TableRow> > <TableRow > id="@+id/cau_6_row_grammar" > android:layout_width="275px" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > > <TextView > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="6" > > </TextView> > <TextView > id="@+id/cau_6_answer_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="your answer 6" > > </TextView> > <TextView > id="@+id/cau_6_result_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="right answer 6" > > </TextView> > </TableRow> > <TableRow > id="@+id/cau_7_row_grammar" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > > <TextView > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="7" > > </TextView> > <TextView > id="@+id/cau_7_answer_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="your answer 7" > > </TextView> > <TextView > id="@+id/cau_7_result_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="right answer 7" > > </TextView> > </TableRow> > <TableRow > id="@+id/cau_8_row_grammar" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > > <TextView > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="8" > > </TextView> > <TextView > id="@+id/cau_8_answer_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="your answer 8" > > </TextView> > <TextView > id="@+id/cau_8_result_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="right answer 8" > > </TextView> > </TableRow> > <TableRow > id="@+id/cau_9_row_grammar" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > > <TextView > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="9" > > </TextView> > <TextView > id="@+id/cau_9_answer_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="your answer 9" > > </TextView> > <TextView > id="@+id/cau_9_result_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="right answer 9" > > </TextView> > </TableRow> > <TableRow > id="@+id/cau_10_row_grammar" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > > <TextView > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="10" > > </TextView> > <TextView > id="cau_10_answer_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="your answer 10" > > </TextView> > <TextView > id="@+id/cau_10_result_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="right answer 10" > > </TextView> > </TableRow> > </TableLayout> > <TableLayout > id="@+id/table_result_2_grammar" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:layout_below="@+id/table_result_1_grammar" > > <TableRow > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > > <TextView > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="Number of right answers :" > > </TextView> > <TextView > id="@+id/number_right_answer_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="mention later !" > > </TextView> > </TableRow> > <TableRow > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > > <TextView > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="Result :" > > </TextView> > <TextView > id="@+id/result_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="Admit or not ?" > > </TextView> > </TableRow> > </TableLayout> > > <TableRow > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > android:layout_below="@+id/table_result_2_grammar" > > <Button > id="@+id/button_review_grammar" > android:layout_width="wrap_content" > android:layout_height="30px" > android:text="Review in detail" > > > > </Button> > <Button > id="@+id/take_another_part_grammar" > android:layout_width="wrap_content" > android:layout_height="30px" > android:text="Take another part" > > > > </Button> > </TableRow> > </RelativeLayout> > > <?xml version="1.0" encoding="utf-8"?> > > <RelativeLayout > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="vertical" > > <TableLayout > id="@+id/table_result_1_grammar" > android:layout_width="fill_parent" > android:layout_height="fill_parent" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="vertical" > > <TableRow > id="@+id/result_head_grammar" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > > <TextView > id="@+id/result_head_question_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="Question :" > > </TextView> > <TextView > id="@+id/result_head_answer_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="Right answer :" > > </TextView> > <TextView > id="@+id/result_head_right_answer_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="Your answer :" > > </TextView> > </TableRow> > <TableRow > id="@+id/cau_1_row_grammar" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > > <TextView > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="1" > > </TextView> > <TextView > id="@+id/cau_1_answer_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="your answer 1" > > </TextView> > <TextView > id="@+id/cau_1_result_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="right answer 1" > > </TextView> > </TableRow> > <TableRow > id="@+id/cau_2_row_grammar" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > > <TextView > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="2" > > </TextView> > <TextView > id="@+id/cau_2_answer_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="your answer 2" > > </TextView> > <TextView > id="@+id/cau_2_result_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="right answer 2" > > </TextView> > </TableRow> > <TableRow > id="@+id/cau_3_row_grammar" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > > <TextView > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="3" > > </TextView> > <TextView > id="@+id/cau_3_answer_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="your answer 3" > > </TextView> > <TextView > id="@+id/cau_3_result_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="right answer 3" > > </TextView> > </TableRow> > <TableRow > id="@+id/cau_4_row_grammar" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > > <TextView > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="4" > > </TextView> > <TextView > id="@+id/cau_4_answer_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="your answer 4" > > </TextView> > <TextView > id="@+id/cau_4_result_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="right answer 4" > > </TextView> > </TableRow> > <TableRow > id="@+id/cau_5_row_grammar" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > > <TextView > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="5" > > </TextView> > <TextView > id="@+id/cau_5_answer_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="your answer 5" > > </TextView> > <TextView > id="@+id/cau_5_result_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="right answer 5" > > </TextView> > </TableRow> > <TableRow > id="@+id/cau_6_row_grammar" > android:layout_width="275px" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > > <TextView > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="6" > > </TextView> > <TextView > id="@+id/cau_6_answer_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="your answer 6" > > </TextView> > <TextView > id="@+id/cau_6_result_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="right answer 6" > > </TextView> > </TableRow> > <TableRow > id="@+id/cau_7_row_grammar" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > > <TextView > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="7" > > </TextView> > <TextView > id="@+id/cau_7_answer_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="your answer 7" > > </TextView> > <TextView > id="@+id/cau_7_result_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="right answer 7" > > </TextView> > </TableRow> > <TableRow > id="@+id/cau_8_row_grammar" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > > <TextView > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="8" > > </TextView> > <TextView > id="@+id/cau_8_answer_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="your answer 8" > > </TextView> > <TextView > id="@+id/cau_8_result_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="right answer 8" > > </TextView> > </TableRow> > <TableRow > id="@+id/cau_9_row_grammar" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > > <TextView > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="9" > > </TextView> > <TextView > id="@+id/cau_9_answer_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="your answer 9" > > </TextView> > <TextView > id="@+id/cau_9_result_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="right answer 9" > > </TextView> > </TableRow> > <TableRow > id="@+id/cau_10_row_grammar" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > > <TextView > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="10" > > </TextView> > <TextView > id="cau_10_answer_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="your answer 10" > > </TextView> > <TextView > id="@+id/cau_10_result_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="right answer 10" > > </TextView> > </TableRow> > *</TableLayout>* > *<TableLayout* > *id="@+id/table_result_2_grammar"* > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:layout_below="@+id/table_result_1_grammar" > > <TableRow > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > > <TextView > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="Number of right answers :" > > </TextView> > <TextView > id="@+id/number_right_answer_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="mention later !" > > </TextView> > </TableRow> > <TableRow > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > > <TextView > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="Result :" > > </TextView> > <TextView > id="@+id/result_grammar" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:padding="3dip" > android:text="Admit or not ?" > > </TextView> > </TableRow> > *</TableLayout>* > > *<TableRow* > android:layout_width="fill_parent" > android:layout_height="wrap_content" > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > *android:layout_below="@+id/table_result_2_grammar"* > > <Button > id="@+id/button_review_grammar" > android:layout_width="wrap_content" > android:layout_height="30px" > android:text="Review in detail" > > > > </Button> > <Button > id="@+id/take_another_part_grammar" > android:layout_width="wrap_content" > android:layout_height="30px" > android:text="Take another part" > > > > </Button> > *</TableRow>* > *</RelativeLayout>* > > -- > Many thanks and regards > LÊ THANH TÙNG > Da Nang, Vietnam --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

