android中的网格无法运行

android中的网格无法运行,android,layout,grid,Android,Layout,Grid,我目前正在开发某种音乐播放器,我想得到一个特定的布局,但我无法让它工作,我希望你们能给我指出正确的方向: 我已经做了一个图像,这样你们可以理解我希望我的布局是怎样的 我目前拥有的: <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_above="@id/bottomlayout"

我目前正在开发某种音乐播放器,我想得到一个特定的布局,但我无法让它工作,我希望你们能给我指出正确的方向:

我已经做了一个图像,这样你们可以理解我希望我的布局是怎样的

我目前拥有的:

<RelativeLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_above="@id/bottomlayout"
        android:layout_below="@id/toplayout"
        android:padding="10dip"

        >
        <LinearLayout
            android:id="@+id/llTitleContainer"
            android:layout_width="400dip"
            android:layout_height="60dip"
            android:layout_centerHorizontal="true"
            android:background="@drawable/cell"
            android:orientation="vertical"
            >

            <TextView
                android:id="@+id/tvTrackTitle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textStyle="bold"
                android:textSize="10dip"
                android:text="Song"
                android:textColor="#000"
                 />
            <TextView
                android:id="@+id/tvTrackArtist"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Artist"
                android:textColor="#000"
                 />

        </LinearLayout>
        <RelativeLayout
            android:layout_height="fill_parent"
            android:layout_width="fill_parent"
            android:layout_below="@id/llTitleContainer"

            >

            <RelativeLayout
                android:layout_height="240dip"
                android:layout_width="225dip"
                android:padding="10dip"
                android:background="#F1F1F1"
                android:id="@+id/rlCoverArtContainer"
                >

                <ImageView
                    android:id="@+id/ivCoverArt"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    android:src="@drawable/cover"
                    />



            </RelativeLayout>
             <Button
                 android:id="@+id/bAddToFavorites"
                 android:layout_width="80dip"
                 android:layout_height="80dip"
                 android:layout_alignTop="@id/rlCoverArtContainer"
                 android:layout_marginLeft="1dip"
                 android:layout_marginBottom="1dip"
                 android:layout_toRightOf="@id/rlCoverArtContainer"
                 android:background="@drawable/btn_fav_up" />

              <Button
                    android:id="@+id/bInfo"
                    android:layout_width="80dip"
                    android:layout_height="80dip"
                    android:background="@drawable/btn_artist_info_up"
                    android:layout_toRightOf="@id/rlCoverArtContainer"
                    android:layout_below="@id/bAddToFavorites"
                    android:layout_marginLeft="1dip"
                    android:layout_marginBottom="1dip"
                    />
               <Button
                    android:id="@+id/bShare"
                    android:layout_width="80dip"
                    android:layout_height="80dip"
                    android:background="@drawable/btn_share_up"
                    android:layout_toRightOf="@id/rlCoverArtContainer"
                    android:layout_below="@id/bInfo"
                    android:layout_marginLeft="1dip"
                    android:layout_marginBottom="1dip"
                    />

               <Button
                    android:id="@+id/bPrev"
                    android:layout_width="80dip"
                    android:layout_height="80dip"
                    android:background="@drawable/btn_prev_up"
                    android:layout_below="@id/rlCoverArtContainer"
                    android:layout_marginTop="1dip"
                    />
               <Button
                    android:id="@+id/bPlay"
                    android:layout_width="80dip"
                    android:layout_height="80dip"
                    android:background="@drawable/btn_play_up"
                    android:layout_below="@id/rlCoverArtContainer"
                    android:layout_toRightOf="@id/bPrev"
                    android:layout_marginLeft="1dip"
                    android:layout_marginTop="1dip"
                    />
               <Button
                    android:id="@+id/bNext"
                    android:layout_width="80dip"
                    android:layout_height="80dip"
                    android:background="@drawable/btn_next_up"
                    android:layout_below="@id/rlCoverArtContainer"
                    android:layout_toRightOf="@id/bPlay"
                    android:layout_marginLeft="1dip"
                    android:layout_marginTop="1dip"
                    />

        </RelativeLayout>

    </RelativeLayout>

试试这个:

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

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1.0"
        android:orientation="horizontal" >

        <Button
            android:layout_width="wrap_content"
            android:layout_height="fill_parent"
            android:layout_weight="1.0"
            android:text="Button" />

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1.0"
            android:orientation="vertical" >

            <Button
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="Button" />

            <Button
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="Button" />

            <Button
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="Button" />
        </LinearLayout>
    </LinearLayout>

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1.0" >

        <Button
            android:layout_width="wrap_content"
            android:layout_height="fill_parent"
            android:layout_weight="1.0"
            android:text="Button" />

        <Button
            android:layout_width="wrap_content"
            android:layout_height="fill_parent"
            android:layout_weight="1.0"
            android:text="Button" />

        <Button
            android:layout_width="wrap_content"
            android:layout_height="fill_parent"
            android:layout_weight="1.0"
            android:text="Button" />

        <Button
            android:layout_width="wrap_content"
            android:layout_height="fill_parent"
            android:layout_weight="1.0"
            android:text="Button" />
    </LinearLayout>

</LinearLayout>