java - TextView not being displayed / Relative Layout -
this might seem easy question of folks, can't find way display textview after trying numerous solutions proposed on site. not using built-in eclipse xml tool android , textview visible on graphical layout. here's i've got far :
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/home_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <imageview android:contentdescription="@string/no_of_screens" android:id="@+id/imageviewhome" android:layout_width="290dp" android:layout_height="212dp" android:layout_gravity="center_horizontal" android:paddingtop="40dp" android:src="@drawable/logo" /> <relativelayout android:id="@+id/relativeid" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" > <button android:id="@+id/launch_button" android:layout_width="100dp" android:layout_height="wrap_content" android:layout_alignparentright="true" android:layout_centervertical="true" android:layout_marginright="80dp" android:text="@string/launch" /> <spinner android:id="@+id/spinner1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignbottom="@+id/launch_button" android:layout_marginright="20dp" android:layout_toleftof="@+id/launch_button" android:entries="@array/num_array" android:prompt="@string/screen_prompt" android:textsize="8pt" /> <textview android:id="@+id/textview1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignbaseline="@+id/launch_button" android:layout_alignbottom="@+id/launch_button" android:layout_marginright="16dp" android:layout_toleftof="@+id/spinner1" android:text="@string/no_of_screens" android:textappearance="?android:attr/textappearancemedium" /> </relativelayout> </linearlayout>
as now, of other elements being displayed correctly. appreciated!
thanks
where want textview?
i loose these two:
layout_alignbaseline="@+id/launch_button
layout_alignbottom="@+id/launch_button
and use 1 of these:
layout_below="@+id/launch_button
layout_above="@+id/launch_button
that put either above or below button.
Comments
Post a Comment