Je veux un effet d'entraînement sur mon icône. Mais quand j'augmenter le rembourrage, il réduit la taille de l'icône lorsque le remplissage est 5DP il ressemble à ceci Rembourrage réduit la taille de l'icône dans ImageView
Mais quand j'augmenter la taille de rembourrage à 12dp il ressemble à ce
Mon ImageView xml
<ImageView
android:id="@+id/institute_search_item_request_icon"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentEnd="true"
android:layout_marginEnd="20dp"
android:layout_marginTop="15dp"
android:background="@drawable/request_institute_red_icon__shape"
android:foreground="@drawable/ripple_foreground"
android:padding="12dp"
android:src="@drawable/ic_link_white_24dp" />
request_institute_red_icon__shape.xml
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/colorPrimary" />
et ripple_foreground.xml
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/colorAccent">
<item android:id="@android:id/mask">
<shape android:shape="oval">
<solid android:color="@color/colorPrimary" />
</shape>
</item>
Pourquoi avez-vous besoin de rembourrage? –
utiliser la marge faire cela. –
@ Bhuvanesh je veux onduler la couleur autour de l'icône. Corrigez-moi si je fais une erreur stupide – FaisalAhmed