I have the following code:
Layout :
<ViewFlipper android:id="@+id/viewFlipper"
android:layout_height="fill_parent"
android:layout_width="fill_parent" >
<include layout="@layout/imagen3"/>
<include layout="@layout/imagen2"/>
Example layout imagen3 :
<ImageView
android:id="@+id/preview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/fondo3"/>
Java :
Uri imageUri = Uri.parse("android.resource://" + getPackageName()
+ "/drawable/" + "preview");
I want to create ImageURI with the id of the imageview.