Problem with LinearLayout

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Problem with LinearLayout

Postby pmskiran » Wed Aug 05, 2009 5:08 am

<?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">

<TableLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:stretchColumns="0"
>
<TableRow
android:layout_width="fill_parent"
android:layout_height="wrap_content">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="Usage like: 'City, Country'"
/>

</TableRow>

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

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Usage like: 'City, Country'"
android:gravity="left"
/>

</TableRow>
</TableLayout>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Usage like: 'City, Country-----'"
android:gravity="center_horizontal"
/>

<TableLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:stretchColumns="0"
>
<TableRow
android:layout_width="fill_parent"
android:layout_height="wrap_content">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Usage like: 'City, Country-----'"
android:gravity="center_horizontal"
/>

</TableRow>
</TableLayout>

</LinearLayout>


In the previous code second TableLayout is not visible, what might be the reason, please help me

Thank you.
Kiran PMS
pmskiran
Junior Developer
Junior Developer
 
Posts: 12
Joined: Fri Jul 31, 2009 10:44 am
Location: India

Top

Postby arams » Thu Aug 06, 2009 1:28 pm

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <?xml version="1.0" encoding="utf-8"?>
  3.  
  4. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  5.  
  6. android:layout_width="fill_parent"
  7.  
  8. android:layout_height="fill_parent" android:orientation="vertical">
  9.  
  10.  
  11.  
  12. <TableLayout
  13.  
  14. android:orientation="vertical"
  15.  
  16. android:layout_width="fill_parent"
  17.  
  18. android:layout_height="wrap_content"
  19.  
  20. android:stretchColumns="0"
  21.  
  22. >
  23.  
  24. <TableRow
  25.  
  26. android:layout_width="fill_parent"
  27.  
  28. android:layout_height="wrap_content">
  29.  
  30.  
  31.  
  32. <TextView
  33.  
  34. android:layout_width="wrap_content"
  35.  
  36. android:layout_height="wrap_content"
  37.  
  38. android:gravity="center_horizontal"
  39.  
  40. android:text="Usage like: 'City, Country'"
  41.  
  42. />
  43.  
  44.  
  45.  
  46. </TableRow>
  47.  
  48.  
  49.  
  50. <TableRow
  51.  
  52. android:layout_width="fill_parent"
  53.  
  54. android:layout_height="wrap_content">
  55.  
  56.  
  57.  
  58. <TextView
  59.  
  60. android:layout_width="wrap_content"
  61.  
  62. android:layout_height="wrap_content"
  63.  
  64. android:text="Usage like: 'City, Country'"
  65.  
  66. android:gravity="left"
  67.  
  68. />
  69.  
  70.  
  71.  
  72. </TableRow>
  73.  
  74. </TableLayout>
  75.  
  76.  
  77.  
  78. <TextView
  79.  
  80. android:layout_width="wrap_content"
  81.  
  82. android:layout_height="wrap_content"
  83.  
  84. android:text="Usage like: 'City, Country-----'"
  85.  
  86. android:gravity="center_horizontal"
  87.  
  88. />
  89.  
  90.  
  91.  
  92. <TableLayout
  93.  
  94. android:orientation="vertical"
  95.  
  96. android:layout_width="fill_parent"
  97.  
  98. android:layout_height="wrap_content"
  99.  
  100. android:stretchColumns="0"
  101.  
  102. >
  103.  
  104. <TableRow
  105.  
  106. android:layout_width="fill_parent"
  107.  
  108. android:layout_height="wrap_content">
  109.  
  110.  
  111.  
  112. <TextView
  113.  
  114. android:layout_width="wrap_content"
  115.  
  116. android:layout_height="wrap_content"
  117.  
  118. android:text="Usage like: 'City, Country-----'"
  119.  
  120. android:gravity="center_horizontal"
  121.  
  122. />
  123.  
  124.  
  125.  
  126. </TableRow>
  127.  
  128. </TableLayout>
  129.  
  130.  
  131.  
  132. </LinearLayout>  
  133.  
  134.  
  135.  
  136.  
Parsed in 0.006 seconds, using GeSHi 1.0.8.4


ur output....CHANGE LINEARLAYOUT ORIENTATION
postyour code like this...
arams
Experienced Developer
Experienced Developer
 
Posts: 89
Joined: Fri May 08, 2009 7:45 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 4 guests