this is my layout for audio player the problem is when resolution is high there is balck space vacant under the play and delete button which located at the bottom of the ui. what i do?
>
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="840dp"
android:background="#333134"
>
<LinearLayout
android:layout_marginTop="20dp"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
>
<TextView
android:paddingTop="10dp"
android:id="@+id/Rec_T开发者_开发技巧imer_ID"
android:text="00:00"
android:textSize="70sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</TextView>
</LinearLayout>
<LinearLayout
android:layout_marginTop="40dp"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_height="wrap_content">
<Button
android:id ="@+id/Button_record_sound"
android:background="@drawable/rec_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</LinearLayout>
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="vertical"
>
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="horizontal"
android:layout_marginTop="30dp"
>
<LinearLayout android:layout_height="20dp"
android:layout_width="30dp"
android:gravity="center_horizontal">
<View
android:id="@+id/View1"
android:background= "#ffffff"
android:layout_width="5dp"
android:layout_height="5dp"
android:layout_marginTop="5dp"
/>
</LinearLayout>
<TextView
android:id="@+id/Description"
android:textColor="#ffffff"
android:textStyle="bold"
android:textSize="13sp"
android:paddingLeft="6dip"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:gravity="top"
android:minLines="2"
android:maxLines="2"
/>
</LinearLayout>
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="horizontal"
android:layout_marginTop="5dip"
>
<LinearLayout android:layout_height="20dp"
android:layout_width="30dp"
android:gravity="center_horizontal">
<View
android:id="@+id/View22"
android:background= "#ffffff"
android:layout_width="5dp"
android:layout_height="5dp"
android:layout_marginTop="5dp"
/>
</LinearLayout>
<TextView
android:id="@+id/Description2"
android:textColor="#ffffff"
android:textStyle="bold"
android:textSize="13sp"
android:paddingLeft="6dip"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:minLines="2"
android:maxLines="2"
/>
</LinearLayout>
</LinearLayout>
<ImageView
android:layout_marginTop="2dp"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="@drawable/bar1"/>
<LinearLayout
android:layout_marginTop="10dp"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:clickable="false"
android:orientation="horizontal">
<TextView
android:id="@+id/TimerStart"
android:text="00:00"
android:textSize="11sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<SeekBar
android:padding="7dp"
android:id="@+id/SeekBar01"
android:layout_width="245dip"
android:layout_height="wrap_content"
android:clickable="false"
android:focusable="false"
android:longClickable="false"
/>
<TextView
android:id="@+id/TimerStop"
android:text="00:00"
android:textSize="11sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<LinearLayout
android:background="@drawable/br_12"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:layout_marginBottom="1dp"
>
<Button
android:gravity="center_horizontal"
android:id ="@+id/Button_Play_Sound"
android:background="@drawable/play1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<Button
android:gravity="center_horizontal"
android:visibility="invisible"
android:layout_width="8dp"
android:layout_height="wrap_content"
/>
<Button
android:gravity="center_horizontal"
android:id ="@+id/Button_Delete_Sound"
android:background="@drawable/trash"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</LinearLayout>
</LinearLayout>
</ScrollView>
I've not done much android programming but have you thought about creating multiple UI's for different screen resolutions?
Supporting Multiple Screens
精彩评论