xml - Images in Android ActionBar Spinner are Large -


i have image spinner in android action bar, when click it, images not scaled down. screenshot of application:

here spinner layout code:

<?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" >      <imageview         android:id="@+id/icon"         android:layout_width="match_parent"         android:layout_height="match_parent"         android:scaletype="centerinside" >     </imageview>  </linearlayout> 

this item declaration in menu.xml:

<item     android:id="@+id/menu_spinner"     android:actionviewclass="android.widget.spinner"     android:showasaction="ifroom"     android:title="share"/> 

use wrap_content instead of match_parent imageview in both android:layout_width , android:layout_height below...

<?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" >      <imageview         android:id="@+id/icon"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:scaletype="centerinside" >     </imageview>  </linearlayout> 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -