ImageView present, but not visible in display












1















I am trying to display an ImageView over the intersection of two RelativeView's, but am running into some issues.



I have added the ImageView and the adjustment borders show up and allow me to constrain and resize the element, but it is not visible. If I put the ImageView inside one of the RelativeView's then the image will show up, but I cannot overlap the intersection of the two RelativeView's like I am wanting to.



In this screenshot here, you can see the ImageView is present and overlapping the middle of the screen, but no image is showing.



enter image description here



And this is my entire .xml



<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main_inference"
android:layout_width="match_parent"
android:layout_height="match_parent">


<ImageView
android:id="@+id/spinner"
android:layout_width="351dp"
android:layout_height="62dp"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
app:layout_constraintBottom_toBottomOf="@+id/linearLayout"
app:layout_constraintEnd_toEndOf="@+id/linearLayout"
app:layout_constraintStart_toStartOf="@+id/linearLayout"
app:layout_constraintTop_toTopOf="@+id/linearLayout"
app:srcCompat="@drawable/spinner" />

<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:orientation="vertical">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_weight="1"
android:background="@color/colorCoral">

<View
android:id="@+id/p1circle1"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignStart="@+id/p1Tracker"
android:layout_alignLeft="@+id/p1Tracker"
android:layout_alignTop="@+id/p1Tracker"
android:layout_alignBottom="@+id/p1Tracker"
android:layout_marginStart="9dp"
android:layout_marginLeft="9dp"
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp"
android:background="@drawable/circle" />

<View
android:id="@+id/p1circle2"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignTop="@+id/p1Tracker"
android:layout_alignEnd="@+id/p1Tracker"
android:layout_alignRight="@+id/p1Tracker"
android:layout_alignBottom="@+id/p1Tracker"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_marginStart="199dp"
android:layout_marginLeft="199dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="11dp"
android:layout_marginRight="11dp"
android:layout_marginBottom="4dp"
android:background="@drawable/circle" />

<View
android:id="@+id/p1Tracker"
android:layout_width="wrap_content"
android:layout_height="28dp"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginStart="154dp"
android:layout_marginLeft="154dp"
android:layout_marginTop="137dp"
android:layout_marginEnd="154dp"
android:layout_marginRight="154dp"
android:background="@drawable/trackbox" />

<ImageView
android:id="@+id/imageView4"
android:layout_width="wrap_content"
android:layout_height="108dp"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginStart="139dp"
android:layout_marginLeft="139dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="137dp"
android:layout_marginRight="137dp"
android:layout_marginBottom="144dp"
tools:srcCompat="@tools:sample/avatars" />

<TextView
android:id="@+id/usernamep1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginStart="156dp"
android:layout_marginLeft="156dp"
android:layout_marginTop="6dp"
android:layout_marginEnd="156dp"
android:layout_marginRight="156dp"
android:fontFamily="sans-serif-condensed"
android:text="Username"
android:textColor="@color/White"
android:textSize="18sp" />

</RelativeLayout>

<View
android:id="@+id/myRectangleView"
android:layout_width="match_parent"
android:layout_height="3dp"
android:background="@drawable/rectangle" />

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_weight="1"
android:background="@color/colorBackground2">

<TextView
android:id="@+id/usernamep2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginStart="156dp"
android:layout_marginLeft="156dp"
android:layout_marginTop="253dp"
android:layout_marginEnd="156dp"
android:layout_marginRight="156dp"
android:fontFamily="sans-serif-condensed"
android:text="Username"
android:textColor="@color/White"
android:textSize="18sp" />

<View
android:id="@+id/p1circle4"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignTop="@+id/p1circle3"
android:layout_alignEnd="@+id/p1Tracker2"
android:layout_alignRight="@+id/p1Tracker2"
android:layout_marginTop="0dp"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:background="@drawable/circle" />

<View
android:id="@+id/p1circle3"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignStart="@+id/p1Tracker2"
android:layout_alignLeft="@+id/p1Tracker2"
android:layout_alignTop="@+id/p1Tracker2"
android:layout_alignBottom="@+id/p1Tracker2"
android:layout_marginStart="10dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp"
android:background="@drawable/circle" />

<View
android:id="@+id/p1Tracker2"
android:layout_width="wrap_content"
android:layout_height="28dp"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginStart="154dp"
android:layout_marginLeft="154dp"
android:layout_marginTop="110dp"
android:layout_marginEnd="154dp"
android:layout_marginRight="154dp"
android:background="@drawable/trackbox" />

<ImageView
android:id="@+id/imageView6"
android:layout_width="wrap_content"
android:layout_height="108dp"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginStart="138dp"
android:layout_marginLeft="138dp"
android:layout_marginTop="144dp"
android:layout_marginEnd="138dp"
android:layout_marginRight="138dp"
android:layout_marginBottom="30dp"
tools:srcCompat="@tools:sample/avatars" />
</RelativeLayout>
</LinearLayout>

</android.support.constraint.ConstraintLayout>


The image in question is titled spinner










share|improve this question



























    1















    I am trying to display an ImageView over the intersection of two RelativeView's, but am running into some issues.



    I have added the ImageView and the adjustment borders show up and allow me to constrain and resize the element, but it is not visible. If I put the ImageView inside one of the RelativeView's then the image will show up, but I cannot overlap the intersection of the two RelativeView's like I am wanting to.



    In this screenshot here, you can see the ImageView is present and overlapping the middle of the screen, but no image is showing.



    enter image description here



    And this is my entire .xml



    <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_main_inference"
    android:layout_width="match_parent"
    android:layout_height="match_parent">


    <ImageView
    android:id="@+id/spinner"
    android:layout_width="351dp"
    android:layout_height="62dp"
    android:layout_alignParentStart="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentBottom="true"
    app:layout_constraintBottom_toBottomOf="@+id/linearLayout"
    app:layout_constraintEnd_toEndOf="@+id/linearLayout"
    app:layout_constraintStart_toStartOf="@+id/linearLayout"
    app:layout_constraintTop_toTopOf="@+id/linearLayout"
    app:srcCompat="@drawable/spinner" />

    <LinearLayout
    android:id="@+id/linearLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:baselineAligned="false"
    android:orientation="vertical">

    <RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="100dp"
    android:layout_weight="1"
    android:background="@color/colorCoral">

    <View
    android:id="@+id/p1circle1"
    android:layout_width="20dp"
    android:layout_height="20dp"
    android:layout_alignStart="@+id/p1Tracker"
    android:layout_alignLeft="@+id/p1Tracker"
    android:layout_alignTop="@+id/p1Tracker"
    android:layout_alignBottom="@+id/p1Tracker"
    android:layout_marginStart="9dp"
    android:layout_marginLeft="9dp"
    android:layout_marginTop="4dp"
    android:layout_marginBottom="4dp"
    android:background="@drawable/circle" />

    <View
    android:id="@+id/p1circle2"
    android:layout_width="20dp"
    android:layout_height="20dp"
    android:layout_alignTop="@+id/p1Tracker"
    android:layout_alignEnd="@+id/p1Tracker"
    android:layout_alignRight="@+id/p1Tracker"
    android:layout_alignBottom="@+id/p1Tracker"
    android:layout_alignParentStart="true"
    android:layout_alignParentLeft="true"
    android:layout_marginStart="199dp"
    android:layout_marginLeft="199dp"
    android:layout_marginTop="4dp"
    android:layout_marginEnd="11dp"
    android:layout_marginRight="11dp"
    android:layout_marginBottom="4dp"
    android:background="@drawable/circle" />

    <View
    android:id="@+id/p1Tracker"
    android:layout_width="wrap_content"
    android:layout_height="28dp"
    android:layout_alignParentStart="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    android:layout_alignParentEnd="true"
    android:layout_alignParentRight="true"
    android:layout_marginStart="154dp"
    android:layout_marginLeft="154dp"
    android:layout_marginTop="137dp"
    android:layout_marginEnd="154dp"
    android:layout_marginRight="154dp"
    android:background="@drawable/trackbox" />

    <ImageView
    android:id="@+id/imageView4"
    android:layout_width="wrap_content"
    android:layout_height="108dp"
    android:layout_alignParentStart="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    android:layout_alignParentEnd="true"
    android:layout_alignParentRight="true"
    android:layout_alignParentBottom="true"
    android:layout_marginStart="139dp"
    android:layout_marginLeft="139dp"
    android:layout_marginTop="30dp"
    android:layout_marginEnd="137dp"
    android:layout_marginRight="137dp"
    android:layout_marginBottom="144dp"
    tools:srcCompat="@tools:sample/avatars" />

    <TextView
    android:id="@+id/usernamep1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentStart="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    android:layout_alignParentEnd="true"
    android:layout_alignParentRight="true"
    android:layout_marginStart="156dp"
    android:layout_marginLeft="156dp"
    android:layout_marginTop="6dp"
    android:layout_marginEnd="156dp"
    android:layout_marginRight="156dp"
    android:fontFamily="sans-serif-condensed"
    android:text="Username"
    android:textColor="@color/White"
    android:textSize="18sp" />

    </RelativeLayout>

    <View
    android:id="@+id/myRectangleView"
    android:layout_width="match_parent"
    android:layout_height="3dp"
    android:background="@drawable/rectangle" />

    <RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="100dp"
    android:layout_weight="1"
    android:background="@color/colorBackground2">

    <TextView
    android:id="@+id/usernamep2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentStart="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    android:layout_alignParentEnd="true"
    android:layout_alignParentRight="true"
    android:layout_marginStart="156dp"
    android:layout_marginLeft="156dp"
    android:layout_marginTop="253dp"
    android:layout_marginEnd="156dp"
    android:layout_marginRight="156dp"
    android:fontFamily="sans-serif-condensed"
    android:text="Username"
    android:textColor="@color/White"
    android:textSize="18sp" />

    <View
    android:id="@+id/p1circle4"
    android:layout_width="20dp"
    android:layout_height="20dp"
    android:layout_alignTop="@+id/p1circle3"
    android:layout_alignEnd="@+id/p1Tracker2"
    android:layout_alignRight="@+id/p1Tracker2"
    android:layout_marginTop="0dp"
    android:layout_marginEnd="10dp"
    android:layout_marginRight="10dp"
    android:background="@drawable/circle" />

    <View
    android:id="@+id/p1circle3"
    android:layout_width="20dp"
    android:layout_height="20dp"
    android:layout_alignStart="@+id/p1Tracker2"
    android:layout_alignLeft="@+id/p1Tracker2"
    android:layout_alignTop="@+id/p1Tracker2"
    android:layout_alignBottom="@+id/p1Tracker2"
    android:layout_marginStart="10dp"
    android:layout_marginLeft="10dp"
    android:layout_marginTop="4dp"
    android:layout_marginBottom="4dp"
    android:background="@drawable/circle" />

    <View
    android:id="@+id/p1Tracker2"
    android:layout_width="wrap_content"
    android:layout_height="28dp"
    android:layout_alignParentStart="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    android:layout_alignParentEnd="true"
    android:layout_alignParentRight="true"
    android:layout_marginStart="154dp"
    android:layout_marginLeft="154dp"
    android:layout_marginTop="110dp"
    android:layout_marginEnd="154dp"
    android:layout_marginRight="154dp"
    android:background="@drawable/trackbox" />

    <ImageView
    android:id="@+id/imageView6"
    android:layout_width="wrap_content"
    android:layout_height="108dp"
    android:layout_alignParentStart="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    android:layout_alignParentEnd="true"
    android:layout_alignParentRight="true"
    android:layout_alignParentBottom="true"
    android:layout_marginStart="138dp"
    android:layout_marginLeft="138dp"
    android:layout_marginTop="144dp"
    android:layout_marginEnd="138dp"
    android:layout_marginRight="138dp"
    android:layout_marginBottom="30dp"
    tools:srcCompat="@tools:sample/avatars" />
    </RelativeLayout>
    </LinearLayout>

    </android.support.constraint.ConstraintLayout>


    The image in question is titled spinner










    share|improve this question

























      1












      1








      1








      I am trying to display an ImageView over the intersection of two RelativeView's, but am running into some issues.



      I have added the ImageView and the adjustment borders show up and allow me to constrain and resize the element, but it is not visible. If I put the ImageView inside one of the RelativeView's then the image will show up, but I cannot overlap the intersection of the two RelativeView's like I am wanting to.



      In this screenshot here, you can see the ImageView is present and overlapping the middle of the screen, but no image is showing.



      enter image description here



      And this is my entire .xml



      <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/activity_main_inference"
      android:layout_width="match_parent"
      android:layout_height="match_parent">


      <ImageView
      android:id="@+id/spinner"
      android:layout_width="351dp"
      android:layout_height="62dp"
      android:layout_alignParentStart="true"
      android:layout_alignParentLeft="true"
      android:layout_alignParentBottom="true"
      app:layout_constraintBottom_toBottomOf="@+id/linearLayout"
      app:layout_constraintEnd_toEndOf="@+id/linearLayout"
      app:layout_constraintStart_toStartOf="@+id/linearLayout"
      app:layout_constraintTop_toTopOf="@+id/linearLayout"
      app:srcCompat="@drawable/spinner" />

      <LinearLayout
      android:id="@+id/linearLayout"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:baselineAligned="false"
      android:orientation="vertical">

      <RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="100dp"
      android:layout_weight="1"
      android:background="@color/colorCoral">

      <View
      android:id="@+id/p1circle1"
      android:layout_width="20dp"
      android:layout_height="20dp"
      android:layout_alignStart="@+id/p1Tracker"
      android:layout_alignLeft="@+id/p1Tracker"
      android:layout_alignTop="@+id/p1Tracker"
      android:layout_alignBottom="@+id/p1Tracker"
      android:layout_marginStart="9dp"
      android:layout_marginLeft="9dp"
      android:layout_marginTop="4dp"
      android:layout_marginBottom="4dp"
      android:background="@drawable/circle" />

      <View
      android:id="@+id/p1circle2"
      android:layout_width="20dp"
      android:layout_height="20dp"
      android:layout_alignTop="@+id/p1Tracker"
      android:layout_alignEnd="@+id/p1Tracker"
      android:layout_alignRight="@+id/p1Tracker"
      android:layout_alignBottom="@+id/p1Tracker"
      android:layout_alignParentStart="true"
      android:layout_alignParentLeft="true"
      android:layout_marginStart="199dp"
      android:layout_marginLeft="199dp"
      android:layout_marginTop="4dp"
      android:layout_marginEnd="11dp"
      android:layout_marginRight="11dp"
      android:layout_marginBottom="4dp"
      android:background="@drawable/circle" />

      <View
      android:id="@+id/p1Tracker"
      android:layout_width="wrap_content"
      android:layout_height="28dp"
      android:layout_alignParentStart="true"
      android:layout_alignParentLeft="true"
      android:layout_alignParentTop="true"
      android:layout_alignParentEnd="true"
      android:layout_alignParentRight="true"
      android:layout_marginStart="154dp"
      android:layout_marginLeft="154dp"
      android:layout_marginTop="137dp"
      android:layout_marginEnd="154dp"
      android:layout_marginRight="154dp"
      android:background="@drawable/trackbox" />

      <ImageView
      android:id="@+id/imageView4"
      android:layout_width="wrap_content"
      android:layout_height="108dp"
      android:layout_alignParentStart="true"
      android:layout_alignParentLeft="true"
      android:layout_alignParentTop="true"
      android:layout_alignParentEnd="true"
      android:layout_alignParentRight="true"
      android:layout_alignParentBottom="true"
      android:layout_marginStart="139dp"
      android:layout_marginLeft="139dp"
      android:layout_marginTop="30dp"
      android:layout_marginEnd="137dp"
      android:layout_marginRight="137dp"
      android:layout_marginBottom="144dp"
      tools:srcCompat="@tools:sample/avatars" />

      <TextView
      android:id="@+id/usernamep1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentStart="true"
      android:layout_alignParentLeft="true"
      android:layout_alignParentTop="true"
      android:layout_alignParentEnd="true"
      android:layout_alignParentRight="true"
      android:layout_marginStart="156dp"
      android:layout_marginLeft="156dp"
      android:layout_marginTop="6dp"
      android:layout_marginEnd="156dp"
      android:layout_marginRight="156dp"
      android:fontFamily="sans-serif-condensed"
      android:text="Username"
      android:textColor="@color/White"
      android:textSize="18sp" />

      </RelativeLayout>

      <View
      android:id="@+id/myRectangleView"
      android:layout_width="match_parent"
      android:layout_height="3dp"
      android:background="@drawable/rectangle" />

      <RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="100dp"
      android:layout_weight="1"
      android:background="@color/colorBackground2">

      <TextView
      android:id="@+id/usernamep2"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentStart="true"
      android:layout_alignParentLeft="true"
      android:layout_alignParentTop="true"
      android:layout_alignParentEnd="true"
      android:layout_alignParentRight="true"
      android:layout_marginStart="156dp"
      android:layout_marginLeft="156dp"
      android:layout_marginTop="253dp"
      android:layout_marginEnd="156dp"
      android:layout_marginRight="156dp"
      android:fontFamily="sans-serif-condensed"
      android:text="Username"
      android:textColor="@color/White"
      android:textSize="18sp" />

      <View
      android:id="@+id/p1circle4"
      android:layout_width="20dp"
      android:layout_height="20dp"
      android:layout_alignTop="@+id/p1circle3"
      android:layout_alignEnd="@+id/p1Tracker2"
      android:layout_alignRight="@+id/p1Tracker2"
      android:layout_marginTop="0dp"
      android:layout_marginEnd="10dp"
      android:layout_marginRight="10dp"
      android:background="@drawable/circle" />

      <View
      android:id="@+id/p1circle3"
      android:layout_width="20dp"
      android:layout_height="20dp"
      android:layout_alignStart="@+id/p1Tracker2"
      android:layout_alignLeft="@+id/p1Tracker2"
      android:layout_alignTop="@+id/p1Tracker2"
      android:layout_alignBottom="@+id/p1Tracker2"
      android:layout_marginStart="10dp"
      android:layout_marginLeft="10dp"
      android:layout_marginTop="4dp"
      android:layout_marginBottom="4dp"
      android:background="@drawable/circle" />

      <View
      android:id="@+id/p1Tracker2"
      android:layout_width="wrap_content"
      android:layout_height="28dp"
      android:layout_alignParentStart="true"
      android:layout_alignParentLeft="true"
      android:layout_alignParentTop="true"
      android:layout_alignParentEnd="true"
      android:layout_alignParentRight="true"
      android:layout_marginStart="154dp"
      android:layout_marginLeft="154dp"
      android:layout_marginTop="110dp"
      android:layout_marginEnd="154dp"
      android:layout_marginRight="154dp"
      android:background="@drawable/trackbox" />

      <ImageView
      android:id="@+id/imageView6"
      android:layout_width="wrap_content"
      android:layout_height="108dp"
      android:layout_alignParentStart="true"
      android:layout_alignParentLeft="true"
      android:layout_alignParentTop="true"
      android:layout_alignParentEnd="true"
      android:layout_alignParentRight="true"
      android:layout_alignParentBottom="true"
      android:layout_marginStart="138dp"
      android:layout_marginLeft="138dp"
      android:layout_marginTop="144dp"
      android:layout_marginEnd="138dp"
      android:layout_marginRight="138dp"
      android:layout_marginBottom="30dp"
      tools:srcCompat="@tools:sample/avatars" />
      </RelativeLayout>
      </LinearLayout>

      </android.support.constraint.ConstraintLayout>


      The image in question is titled spinner










      share|improve this question














      I am trying to display an ImageView over the intersection of two RelativeView's, but am running into some issues.



      I have added the ImageView and the adjustment borders show up and allow me to constrain and resize the element, but it is not visible. If I put the ImageView inside one of the RelativeView's then the image will show up, but I cannot overlap the intersection of the two RelativeView's like I am wanting to.



      In this screenshot here, you can see the ImageView is present and overlapping the middle of the screen, but no image is showing.



      enter image description here



      And this is my entire .xml



      <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/activity_main_inference"
      android:layout_width="match_parent"
      android:layout_height="match_parent">


      <ImageView
      android:id="@+id/spinner"
      android:layout_width="351dp"
      android:layout_height="62dp"
      android:layout_alignParentStart="true"
      android:layout_alignParentLeft="true"
      android:layout_alignParentBottom="true"
      app:layout_constraintBottom_toBottomOf="@+id/linearLayout"
      app:layout_constraintEnd_toEndOf="@+id/linearLayout"
      app:layout_constraintStart_toStartOf="@+id/linearLayout"
      app:layout_constraintTop_toTopOf="@+id/linearLayout"
      app:srcCompat="@drawable/spinner" />

      <LinearLayout
      android:id="@+id/linearLayout"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:baselineAligned="false"
      android:orientation="vertical">

      <RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="100dp"
      android:layout_weight="1"
      android:background="@color/colorCoral">

      <View
      android:id="@+id/p1circle1"
      android:layout_width="20dp"
      android:layout_height="20dp"
      android:layout_alignStart="@+id/p1Tracker"
      android:layout_alignLeft="@+id/p1Tracker"
      android:layout_alignTop="@+id/p1Tracker"
      android:layout_alignBottom="@+id/p1Tracker"
      android:layout_marginStart="9dp"
      android:layout_marginLeft="9dp"
      android:layout_marginTop="4dp"
      android:layout_marginBottom="4dp"
      android:background="@drawable/circle" />

      <View
      android:id="@+id/p1circle2"
      android:layout_width="20dp"
      android:layout_height="20dp"
      android:layout_alignTop="@+id/p1Tracker"
      android:layout_alignEnd="@+id/p1Tracker"
      android:layout_alignRight="@+id/p1Tracker"
      android:layout_alignBottom="@+id/p1Tracker"
      android:layout_alignParentStart="true"
      android:layout_alignParentLeft="true"
      android:layout_marginStart="199dp"
      android:layout_marginLeft="199dp"
      android:layout_marginTop="4dp"
      android:layout_marginEnd="11dp"
      android:layout_marginRight="11dp"
      android:layout_marginBottom="4dp"
      android:background="@drawable/circle" />

      <View
      android:id="@+id/p1Tracker"
      android:layout_width="wrap_content"
      android:layout_height="28dp"
      android:layout_alignParentStart="true"
      android:layout_alignParentLeft="true"
      android:layout_alignParentTop="true"
      android:layout_alignParentEnd="true"
      android:layout_alignParentRight="true"
      android:layout_marginStart="154dp"
      android:layout_marginLeft="154dp"
      android:layout_marginTop="137dp"
      android:layout_marginEnd="154dp"
      android:layout_marginRight="154dp"
      android:background="@drawable/trackbox" />

      <ImageView
      android:id="@+id/imageView4"
      android:layout_width="wrap_content"
      android:layout_height="108dp"
      android:layout_alignParentStart="true"
      android:layout_alignParentLeft="true"
      android:layout_alignParentTop="true"
      android:layout_alignParentEnd="true"
      android:layout_alignParentRight="true"
      android:layout_alignParentBottom="true"
      android:layout_marginStart="139dp"
      android:layout_marginLeft="139dp"
      android:layout_marginTop="30dp"
      android:layout_marginEnd="137dp"
      android:layout_marginRight="137dp"
      android:layout_marginBottom="144dp"
      tools:srcCompat="@tools:sample/avatars" />

      <TextView
      android:id="@+id/usernamep1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentStart="true"
      android:layout_alignParentLeft="true"
      android:layout_alignParentTop="true"
      android:layout_alignParentEnd="true"
      android:layout_alignParentRight="true"
      android:layout_marginStart="156dp"
      android:layout_marginLeft="156dp"
      android:layout_marginTop="6dp"
      android:layout_marginEnd="156dp"
      android:layout_marginRight="156dp"
      android:fontFamily="sans-serif-condensed"
      android:text="Username"
      android:textColor="@color/White"
      android:textSize="18sp" />

      </RelativeLayout>

      <View
      android:id="@+id/myRectangleView"
      android:layout_width="match_parent"
      android:layout_height="3dp"
      android:background="@drawable/rectangle" />

      <RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="100dp"
      android:layout_weight="1"
      android:background="@color/colorBackground2">

      <TextView
      android:id="@+id/usernamep2"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentStart="true"
      android:layout_alignParentLeft="true"
      android:layout_alignParentTop="true"
      android:layout_alignParentEnd="true"
      android:layout_alignParentRight="true"
      android:layout_marginStart="156dp"
      android:layout_marginLeft="156dp"
      android:layout_marginTop="253dp"
      android:layout_marginEnd="156dp"
      android:layout_marginRight="156dp"
      android:fontFamily="sans-serif-condensed"
      android:text="Username"
      android:textColor="@color/White"
      android:textSize="18sp" />

      <View
      android:id="@+id/p1circle4"
      android:layout_width="20dp"
      android:layout_height="20dp"
      android:layout_alignTop="@+id/p1circle3"
      android:layout_alignEnd="@+id/p1Tracker2"
      android:layout_alignRight="@+id/p1Tracker2"
      android:layout_marginTop="0dp"
      android:layout_marginEnd="10dp"
      android:layout_marginRight="10dp"
      android:background="@drawable/circle" />

      <View
      android:id="@+id/p1circle3"
      android:layout_width="20dp"
      android:layout_height="20dp"
      android:layout_alignStart="@+id/p1Tracker2"
      android:layout_alignLeft="@+id/p1Tracker2"
      android:layout_alignTop="@+id/p1Tracker2"
      android:layout_alignBottom="@+id/p1Tracker2"
      android:layout_marginStart="10dp"
      android:layout_marginLeft="10dp"
      android:layout_marginTop="4dp"
      android:layout_marginBottom="4dp"
      android:background="@drawable/circle" />

      <View
      android:id="@+id/p1Tracker2"
      android:layout_width="wrap_content"
      android:layout_height="28dp"
      android:layout_alignParentStart="true"
      android:layout_alignParentLeft="true"
      android:layout_alignParentTop="true"
      android:layout_alignParentEnd="true"
      android:layout_alignParentRight="true"
      android:layout_marginStart="154dp"
      android:layout_marginLeft="154dp"
      android:layout_marginTop="110dp"
      android:layout_marginEnd="154dp"
      android:layout_marginRight="154dp"
      android:background="@drawable/trackbox" />

      <ImageView
      android:id="@+id/imageView6"
      android:layout_width="wrap_content"
      android:layout_height="108dp"
      android:layout_alignParentStart="true"
      android:layout_alignParentLeft="true"
      android:layout_alignParentTop="true"
      android:layout_alignParentEnd="true"
      android:layout_alignParentRight="true"
      android:layout_alignParentBottom="true"
      android:layout_marginStart="138dp"
      android:layout_marginLeft="138dp"
      android:layout_marginTop="144dp"
      android:layout_marginEnd="138dp"
      android:layout_marginRight="138dp"
      android:layout_marginBottom="30dp"
      tools:srcCompat="@tools:sample/avatars" />
      </RelativeLayout>
      </LinearLayout>

      </android.support.constraint.ConstraintLayout>


      The image in question is titled spinner







      android xml imageview display






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 19 at 6:11









      brent_mbbrent_mb

      496




      496
























          1 Answer
          1






          active

          oldest

          votes


















          1














          the imageview you want to display on top needs to be relative to one of the views not to the edge of the parent, it is where you want it to be but behind both your relativeviews ie you need to be Centring to the edge of a sibling.also set elevation property to make sure it's on top



          <ImageView
          android:id="@+id/ImageView"
          android:layout_width="wrap_content"
          android:elevation="2dp"
          android:layout_height="wrap_content"
          app:layout_constraintTop_toBottomOf="@+id/siblingRelativeView1"
          app:layout_constraintBottom_toBottomOf="@+id/siblingRelativeView2"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintEnd_toEndOf="parent"/>


          This gif demos the concept for a textview to center of imageview, waht you want is to center the top to the first relativeview and bottom to second relative view
          Centering to sibling view
          try reading



          https://constraintlayout.com/tricks/centring.html






          share|improve this answer

























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54264556%2fimageview-present-but-not-visible-in-display%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            the imageview you want to display on top needs to be relative to one of the views not to the edge of the parent, it is where you want it to be but behind both your relativeviews ie you need to be Centring to the edge of a sibling.also set elevation property to make sure it's on top



            <ImageView
            android:id="@+id/ImageView"
            android:layout_width="wrap_content"
            android:elevation="2dp"
            android:layout_height="wrap_content"
            app:layout_constraintTop_toBottomOf="@+id/siblingRelativeView1"
            app:layout_constraintBottom_toBottomOf="@+id/siblingRelativeView2"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"/>


            This gif demos the concept for a textview to center of imageview, waht you want is to center the top to the first relativeview and bottom to second relative view
            Centering to sibling view
            try reading



            https://constraintlayout.com/tricks/centring.html






            share|improve this answer






























              1














              the imageview you want to display on top needs to be relative to one of the views not to the edge of the parent, it is where you want it to be but behind both your relativeviews ie you need to be Centring to the edge of a sibling.also set elevation property to make sure it's on top



              <ImageView
              android:id="@+id/ImageView"
              android:layout_width="wrap_content"
              android:elevation="2dp"
              android:layout_height="wrap_content"
              app:layout_constraintTop_toBottomOf="@+id/siblingRelativeView1"
              app:layout_constraintBottom_toBottomOf="@+id/siblingRelativeView2"
              app:layout_constraintStart_toStartOf="parent"
              app:layout_constraintEnd_toEndOf="parent"/>


              This gif demos the concept for a textview to center of imageview, waht you want is to center the top to the first relativeview and bottom to second relative view
              Centering to sibling view
              try reading



              https://constraintlayout.com/tricks/centring.html






              share|improve this answer




























                1












                1








                1







                the imageview you want to display on top needs to be relative to one of the views not to the edge of the parent, it is where you want it to be but behind both your relativeviews ie you need to be Centring to the edge of a sibling.also set elevation property to make sure it's on top



                <ImageView
                android:id="@+id/ImageView"
                android:layout_width="wrap_content"
                android:elevation="2dp"
                android:layout_height="wrap_content"
                app:layout_constraintTop_toBottomOf="@+id/siblingRelativeView1"
                app:layout_constraintBottom_toBottomOf="@+id/siblingRelativeView2"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintEnd_toEndOf="parent"/>


                This gif demos the concept for a textview to center of imageview, waht you want is to center the top to the first relativeview and bottom to second relative view
                Centering to sibling view
                try reading



                https://constraintlayout.com/tricks/centring.html






                share|improve this answer















                the imageview you want to display on top needs to be relative to one of the views not to the edge of the parent, it is where you want it to be but behind both your relativeviews ie you need to be Centring to the edge of a sibling.also set elevation property to make sure it's on top



                <ImageView
                android:id="@+id/ImageView"
                android:layout_width="wrap_content"
                android:elevation="2dp"
                android:layout_height="wrap_content"
                app:layout_constraintTop_toBottomOf="@+id/siblingRelativeView1"
                app:layout_constraintBottom_toBottomOf="@+id/siblingRelativeView2"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintEnd_toEndOf="parent"/>


                This gif demos the concept for a textview to center of imageview, waht you want is to center the top to the first relativeview and bottom to second relative view
                Centering to sibling view
                try reading



                https://constraintlayout.com/tricks/centring.html







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jan 19 at 6:35

























                answered Jan 19 at 6:26









                Karan Harsh WardhanKaran Harsh Wardhan

                519313




                519313






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54264556%2fimageview-present-but-not-visible-in-display%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Callistus III

                    Plistias Cous

                    Index Sanctorum