eclipse - how can i create a custom button for my android application without the button becoming blurred? -
i have working android app programming in eclise, want change ui , add own feelp it, when rescale buttons on page outline of button becomes blurred, can fix this?
currently setting background of button xml file called background.xml
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:drawable="@drawable/button_pressed" /> <!-- pressed --> <item android:state_enabled="false" android:drawable="@drawable/button_disabled"/> <!-- disabled --> <item android:state_focused="true" android:drawable="@drawable/button_focused" /> <!-- focused --> <item android:drawable="@drawable/button_normal" /> <!-- default --> </selector>
any ideas fix problem apreciated.
here photo of blurred button
ok, ive done 9patch image has black line on inside, ideas?
i think need try 9patch not have such scaling issues. using 9patch tool android sdk can convert existing png drawables 9patches.
another way use separate resources separate screens (which scale properly). however, lead reduction in apk size. refer screens support topic more information.
Comments
Post a Comment