Android 父RealtiveView中的重叠文本视图

Android 父RealtiveView中的重叠文本视图,android,android-layout,android-relativelayout,Android,Android Layout,Android Relativelayout,我有两个相对布局的文本视图。 我试图将TVone与父关系布局的左侧对齐,TVone与父关系布局的左侧对齐 电视台左侧,但它们重叠 欢迎您的任何意见 PS我现在一直在使用一个真实的布局 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_pare

我有两个相对布局的文本视图。 我试图将TVone与父关系布局的左侧对齐,TVone与父关系布局的左侧对齐 电视台左侧,但它们重叠

欢迎您的任何意见

PS我现在一直在使用一个真实的布局

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


    <fragment
        android:id="@+id/mapDiveSites"
        android:name="com.google.android.gms.maps.SupportMapFragment"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>


     <!-- Header with back button and shre button ,edit_txt_bg  red   android:background="#ac0b03"
     android:id="@+id/textViewDiveSiteMarkerAddress"-->

                         <!-- Header with back button and shre button -->


                        <RelativeLayout
       android:id="@+id/top_tool"
       android:layout_width="match_parent"
       android:layout_height="50dp"
       android:background="#0839AC"
       android:layout_alignBottom="@+id/mapDiveSites"
       android:alpha="0.6"
       android:orientation="horizontal"
       android:layout_margin="12dp" >



        <TextView
            android:id="@+id/tv_backButtonDiveMaps"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="left"
            android:drawableLeft="@drawable/ic_back" 
            android:layout_marginRight="5dip"
            />

        <TextView
            android:id="@+id/textViewDiveSiteMarkerAddress"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_weight="0.72"
            android:layout_alignToRightOf="@+id/tv_backButtonDiveMaps"

            android:paddingLeft="10dp"
            android:text="Touch marker For Dive details"
            android:textColor="#ffffff"
            android:textSize="18sp"
             android:drawableRight="@drawable/ic_share" />


    </RelativeLayout>


</RelativeLayout>

这是你想要的吗

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

        <fragment
            android:id="@+id/mapDiveSites"
            android:name="com.google.android.gms.maps.SupportMapFragment"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

        <RelativeLayout
            android:id="@+id/top_tool"
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:layout_alignBottom="@+id/mapDiveSites"
            android:layout_margin="12dp"
            android:alpha="0.6"
            android:background="#0839AC"
            android:orientation="horizontal" >

            <TextView
                android:id="@+id/tv_backButtonDiveMaps"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginRight="5dip"
                android:drawableLeft="@drawable/ic_launcher"
                android:gravity="left" />

            <TextView
                android:id="@+id/textViewDiveSiteMarkerAddress"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_toRightOf="@+id/tv_backButtonDiveMaps"
                android:drawableRight="@drawable/ic_launcher"
                android:paddingLeft="10dp"
                android:text="Touch marker For Dive details"
                android:textColor="#ffffff"
                android:textSize="18sp" />
        </RelativeLayout>

    </RelativeLayout>


Perfect,您更改了什么属性?删除了这两行android:layout_weight=“0.72”android:layout_alignToRightOf=“@+id/tv_backButtonDiveMaps”,并添加了android:layout_toRightOf=“@+id/tv_backButtonDiveMaps”。