Coding Fora logo
  • main_navigation_menu_icon.png
  • Search
  • ic_more_vert.png

How do you center a image in Android Studio?

You are here
Fora > How do you center a image in Android Studio?

1_180303121314.jpg
Administrator

vote_up

0

vote_down

Posted by Administrator · 17 October 2018 (16349 days ago) · Report · Email

How do you center a image in Android Studio?

1 Reply


avatar_blank_40.png
moeed

vote_up

0

vote_down

Posted by moeed · 9 November 2018 · Report

when using

In LinearLayout, use: android:layout_gravity="center".

In RelativeLayout, use: android:layout_centerInParent="true"

Add a comment

Reply

Social Media

youtube.png