android - Content inside linear layout is not showing -
im trying generate table layout within linear layout , set within sec layout not shows up. i'm trying this:
https://www.dropbox.com/s/gnk3plt0ci3d2u8/tabla.png?dl=0
http://pastebin.com/usmrxjsn
the width , height property have set inner linear layout causes problem you. values shown not visible you.
i recommend utilize weightsem property command width of layout.
try code below , hope should work you.
code..
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" tools:context=".linearlayout" > <linearlayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" android:weightsum="100" > <imageview android:id="@+id/profile_picture" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="20" android:padding="15dp" android:src="@drawable/ic_launcher" /> <tablelayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="80" android:padding="20dp" > <tablerow> <textview android:text="emma watson" /> </tablerow> <tablerow> <textview android:text="calorias" /> </tablerow> <tablerow> <textview android:text="co2" /> </tablerow> <tablerow> <textview android:text="distancia" /> </tablerow> </tablelayout> </linearlayout> </linearlayout>
android xml
No comments:
Post a Comment