I have a recyclerView to which I pass images and text, in the activity that feeds the recyclerView I am trying to establish opacity for the images but not for the text, however both are affected and it is not what I want. As an achievement that the text is not affected when you set the opacity to the image? '
Activity that feeds the recyclerView (in which I want to set the opacity only to the image)
<LinearLayout
android:id="@+id/frameLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/idImagen"
android:layout_width="wrap_content"
android:layout_height="200dp"
android:layout_marginTop="10dp"
android:src="@drawable/beers"
android:alpha="0.5"/>
</LinearLayout>
<TextView
android:id="@+id/idNombre"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="Nombre"
android:textColor="@android:color/white"
android:textSize="24sp"
app:layout_constraintBottom_toBottomOf="@+id/frameLayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
'
Activity of the recyclerView
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.RecyclerView
android:id="@+id/RecyclerID"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp">
</android.support.v7.widget.RecyclerView>
</LinearLayout>