android, imageview stretch -


i'm trying imageview drawable png fill display (i don't care ratios). however, fill_parent doesn't work, , far know there no background set relativelayout?

regards

relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:clickable="true" android:onclick="toggleadvice"       imageview     android:id="@+id/advice_view"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     android:src="@drawable/pratbubbla_gron"     android:layout_alignparenttop="true"     android:layout_alignparentleft="true" 

i used stretch/shring imageview programmatically, piece of code you:

    imageview imageview=new imageview(context);     imageview.setadjustviewbounds(true);     imageview.setimagebitmap(bitmap);     imageview.setmaxheight(maxheight);     imageview.setscaletype(imageview.scaletype.center_inside);     layout.addview(imageview); 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -