可自下载工具 NinePatchEditor, 相比起自带的, 做了一些优化, 支持批量操作, 而且界面看起来美观一点: 下载链接: NinePatchEditor.zip
简单的说, 9 图就是在可拉伸及把内容可填充区用黑色笔画出来
参考教程
1.6 .9(九妹) 图片怎么玩 | 菜鸟教程 http://www.runoob.com/w3cnote/android-tutorial-9-image.html
关于点九图的介绍及其制作 | 平面 - UI | 教程 | NinePng 九图神器 - 原创文章 - 站酷 (ZCOOL) http://www.zcool.com.cn/article/ZMTgzODUy.html
xml 代码效果预览
<?xml version="1.0" encoding="utf-8"?>
<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" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity">
<TextView android:text="@string/chat_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:background="@drawable/test"
android:id="@+id/textView2" />
<TextView
android:text="@string/chat_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:background="@drawable/test"
android:id="@+id/textView"
android:layout_below="@+id/textView2"
android:layout_centerHorizontal="true"
android:layout_marginTop="54dp" />
</RelativeLayout>
来源: http://www.qdfuns.com/notes/19533/74e9227da59b82b4cd640c9ff17fc1aa.html