I want to create same UI as whatsapp chat.Here you can see whatsapp has background image:
Now this is my app in which I have a relative layout that contains swipe layout ( androidx.swiperefreshlayout
) in which it has recycle view. This is my app with normal color background:
I just want to set an image in the background same as WhatsApp. In order to achieve this what should I do?
Why don't you put it in the XML like this?
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/lst_main"
android:background="@drawable/name_of_your_background"
/>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.