Android Linear Layout Split Screen with Scrollview -


the following layout

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android"         android:id="@+id/content"         android:layout_width="match_parent"         android:layout_height="match_parent"         android:layout_weight="0.5"         android:layout_gravity="top"         android:background="#ffffff" >   <scrollview     android:layout_width="0dp"     android:layout_height="match_parent"     android:layout_weight="0.5"     android:gravity="center_horizontal"         android:orientation="vertical"         android:background="#ffffff"         android:layout_marginleft="15dp"         android:layout_marginright="15dp">   <linearlayout      android:layout_width="0dip"      android:layout_height="match_parent"      android:background="#f4f2f2"      android:layout_weight="0.5"      android:layout_gravity="top"      android:orientation="vertical" >   <textview             android:id="@+id/textview2"             android:layout_width="50dip"             android:layout_height="wrap_content"             android:layout_margintop="10sp"             android:gravity="left"             android:text="notes:"             android:layout_marginleft="50sp"             android:layout_marginbottom="5sp"             android:textsize="15sp"             android:textcolor="#000000" />     <edittext             android:id="@+id/notetext"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:ems="10"              android:textcolor="#000000"             android:layout_marginleft="50sp"             android:layout_marginright="50sp"             android:background="#ffffff">         </edittext>        <imageview           android:id="@+id/mimageview"           android:layout_width="match_parent"           android:layout_height="wrap_content"           android:layout_margintop="20sp"           android:src="@drawable/picframe" android:contentdescription="todo"/>        </linearlayout>   </scrollview>  <linearlayout      android:layout_width="0dip"      android:layout_height="match_parent"      android:background="#ffffff"      android:layout_weight="0.5"      android:orientation="vertical" >   <framelayout     android:id="@+id/frame"     android:layout_width="match_parent"     android:layout_height="match_parent" > </framelayout>      </linearlayout>      </linearlayout> 

basically have 3 linear layouts first 1 size of whole screen other 2 inside first , split screen 2 right hand layout displays bitmap works fine left hand layout displays notes box

this works fine want make left side scrollable if enter notes more height of screen can keep going , scroll down see rest

problem works fine until add scrollview above

the notes editbox , label disappear , cant seen if remove scrollview come back

any ideas im going wrong? appreciated

mark

these changes need in xml i.e. removing background color scrollview , shifting linear layout background scrollview , removing layout weight linear layout , setting width match_parent

<scrollview     android:layout_width="0dp"     android:layout_height="match_parent"     android:layout_weight="0.5"     android:background="#f4f2f2"         android:layout_marginleft="15dp"         android:layout_marginright="15dp">   <linearlayout      android:layout_width="match_parent"      android:layout_height="match_parent"      android:layout_gravity="top"      android:orientation="vertical" > 

Comments

Popular posts from this blog

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -