xml - Android Layout Weight Views Being Cut Off -



xml - Android Layout Weight Views Being Cut Off -

ok have fragment want display 2 textviews , listview first textview takes little bit @ top of layout , rest of space devided evenly between textview , listview. current layout listview cutting off other 2 textviews little space. think might have layout_weight attibute.

fragment_layout.xml

<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:weightsum="100"> <textview android:id="@+id/text_title" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="10" android:text="loading ..." android:gravity="center"/> <textview android:id="@+id/text_description" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="45" android:text="loading ..." /> <listview android:id="@+id/list_pre_cert" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="45" android:cachecolorhint="#00000000" android:dividerheight="0px"> </listview> </linearlayout>

current layout

if want heights end beingness 10%, 45%, 45%, in add-on setting weights have, set layout_height 0dp each of views. layout weights work on remaining space.

android xml listview user-interface android-fragments

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -