java Android - how can I keep Image's actual size? -


i'm totally confused of how keep actual size of images!

for example, have png named bottom_tile.png, if place on layout - it's 1 size. if make tiled bitmap :

<bitmap xmlns:android="http://schemas.android.com/apk/res/android"     android:src="@drawable/ver_bottom_panel_tile"         android:tilemode="repeat"         android:dither="true"  />     

and place on layout, it's height different, although it's 1 tile high should exact height! why happening? both cases android:layout_height="wrap_content"

when set png file should stick on top , stretch left right , set it's android:layout_height="wrap_content" , height distorted, can't place desing in. what's going on ?

i need actual size, no more no less

i've been asked layout - it's 2 images, 1 tile, 2nd what's in code above bitmap 40%+ bigger on tile

<relativelayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     android:layout_width="match_parent"     android:layout_height="match_parent"      tools:context=".mainactivity" >      <imageview         android:id="@+id/imageview1"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_alignparentleft="true"         android:layout_alignparenttop="true"         android:src="@drawable/ver_bottom_panel_tile" />      <imageview         android:id="@+id/imageview2"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_alignparentleft="true"         android:layout_below="@+id/imageview1"         android:src="@drawable/ver_bottom_panel" />  </relativelayout> 

can more specific looking ?
if need image attain minimum or original height use

android:layout_height="wrap_content"

this make image attain minimum height or original height

android:layout_width="fill_parent"

will make image stretch left right or width wise.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -