Android中重复图像的问题

问题描述:

我有查看应该显示中间的赢家,我想添加底部之字形边框,迄今为止很好。只有当我添加图像并使其合适时才有问题,它只能重复直到视图中间(TableRow)。任何想法如何使它做到全屏?Android中重复图像的问题

这里是winner.xml

<RelativeLayout 
    android:id="@+id/winner" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:background="@color/red_transparent" 
    android:visibility="invisible" > 

    <TableLayout 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:gravity="center" 
     android:stretchColumns="field" 
     android:weightSum="9" > 

     <TableRow 
      android:layout_width="0dp" 
      android:layout_height="wrap_content" 
      android:layout_weight="3" 
      android:gravity="bottom" > 

      <ImageView 
       android:layout_width="fill_parent" 
       android:layout_height="12dp" 
       android:adjustViewBounds="true" 
       android:gravity="bottom" 
       android:scaleType="fitXY" 
       android:src="@drawable/zigzag_bottom" /> 
     </TableRow> 

     <TableRow 
      android:layout_width="0dp" 
      android:layout_height="wrap_content" 
      android:layout_weight="2" 
      android:background="#ffffff" 
      android:gravity="center_horizontal|center_vertical" > 

      <RelativeLayout 
       android:layout_width="fill_parent" 
       android:layout_height="fill_parent" 
       android:background="@drawable/back" 
       android:gravity="center_horizontal|center_vertical" > 

       <ImageView 
        android:id="@+id/winner_logo" 
        android:layout_width="50sp" 
        android:layout_height="50sp" 
        android:layout_centerHorizontal="true" 
        android:background="@drawable/back" 
        android:contentDescription="@string/app_name" 
        android:src="@drawable/vertical" /> 

       <TextView 
        android:id="@+id/winner_info" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_below="@+id/winner_logo" 
        android:layout_centerHorizontal="true" 
        android:background="@drawable/back" 
        android:contentDescription="@string/app_name" 
        android:src="@drawable/horizon" 
        android:text="@string/winner" 
        android:textColor="#880000" 
        android:textSize="64sp" /> 
      </RelativeLayout> 
     </TableRow> 

     <TableRow 
      android:layout_width="0dp" 
      android:layout_height="fill_parent" 
      android:layout_weight="4" > 

      <ImageView 
       android:layout_width="fill_parent" 
       android:layout_height="12dp" 
       android:adjustViewBounds="true" 
       android:background="@drawable/back" 
       android:gravity="top" 
       android:scaleType="fitXY" 
       android:src="@drawable/zigzag_bottom" /> 
     </TableRow> 
    </TableLayout> 
    </RelativeLayout> 

这里是重复的图像

<?xml version="1.0" encoding="utf-8"?> 
<bitmap xmlns:android="http://schemas.android.com/apk/res/android" 
    android:antialias="true" 
    android:src="@drawable/zigzagdown" 
    android:tileMode="repeat" /> 

我发现问题

机器人:stretchColumns = “场”

应android:stretchColumns =“*”,所以它会拉伸所有列