2011-11-02 99 views
-1

这很难解释我喜欢什么。在我的布局中,我得到了一个水平的LinearLayout。 现在我想知道它是否可以在它周围创建一个薄边框。例如,看看ListView,它也有那些薄边框,我完全想在我的LinearLayout中使用。在ListView中创建边框

我希望你能理解我,如果你需要更多的信息请在下面写下评论。 THX提前 野生动物园

附加信息: 如果你看看,你看看有那些红线的截图,正是在那里,我想有这些薄的边框,就像在我的列表视图那里!在屏幕截图下,您还可以找到布局的代码。

What I want

代码


<?xml version="1.0" encoding="utf-8"?> 

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@android:id/tabcontent" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:orientation="vertical"> 

     <TabHost xmlns:android="http://schemas.android.com/apk/res/android" 
     android:id="@android:id/tabhost" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent"> 




     <RelativeLayout 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:orientation="vertical" > 


      <FrameLayout 
       android:id="@android:id/tabcontent" 
       android:layout_width="fill_parent" 
       android:layout_height="450dp" 
       android:layout_weight="1" /> 

       <TabWidget 
        android:id="@android:id/tabs" 
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content" 
        android:layout_alignBottom="@android:id/tabcontent" 
        android:visibility="invisible" /> 



       <LinearLayout 
        android:id="@+id/SmileyContent" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_alignParentBottom="true" 
        android:layout_alignParentLeft="true" 
        android:layout_alignParentRight="true" 
        android:layout_below="@android:id/tabcontent" 
        android:layout_weight="1" > 

        <TableRow 
         android:id="@+id/GoStartseite" 
         android:layout_width="wrap_content" 
         android:layout_height="match_parent" 
         android:onClick="onClickGoStartseite" 
         android:gravity="center" 
         android:layout_weight="0.6" > 

         <TextView 
          style="@style/SmallFont" 
          android:text="@string/gostartseite" /> 
        </TableRow> 

        <TableRow 
         android:id="@+id/SmileyOverview" 
         android:layout_width="wrap_content" 
         android:layout_height="match_parent" 
         android:onClick="onClickSmileyConfig" 
         android:gravity="center" 
         android:layout_weight="0.4" > 

         <TextView 
          style="@style/SmallFont" 
          android:text="@string/newfilter"/> 

        </TableRow> 

       </LinearLayout> 

     </RelativeLayout> 
     </TabHost> 

    </FrameLayout> 
+0

你说的是什么样的薄边框?如果可能的话附加示例捕捉 –

+0

可以请您添加一些屏幕截图或代码...! – Noby

+0

上传图片 – safari

回答

1

我从你的问题中了解到,它实际上可能需要设置布局的背景。

这可以通过创建自己的border.xml来完成。 Here有点类似的问题回答你的需要。

0

如果你需要的是创造再边框的边框颜色采取parentView,设置背景,边界thikne设置pading ss,然后在里面添加前景作为背景。