Java ImageView未显示在布局中

Java ImageView未显示在布局中,java,android,xml,Java,Android,Xml,我的布局有问题。我正在使用SlidingUpPanel,我想在TextView下面添加一个ImageView。代码是这样的 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="matc

我的布局有问题。我正在使用SlidingUpPanel,我想在TextView下面添加一个ImageView。代码是这样的

<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:fitsSystemWindows="true">

    <com.sothree.slidinguppanel.SlidingUpPanelLayout
            xmlns:sothree="http://schemas.android.com/apk/res-auto"
            android:id="@+id/panel"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="bottom"
            sothree:panelHeight="70dp"
            sothree:shadowHeight="4dp"
            sothree:paralaxOffset="100dp">       

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">                

            <com.simonedev.player.utils.PagerSlidingTabStrip
            android:id="@+id/pagerTabStrip"
            android:layout_width="match_parent"
            android:layout_height="50dip"
            android:background="@drawable/my_drawable"/>        

            <android.support.v4.view.ViewPager
            android:id="@+id/viewPager"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/pagerTabStrip"/> 

        </RelativeLayout>

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="#eeeeee"
            android:orientation="vertical">

            <ImageView
            android:id="@+id/myImage1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_alignParentEnd="true"
            android:layout_marginTop="20dp"
            android:layout_marginRight="10dp"
            android:layout_marginEnd="10dp"
            android:src="@drawable/ic_action_im"/>      

            <TextView
             android:id="@+id/text1"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginTop="5dp"
             android:layout_marginLeft="10dp"
             android:layout_marginStart="10dp"  
             android:layout_marginRight="15dp"
             android:layout_marginEnd="15dp"
             android:layout_alignParentLeft="true"
             android:fontFamily="sans-serif-condensed"
             android:singleLine="true" 
             android:ellipsize="marquee"
             android:marqueeRepeatLimit ="marquee_forever"
             android:focusable="true"
             android:focusableInTouchMode="true" 
             android:scrollHorizontally="true"
             android:textSize="18sp"/> 

            <TextView
             android:id="@+id/text2"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginTop="5dp"
             android:layout_marginLeft="10dp"
             android:layout_marginStart="10dp"
             android:layout_below="@+id/text1"
             android:fontFamily="sans-serif-light"
             android:textSize="15sp"/>      

            <RelativeLayout
            android:id="@+id/relative"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

                <TextView
             android:id="@+id/text3"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_alignParentLeft="true"
             android:layout_alignParentStart="true"
             android:layout_alignParentBottom="true"
             android:layout_marginLeft="25dp"
             android:layout_marginStart="25dp"
             android:layout_marginBottom="75dp"              
             android:textSize="17sp"
             android:text="0:00"/>      

                <SeekBar 
            android:id="@+id/seekBar" 
            android:layout_width="fill_parent" 
            android:layout_height="wrap_content" 
            android:layout_marginLeft="5dp"
            android:layout_marginStart="5dp"
            android:layout_marginRight="55dp"
            android:layout_marginEnd="55dp"
            android:layout_marginBottom="70dp"
            android:layout_toRightOf="@+id/text3"
            android:layout_toEndOf="@+id/text3"
            android:layout_alignParentBottom="true"                     
            android:max="100"/> 

                <TextView
             android:id="@+id/text4"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_alignParentRight="true"
             android:layout_alignParentEnd="true"
             android:layout_alignParentBottom="true"
             android:layout_marginRight="22dp"
             android:layout_marginEnd="22dp"
             android:layout_marginBottom="75dp"              
             android:textSize="17sp"/>      

                <ImageView
            android:id="@+id/myImage2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_alignParentEnd="true"
            android:layout_marginTop="20dp"
            android:layout_marginRight="10dp"
            android:layout_marginEnd="10dp"
            android:src="@drawable/ic_action_im2"
            android:layout_below="@+id/text4"/> 

            </RelativeLayout>   

        </RelativeLayout>
    </com.sothree.slidinguppanel.SlidingUpPanelLayout>

</RelativeLayout>


现在的问题是,当我运行我的应用程序时,myImage2不显示,我不明白为什么。错误在哪里?我该怎么解决呢?

您的图像在显示器外面

<ImageView          android:id="@+id/myImage2"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentEnd="true"
                    android:layout_alignRight="@+id/seekBar"
                    android:layout_alignTop="@+id/text3"
                    android:layout_marginEnd="10dp"
                    android:layout_marginRight="121dp"
                    android:layout_marginTop="20dp"
                    android:src="@drawable/ic_action_im2" />

只需检查上面的代码