android - UI Layout Issues -


first let me attempt layout trying accomplish here.

edittext

edittext searchbutton

listview (search result. there can one, listview adapter , height of wrap_content seems work this, there button add result listview below. once add button clicked listview collapses, after)

textview (label objects added)

listview (list of objects added, again i'm using adapter list row layout)

savebutton

i going paste code have there go through. issues having listviews. basically, listview contains objects added end pushing savebutton off of screen. have tried ton of solutions laid out on , many other sites don't seem work right.

basically, want savebutton @ bottom , don't want pushed off screen when listview gets big. solution have found "work" explicitly set height of listviews. however, causes problems when going tablet phone (nexus7 & galaxy s3). thought using dip sizes prevent happening apparently not.

if has strategy creating type of layout great. or resource learning how use android's clunky ui system (it leaves bit desired).

edit: here attempt @ using relativelayout

<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/main_background" android:orientation="vertical" >  <edittext     android:id="@+id/plan_name"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:layout_alignparenttop="true"     android:ems="10"     android:hint="@string/plan_name_hint"     android:textcolor="@color/text_color" >      <requestfocus /> </edittext>  <edittext     android:id="@+id/object_search_text"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:layout_below="@id/plan_name"     android:ems="10"     android:hint="@string/search_objects_text"     android:textcolor="@color/text_color" > </edittext>  <button     android:id="@+id/objects_search_button"     style="@style/button_text"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:layout_torightof="@id/object_search_text"     android:layout_below="@id/plan_name"     android:layout_alignparentright="true"     android:background="@drawable/black_button"     android:text="@string/search_objects_button_label" />  <listview     android:id="@+id/search_result"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:layout_below="@id/object_search_text"     android:background="@color/main_background"     android:textcolor="@color/text_color" > </listview>  <textview     android:id="@+id/objects_list_label"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:layout_below="@id/search_result"     android:paddingbottom="8dip"     android:paddingleft="8dip"     android:text="@string/plan_objects_list_label"     android:textcolor="@color/text_color"     android:textsize="22sp"     android:textstyle="bold" />  <listview     android:id="@+id/plan_objects"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:layout_below="@id/objects_list_label"     android:background="@color/main_background"     android:textcolor="@color/text_color" > </listview>  <button     android:id="@+id/save_plan_button"     style="@style/button_text"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:layout_alignparentbottom="true"     android:background="@drawable/black_button"     android:paddingleft="8dip"     android:text="@string/save_button_label" /> 

if think android ui system clunky, haven't tried understand it. things extremely designed.

if want view (or views) @ bottom, want make screen relativelayout , put android:layout_alignparentbottom="true" on element(s). add android:layout_above="id" on whatever want above them, id id of element want @ bottom.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -