Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android imageview takes extra black space

the imageview takes extra [black] space and i dont know why

ok this imageview should wrap content but instead..

photo explains the problem

this is the code

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

<LinearLayout 
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >


<ImageView
android:id="@+id/map"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/map" /><ImageView
android:id="@+id/blxx"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingBottom="-20dp"
android:src="@drawable/photo" />



<ImageView
android:id="@+id/blxx"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/blxx" />

</LinearLayout>
</ScrollView>
like image 428
Cyclone Avatar asked Dec 15 '22 21:12

Cyclone


1 Answers

Try the below:

android:adjustViewBounds="true"

This will remove the extra padded space

like image 170
shiladitya Avatar answered Jan 09 '23 12:01

shiladitya