2011-11-02 5 views
-1

내가 좋아하는 것을 설명하기가 어렵습니다. 레이아웃에서는 가로형 LinearLayout이 있습니다. 이제 주위에 얇은 테두리를 만들 수 있는지 알고 싶습니다. 예를 들어 ListView를 살펴 보겠습니다. 얇은 테두리도 있으므로 LinearLayout에 넣고 싶습니다.ListView에 테두리 만들기

더 많은 정보가 필요하면 아래 내용을 적어주세요. 사전에 들으 사파리

추가 정보 : 당신이 그 레드 라인을 참조 스크린 샷을 살펴 정확히이 경우 내가 거기 내 목록보기처럼, 그 얇은 테두리를 가지고 싶습니다! 스크린 샷 아래에는 레이아웃 코드도 있습니다.

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, 설정 배경을 만드는 것입니다 경우 , 국경 곁에 패딩 세트 그런 다음 배경으로 포 그라운드가있는 내부에 자식을 추가하십시오. 나는 당신의 질문에서 이해 무엇