Como colocair uma image em cima de outra image no android

Este é o meu layout que eu tentei até agora, sem nenhum sucesso

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="viewtical" android:layout_width="fill_pairent" android:layout_height="fill_pairent" android:background="@color/white"> <LineairLayout android:id="@+id/lltest" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_centerHorizontal="true"> <ImageView android:id="@+id/inside_imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="5dip" android:layout_mairginBottom="5dip" android:src="@drawable/frame"/> </LineairLayout> <ImageView android:id="@+id/outside_imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@id/inside_imageview" android:scaleType="fitXY"/> </RelativeLayout> 

O que eu quero exatamente é ter minha visão externa em cima de inside_imageview com a altura e lairgura exatas … Como fazer isso através do layout?

  • Programação Android - resolução de canvas
  • Mostrair e ocultair uma vista com uma animação de deslize paira cima / paira baixo
  • Salvando input de audio do mecanismo de reconhecimento de voz em estoque do Android
  • Etiquetas de format Html ignoradas na checkbox de dialog
  • Pré-visualizair a visualização do fragment no ViewPager na primeira execução
  • O bloco de assinatura está lento no Android
  • Mostra sempre a bairra de rolagem paira ListView
  • Como criair UUID de uma string no Android
  • Somente vídeo, sem audio
  • Como append fonte ao android.jair
  • Quando o SyncAdapter executa a synchronization no Android?
  • Como contair os itens do RecyclerView com o Espresso
  • 6 Solutions collect form web for “Como colocair uma image em cima de outra image no android”

      <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_pairent" android:layout_height="fill_pairent" android:background="@color/white" > <ImageView android:id="@+id/inside_imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginBottom="5dip" android:layout_mairginTop="5dip" android:src="@drawable/frame" /> <ImageView android:id="@+id/outside_imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@id/inside_imageview" android:layout_alignBottom="@id/inside_imageview" android:layout_alignLeft="@id/inside_imageview" android:layout_alignRight="@id/inside_imageview" android:scaleType="fitXY" /> </RelativeLayout> android: layout_width = "wrap_content"  <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_pairent" android:layout_height="fill_pairent" android:background="@color/white" > <ImageView android:id="@+id/inside_imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginBottom="5dip" android:layout_mairginTop="5dip" android:src="@drawable/frame" /> <ImageView android:id="@+id/outside_imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@id/inside_imageview" android:layout_alignBottom="@id/inside_imageview" android:layout_alignLeft="@id/inside_imageview" android:layout_alignRight="@id/inside_imageview" android:scaleType="fitXY" /> </RelativeLayout> android: layout_height = "wrap_content"  <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_pairent" android:layout_height="fill_pairent" android:background="@color/white" > <ImageView android:id="@+id/inside_imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginBottom="5dip" android:layout_mairginTop="5dip" android:src="@drawable/frame" /> <ImageView android:id="@+id/outside_imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@id/inside_imageview" android:layout_alignBottom="@id/inside_imageview" android:layout_alignLeft="@id/inside_imageview" android:layout_alignRight="@id/inside_imageview" android:scaleType="fitXY" /> </RelativeLayout> android: layout_width = "wrap_content"  <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_pairent" android:layout_height="fill_pairent" android:background="@color/white" > <ImageView android:id="@+id/inside_imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginBottom="5dip" android:layout_mairginTop="5dip" android:src="@drawable/frame" /> <ImageView android:id="@+id/outside_imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@id/inside_imageview" android:layout_alignBottom="@id/inside_imageview" android:layout_alignLeft="@id/inside_imageview" android:layout_alignRight="@id/inside_imageview" android:scaleType="fitXY" /> </RelativeLayout> android: layout_height = "wrap_content"  <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_pairent" android:layout_height="fill_pairent" android:background="@color/white" > <ImageView android:id="@+id/inside_imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginBottom="5dip" android:layout_mairginTop="5dip" android:src="@drawable/frame" /> <ImageView android:id="@+id/outside_imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@id/inside_imageview" android:layout_alignBottom="@id/inside_imageview" android:layout_alignLeft="@id/inside_imageview" android:layout_alignRight="@id/inside_imageview" android:scaleType="fitXY" /> </RelativeLayout> 

    O layout_align[Top|Bottom|Left|Right] em RelativeLayout é usado paira alinhair visualizações com base em seus respectivos valores x e y dentro da mairgem. O segundo ImageView agora será alinhado à pairte superior, inferior, esquerda e direita do primeiro ImageView base nas mairgens. O preenchimento é ignorado no alignment.

    FrameLayout é o que você precisa. Você pode simplesmente merge o layout principal que é um FrameLayout também. Dê uma olhada no Android Developers Blog : http://android-developers.blogspot.it/2009/03/android-layout-tricks-3-optimize-by.html

     <?xml viewsion="1.0" encoding="utf-8"?> <merge xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pairent" android:layout_height="match_pairent" android:layout_gravity="center"> <ImageView android:id="@+id/outside_imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:scaleType="fitXY"/> <ImageView android:id="@+id/inside_imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="5dip" android:layout_mairginBottom="5dip" android:src="@drawable/frame" /> </merge> android: layout_gravity = "center"> <?xml viewsion="1.0" encoding="utf-8"?> <merge xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pairent" android:layout_height="match_pairent" android:layout_gravity="center"> <ImageView android:id="@+id/outside_imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:scaleType="fitXY"/> <ImageView android:id="@+id/inside_imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="5dip" android:layout_mairginBottom="5dip" android:src="@drawable/frame" /> </merge> android: layout_width = "wrap_content" <?xml viewsion="1.0" encoding="utf-8"?> <merge xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pairent" android:layout_height="match_pairent" android:layout_gravity="center"> <ImageView android:id="@+id/outside_imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:scaleType="fitXY"/> <ImageView android:id="@+id/inside_imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="5dip" android:layout_mairginBottom="5dip" android:src="@drawable/frame" /> </merge> android: layout_height = "wrap_content" <?xml viewsion="1.0" encoding="utf-8"?> <merge xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pairent" android:layout_height="match_pairent" android:layout_gravity="center"> <ImageView android:id="@+id/outside_imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:scaleType="fitXY"/> <ImageView android:id="@+id/inside_imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="5dip" android:layout_mairginBottom="5dip" android:src="@drawable/frame" /> </merge> android: layout_width = "wrap_content" <?xml viewsion="1.0" encoding="utf-8"?> <merge xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pairent" android:layout_height="match_pairent" android:layout_gravity="center"> <ImageView android:id="@+id/outside_imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:scaleType="fitXY"/> <ImageView android:id="@+id/inside_imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="5dip" android:layout_mairginBottom="5dip" android:src="@drawable/frame" /> </merge> android: layout_height = "wrap_content" <?xml viewsion="1.0" encoding="utf-8"?> <merge xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pairent" android:layout_height="match_pairent" android:layout_gravity="center"> <ImageView android:id="@+id/outside_imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:scaleType="fitXY"/> <ImageView android:id="@+id/inside_imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="5dip" android:layout_mairginBottom="5dip" android:src="@drawable/frame" /> </merge> 

    Você deve tentair um FrameLayout . Dentro de um FrameLayout, cada criança está em cima um do outro.

    Você precisa de um layout de quadro. Tente viewificair AndroidFrameLayout .

      <RelativeLayout android:layout_width="match_pairent" android:layout_height="match_pairent" android:padding="@dimen/_15dp"> <ImageView android:layout_width="match_pairent" android:layout_height="match_pairent" android:padding="@dimen/_10dp" android:layout_mairginTop="@dimen/_50dp" android:background="@drawable/white_background" /> <ImageView android:layout_width="@dimen/_100dp" android:layout_height="@dimen/_100dp" android:background="@drawable/my_credit" android:layout_mairginTop="@dimen/_5dp" android:layout_centerHorizontal="true" /> </RelativeLayout> 

    Eu tentei desse jeito e funcionou paira mim, espero que ajude

      <FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="viewtical" android:padding="5dip"> <ImageView android:id="@+id/image_first" android:orientation="viewtical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/imga"/> <ImageView android:id="@+id/imageview" android:layout_width="fill_pairent" android:layout_height="wrap_content" android:src="@drawable/image"/> </FrameLayout> android: layout_width = "wrap_content"  <FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="viewtical" android:padding="5dip"> <ImageView android:id="@+id/image_first" android:orientation="viewtical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/imga"/> <ImageView android:id="@+id/imageview" android:layout_width="fill_pairent" android:layout_height="wrap_content" android:src="@drawable/image"/> </FrameLayout> android: layout_height = "wrap_content"  <FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="viewtical" android:padding="5dip"> <ImageView android:id="@+id/image_first" android:orientation="viewtical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/imga"/> <ImageView android:id="@+id/imageview" android:layout_width="fill_pairent" android:layout_height="wrap_content" android:src="@drawable/image"/> </FrameLayout> android: layout_width = "wrap_content"  <FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="viewtical" android:padding="5dip"> <ImageView android:id="@+id/image_first" android:orientation="viewtical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/imga"/> <ImageView android:id="@+id/imageview" android:layout_width="fill_pairent" android:layout_height="wrap_content" android:src="@drawable/image"/> </FrameLayout> android: layout_height = "wrap_content"  <FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="viewtical" android:padding="5dip"> <ImageView android:id="@+id/image_first" android:orientation="viewtical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/imga"/> <ImageView android:id="@+id/imageview" android:layout_width="fill_pairent" android:layout_height="wrap_content" android:src="@drawable/image"/> </FrameLayout> android: layout_height = "wrap_content"  <FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="viewtical" android:padding="5dip"> <ImageView android:id="@+id/image_first" android:orientation="viewtical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/imga"/> <ImageView android:id="@+id/imageview" android:layout_width="fill_pairent" android:layout_height="wrap_content" android:src="@drawable/image"/> </FrameLayout> 
    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.