画一个假的边框好了,不过如果你每个TextView都这样画的话看起来就很啰嗦了,还是你自己继承TextView的方法比较好.
给一个假边框的demo供你参考. <LinearLayout 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:background="#FFFF0000">
    
        <TextView android:id="@android:id/list"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_margin="3dip"
        android:background="#FFFFFFFF"
        android:paddingTop="5dp"
        android:paddingLeft="5dp" 
        android:text="哈哈哈哈哈哈">
        </TextView>
    </LinearLayout>

解决方案 »

  1.   

    我没有那么做过!
    我一般是用一个有边框的图片来做TextView的背景图片!
      

  2.   

    背景圖吧,google本身的應用也是這麼做的,沒必要自己畫吧
      

  3.   

    楼主的代码其实是可以画出来的,拿来试了一下,加下面两句就可以了,但是具体原因是什么还没找到.
    =.= public void onDraw(Canvas canvas) {
    super.onDraw(canvas);
    this.getLocalVisibleRect(r);
    r.bottom --;
    r.right--;
    mPaint.setColor(Color.RED);
    mPaint.setStyle(Paint.Style.STROKE);
    mPaint.setStrokeWidth(1);
    canvas.drawRect(r, mPaint);
    }