2015-01-28 3 views
0

목록 세부 레이아웃에서 listview의 테두리 선 색상을 변경하는 방법은 무엇입니까? 큰 화면 (정제)에서 목록보기와 세부보기를 분리하는 것은 항상 검은 색 선입니다. 설정 위치 또는 새 값 설정 방법을 모릅니다. 회색으로 변경하고 싶습니다. 당신은 당신이 검은 색으로 만 얻을 것이다 검은 색으로 설정하면목록 세부 레이아웃에서 목록 뷰의 테두리 선 색상을 변경하는 방법은 무엇입니까?

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:id="@+id/LinearLayout1" 
    android:showDividers="middle" 
    android:baselineAligned="false" 
    android:orientation="horizontal" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" > 

    <fragment 
     android:id="@+id/fragmentItemsList" 
     android:name="com.demo.ListFragment" 
     android:layout_height="wrap_content" 
     android:layout_width="0dp" 
     android:layout_weight="1" 
     android:color="#757872" 
     tools:layout="@layout/fragment_items_list" 
     /> 

    <View android:background="#000000" 
     android:layout_width="1dp" 
     android:layout_height="wrap_content" 
     /> 

    <FrameLayout 
     android:id="@+id/flDetailContainer" 
     android:layout_width="0dp" 
     android:layout_height="match_parent" 
     android:layout_weight="2" 
     /> 


</LinearLayout> 
+0

'보기 '라고 쓰여있는 것은 검은 색 배경을 분명히 볼 수 있습니다. – tyczj

+0

보기에서 하나를 변경하려고했습니다. listview seperator의 색상은 전혀 변경되지 않습니다. – sunskin

답변

1

:

내 activity_items.xml입니다. 회색 색상을 원하면 회색으로 설정해야합니다. Android는 코드에서 작성한 내용을 읽을 수 있으며 마음을 읽을 수 없습니다. : D

는 수행이

<View android:background="#BDBDBD" 
    android:layout_width="1dp" 
    android:layout_height="wrap_content"/> 

+0

lol, 배경색을 회색으로 변경하려고했습니다. 그것은 목록보기 seperator의 색상을하지 않았다 : ( – sunskin

+0

제 편집을 참조하십시오. 귀하의 질문에 뭔가 다른 것을 요구했다. – Rohit5k2

0
<View android:background="#000000" 

그냥에 코드 (000000)를 변경 목록보기 구분 색상 목록보기에이

android:divider="#BDBDBD" 
android:dividerHeight="1dp" 

을 변경하려면 사용할 색상과 일치해야합니다.

관련 문제