Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/183.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android设计xml播放器_Android_Xml_Android Relativelayout - Fatal编程技术网

Android设计xml播放器

Android设计xml播放器,android,xml,android-relativelayout,Android,Xml,Android Relativelayout,我正在尝试做一个设计,但我不知道如何修复它。我想做的是类似于这个的东西: 我尝试了一些与你相关的东西,但没有解决我的问题。有人能告诉我怎么做吗 到目前为止,我已经有了这个,但我觉得这不是我想要的 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.a

我正在尝试做一个设计,但我不知道如何修复它。我想做的是类似于这个的东西:

我尝试了一些与你相关的东西,但没有解决我的问题。有人能告诉我怎么做吗

到目前为止,我已经有了这个,但我觉得这不是我想要的

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/content_bg" >

<include
    android:id="@+id/include2"
    layout="@layout/header" />

<include
    android:id="@+id/include1"
    layout="@layout/footer" />

<SeekBar
    android:id="@+id/Seekbar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_above="@+id/include1"
    android:layout_marginBottom="30dp"
    android:layout_marginLeft="50dp"
    android:layout_marginRight="50dp"
    android:max="100" />

<ImageView
    android:id="@+id/imageView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_above="@+id/Seekbar"
    android:layout_centerHorizontal="true"
    android:layout_marginBottom="40dp"
    android:src="@drawable/play_start" />

</RelativeLayout>
编辑,我自己修的


线性布局似乎更适合您的需要

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical">

<include
    android:id="@+id/include2"
    layout="@layout/header" />

<ImageView
    android:id="@+id/imageView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginBottom="40dp"
    android:src="@drawable/play_start" />

<SeekBar
    android:id="@+id/Seekbar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginBottom="30dp"
    android:layout_marginLeft="50dp"
    android:layout_marginRight="50dp"
    android:max="100" />

<include
    android:id="@+id/include1"
    layout="@layout/footer" />

只需设置您想要的边距,使其看起来像您想要的那样

找到解决方案。应该在布局中添加更多布局,添加解决方案来回答

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical">

<include
    android:id="@+id/include2"
    layout="@layout/header" />

<ImageView
    android:id="@+id/imageView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginBottom="40dp"
    android:src="@drawable/play_start" />

<SeekBar
    android:id="@+id/Seekbar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginBottom="30dp"
    android:layout_marginLeft="50dp"
    android:layout_marginRight="50dp"
    android:max="100" />

<include
    android:id="@+id/include1"
    layout="@layout/footer" />