Search code examples
androidimagescrollviewcenter

Display an Image in ScrollView


How do i force the ScrollView to diplay the image's center as defualt? I have a bitmap that is bigger the the ScrollView's viewport and i need to display the imge's center in the center of the viewport. Thank, Eyal.


Solution

  • Use the properties for the view in the XML file. Using android:layout_gravity or android:gravity equals center might solve the problem.