I'm trying to create a fragment with height of 80dp, and at Design section it seems to work pretty well, but when I run the app on my device, RelativeLayout somehow takes a fullscreen. I use android:layout_alignParentBottom="true" for the SeekBar, but as far as I know it shouldn't take fullscreen if Layout's height isn't wrap_content. Here is the XML code:
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="80dp" android:background="#bbbbff"> <SeekBar android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/progressBar" android:layout_alignParentBottom="true" android:layout_toLeftOf="@+id/playButton"/> <Button android:layout_width="60dp" android:layout_height="60dp" android:text="play" android:layout_alignParentRight="true" android:id="@+id/playButton"/> </RelativeLayout>
No comments:
Post a Comment