java - How to merge two rows in android table layout -


i want know how merge 2 rows in android table layout. know android:layout_span used merge columns , whats attribute used merging 2 rows?

there no rowspan attribute in tablelayout. better use linearlayout or relativelayout. it's simpler. or use gridlayout api level > 13

if depend on tablelayout can achieve rowspan follows:

<tablelayout ...>     <tablerow..>          <!-- column 1 : rowspan 2 -->          <textview .../>                                <!-- column 2 : 2 rows -->         <tablelayout ...>             <tablerow..>                 <textview .../>                                  </tablerow>             <tablerow..>                 <textview .../>                           </tablerow>         </tablelayout>       </tablerow>  </tablelayout> 

solution linearlayouts (cheap & simple):

<linearlayout      ...     android:orientation="horizontal">      <!-- column 1 -->     <linearlayout         ...          android:orientation="vertical">          <textview .../>        </linearlayout>      <!-- column 2 -->     <linearlayout         ...          android:orientation="vertical">          <textview .../>           <textview .../>        </linearlayout>  </linearlayout> 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -