Image getting behind the background

0

I would like to place one image in front of another image. I'll explain better. I have a background and I want to put an image on the dividing line between RelativeLayout and ScrollView.

In the native android I have the option:

app:layout_anchorGravity="bottom|end"

That looks like this:

Let'ssupposethatinsteadofthaticonwouldputanimage.

Butlookhowmineis:

Followthecode:

<?xmlversion="1.0" encoding="utf-8"?
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:diagonal="http://schemas.android.com/tools"
    xmlns:tools="http://schemas.android.com/tools"

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

    <com.github.florent37.diagonallayout.DiagonalLayout
        android:layout_width="match_parent"
        android:layout_height="250dp"
        android:elevation="10dp"
        android:fitsSystemWindows="true"
        app:diagonal_angle="20"
        diagonal:diagonal_direction="left"
        diagonal:diagonal_position="bottom">

        <ImageView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:scaleType="centerCrop" />

        <com.flaviofaria.kenburnsview.KenBurnsView
            android:id="@+id/image"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:elevation="10dp"
            android:src="@drawable/background_detalhes_clientes" />

    </com.github.florent37.diagonallayout.DiagonalLayout>

    <de.hdodenhof.circleimageview.CircleImageView
        android:id="@+id/imageContact"
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:layout_marginLeft="40dp"
        android:layout_marginStart="40dp"
        android:layout_marginVertical="160dp"
        android:src="@drawable/cliente_cadastrado" />

    <de.hdodenhof.circleimageview.CircleImageView
        android:id="@+id/imagemAlterar"
        android:layout_width="30dp"
        android:layout_height="30dp"
        android:layout_alignParentEnd="true"
        android:layout_alignParentRight="true"
        android:layout_marginHorizontal="50dp"
        android:layout_marginTop="180dp"
        android:focusable="true"
        android:src="@drawable/ic_pencil" />


    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginTop="250dp"
        android:baselineAligned="true">

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

            <TextView
                android:id="@+id/activityDetalhesClientesTXTdetalheNome"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="60dp"
                android:layout_marginStart="60dp"
                android:layout_marginTop="60dp"
                android:drawableLeft="@drawable/ic_cad_cliente"
                android:drawablePadding="10dp"
                android:drawableStart="@drawable/ic_cad_cliente"
                android:ellipsize="end"
                android:hint="@string/nomeHintCadastrarCliente"
                android:paddingVertical="20dp"
                android:singleLine="true"
                android:textIsSelectable="true"
                android:textSize="20dp" />

            <TextView
                android:id="@+id/activityDetalhesClientesTXTdetalhesFone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="60dp"
                android:layout_marginStart="60dp"
                android:drawableLeft="@drawable/ic_phone_cad_cliente"
                android:drawablePadding="20dp"
                android:drawableStart="@drawable/ic_phone_cad_cliente"
                android:ellipsize="end"
                android:hint="@string/nomeHintCadastrarCliente"
                android:paddingVertical="20dp"
                android:singleLine="true"
                android:textIsSelectable="true"
                android:textSize="20sp" />

            <TextView
                android:id="@+id/activityDetalhesClientesTXTdetalhesEmail"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="60dp"
                android:layout_marginStart="60dp"
                android:drawableLeft="@drawable/ic_mail_cad_cliente_24dp"
                android:drawablePadding="20dp"
                android:drawableStart="@drawable/ic_mail_cad_cliente_24dp"
                android:ellipsize="end"
                android:hint="@string/nomeHintCadastrarCliente"
                android:paddingVertical="20dp"
                android:singleLine="true"
                android:textIsSelectable="true"
                android:textSize="20sp" />

            <TextView
                android:id="@+id/activityDetalhesClientesTXTdetalhesRua"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="60dp"
                android:layout_marginStart="60dp"
                android:drawableLeft="@drawable/ic_endereco_cad_cliente"
                android:drawablePadding="20dp"
                android:drawableStart="@drawable/ic_endereco_cad_cliente"
                android:ellipsize="end"
                android:hint="@string/nomeHintCadastrarCliente"
                android:paddingVertical="20dp"
                android:singleLine="true"
                android:textIsSelectable="true"
                android:textSize="20sp" />

        </LinearLayout>
    </ScrollView>
</RelativeLayout>
    
asked by anonymous 12.02.2018 / 19:07

0 answers