android - Relative Layout squishing child views -
i have imageview , textview inside relativelayout move them around group sticks together. looks fine in graphical layout inside eclipse.
(the blue shows outline relativelayout):
however when run app, child views appear squished toghether or on top of each other. imageview doesn't show anymore. i'm not sure why occurs?
xml
<relativelayout android:id="@+id/frameb" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignbottom="@+id/squashcourt" android:layout_alignleft="@+id/squashcourt" android:layout_marginbottom="8dp" android:layout_marginleft="8dp" android:clickable="true" android:orientation="vertical" > <textview android:id="@+id/tv_aboveb" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparenttop="true" android:layout_centerhorizontal="true" android:layout_margin="3dp" android:clickable="true" android:text="robin" android:textallcaps="true" android:textappearance="?android:attr/textappearancesmall" android:textcolor="@color/red" android:textstyle="bold" /> <imageview android:id="@+id/btn_b" android:layout_width="115dp" android:layout_height="115dp" android:layout_below="@+id/tv_aboveb" android:layout_centerhorizontal="true" android:layout_margin="3dp" android:clickable="true" android:scaletype="fitxy" android:src="@drawable/b_left" /> </relativelayout>
i'm using samsung s4. can suggest something? in advance!
you can use textview
bottom drawable .
<textview android:id="@+id/tv_aboveb" android:layout_width="wrap_content" android:layout_height="wrap_content" android:clickable="true" android:text="robin" android:drawablebottom="@drawable/ic_launcher" android:textallcaps="true" android:textappearance="?android:attr/textappearancesmall" android:textcolor="#ff0000" android:textstyle="bold" />
now can move textview
on screen.
Comments
Post a Comment