2012-07-10 2 views
4

제목과 대화 내용 사이의 파란색 구분선을 어떻게 스타일링 할 수 있습니까 (스크린 샷 참조)?Android ICS 스타일 대화 상자에서 회선을 사용자 정의하는 방법

저는 xml을 통해 선호하지만, 필요한 경우 프로그래밍 방식의 해결책을 취할 것입니다.

android-15의 기본 styles.xml 및 themes.xml을 살펴 봤지만 찾을 수 없습니다.

Standard Android dialog

+0

사용자 정의 대화 상자 만들기. – AkashG

+0

u는 원하는 솔루션을 얻었습니까 ?? – AkashG

+0

나는 똑같이하고 싶다. 결국 당신은 무엇을 결정 했습니까? – bencallis

답변

1

당신이 ActionBarSherlock의를 사용하는 경우 당신이보고를 확인하실 수 있습니다 abs_dialog_title_holo.xml. 파란색 선은보기를 통해 정의되는 디비더임을 알 수 있습니다.

+0

감사합니다. 따라서 ABS의 부품을 변경하지 않고이를 사용자 정의 할 수있는 방법은 없습니다. – benvd

0
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
     android:layout_height="match_parent" 
    android:orientation="vertical" 
    android:fitsSystemWindows="true"> 
    <TextView android:id="@android:id/title" style="?android:attr/windowTitleStyle" 
     android:layout_width="match_parent" 
     android:layout_height="30dp" 
     android:paddingLeft="16dip" 
     android:paddingRight="16dip" 
     android:gravity="center_vertical|left" 
     android:text="Dialog" 
     android:textColor="@Color/blue"/> 
    <View android:id="@+id/titleDivider" 
      android:layout_width="match_parent" 
      android:layout_height="2dip" 
      android:background="@Color/blue" /> 
    <TextView android:id="@android:id/title" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:paddingLeft="16dip" 
     android:paddingRight="16dip" 
     android:gravity="center_vertical|left" 
     android:textColor="@android:color/white" 
     android:text="Your Text"/> 
</LinearLayout> 

세트 클래스의 내용으로이 XML을 활동 아래 매니페스트 파일에서 선 아래 추가 :

android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" 
+0

우리는 다른 ICS 라인을 다른 색상으로 유지하고 싶습니다. 하지만 기본 대화 상자 레이아웃을 기반으로 할 수 있다고 생각합니다 ... – benvd

+0

그것이 작동합니까 ?? – AkashG

+0

@AkashG "이 XML을 수업 내용으로 설정하는 방법"은 무엇입니까? 어떤 수업을 듣고 있니? pls 당신은 코딩 예제를 제공 할 수 있습니까? 기꺼이 내가 대답하도록 도와 줄 수 있다면이 대답을 기꺼이 upvote 할 것입니다. – PeteH

관련 문제