android - ImageView getting very small under a linear layout -


in 1 of screens, expect acheive kind of layout what want

highest importance being images correctly scaled. these images giving of adequate resolution , works fine on fragment layout. layout.xml looks this

<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:background="@drawable/stadiumbg"     android:orientation="vertical" >      <linearlayout         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_margin="10dp"         android:background="@drawable/listview_item"         android:orientation="horizontal" >          <linearlayout             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_weight="1"             android:gravity="left"             android:orientation="vertical" >              <imageview                 android:id="@+id/image1"                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:layout_margin="5dp"                 android:adjustviewbounds="true"                 android:padding="5dp"                 android:scaletype="fitcenter" />              <textview                 android:id="@+id/title1"                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:textappearance="?android:attr/textappearancemedium" />         </linearlayout>         <textview             android:id="@+id/text1"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:text="70%"             android:textappearance="?android:attr/textappearancelarge" />          <textview             android:id="@+id/text2"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:text="80%"             android:textappearance="?android:attr/textappearancelarge" />         <linearlayout             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_weight="1"             android:gravity="right"             android:orientation="vertical" >              <imageview                 android:id="@+id/image2"                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:layout_margin="5dp"                 android:adjustviewbounds="true"                 android:padding="5dp"                 android:scaletype="fitcenter" />              <textview                 android:id="@+id/title2"                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:textappearance="?android:attr/textappearancemedium" />         </linearlayout>     </linearlayout>      <linearlayout         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:background="@drawable/listview_item"         android:orientation="vertical" >          <button             android:id="@+id/button1"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:text="vote" />          <button             android:id="@+id/button2"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:text="down vote" />     </linearlayout>  </linearlayout> 

everything else great. drawable listview_item has been given provided rounded corners, , tested in listview above said images. fine. in layout, both images gets super downscaled. this.

enter image description here

wasting space no reason. have tried: adjustviewbounds set false scaletype fitxy

any idea want?

change width , height of imageview. instead of:

android:layout_width="wrap_content" android:layout_height="wrap_content"  

use:

android:layout_width="200dp" android:layout_height="200dp" 

change numbers fit want.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -