我正在尝试使用9-patch技术创建按钮。
在Eclipse的布局窗口中,它看起来几乎很好。
但是当我在模拟器中运行时,它显示出了这样的结果。
这是实际的PNG图像。
选择器XML。
在Eclipse的布局窗口中,它看起来几乎很好。
但是当我在模拟器中运行时,它显示出了这样的结果。
这是实际的PNG图像。
选择器XML。
<item android:drawable="@drawable/splash_facebook_button" />
布局中的按钮代码
<Button
android:id="@+id/button1"
android:layout_width="208dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="20dip"
android:background="@drawable/splash_facebook_button_selector"
android:text="Sign up with Facebook" />