I dont want change vertical-horizontal rate...:) Circle becomes ellipse.... HELP!
I want horizontal-vertical rate unchanged. How can ı Do this?? my picture is rate is 320x70.
for example, in my phone(samsung galaxy-s GT-I9000) it looks like 320x100. originally I have a circle but it look ellipse... ı have to fix it, but how can ı do??
its my code.`
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:background="@drawable/main"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical" xmlns:android="http://schemas.android.com/apk/resandroid">
<LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical" android:layout_weight="5"></LinearLayout>
<LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical" android:layout_weight="3">
<ImageButton android:layout_weight="1" android:id="@+id/menu_mycameras"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:background="@drawable/menu_cameras" android:cropToPadding="true">
</ImageButton>
<ImageButton
android:paddingTop="20px"
android:layout_weight="1" android:id="@+id/menu_aboutus"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:b开发者_Python百科ackground="@drawable/menu_aboutus" >
</ImageButton>
<ImageButton android:layout_weight="1" android:id="@+id/menu_help"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:background="@drawable/menu_help">
</ImageButton>
</LinearLayout>
`
I'm assuming you're talking about your image scaling as fitXY. Just add android:scaleType="sometypehere", and pick a type that suits your needs. Set it to "none" and it won't scale your image at all, where "fitCenter" will scale it to fit proportionally.
精彩评论