2015-01-18 2 views
0

InfoWindow 내부에 렌더링 된 레이아웃에 RatingBar가 있습니다.Lollipop의 InfoWindow 내에서 RatingBar 렌더링

KitKat 및 그 아래에서 잘 렌더링됩니다.

5.0.1 - Nexus 4

레이아웃 :

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

<TextView 
    android:id="@+id/infowindow_name" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_centerHorizontal="true" 
    android:gravity="center_horizontal" 
    android:text="Venue Name Some More Text This Should Wrap Properly" 
    android:textColor="@android:color/primary_text_light" 
    android:textSize="20sp" /> 

    <TextView 
    android:id="@+id/infowindow_type" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_below="@+id/infowindow_name" 
    android:layout_centerHorizontal="true" 
    android:gravity="center_horizontal" 
    android:text="Type - Cuisine" 
    android:textColor="@android:color/primary_text_light" 
    android:textSize="15sp" /> 



<RatingBar 
    android:id="@+id/infowindow_rating" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:gravity="center_horizontal" 
    android:layout_below="@+id/infowindow_type" 
    android:numStars="5" 
    android:rating="3.75" /> 

<TextView 
    android:id="@+id/infowindow_norating" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_below="@+id/infowindow_rating" 
    android:layout_centerHorizontal="true" 
    android:gravity="center_horizontal" 
    android:text="@string/infowindow_no_rating_yet" 
    android:textColor="@android:color/primary_text_light" 
    android:textSize="20sp" /> 
01,235

롤리팝에

4.4.4 - Nexus 7

는 정보창은 RatingBar의 빈 공간으로 렌더링

문제를 해결할만한 아이디어가 있습니까? 이 방법은 InfoWindow가 뷰의 정적 표현으로 렌더링되고 Lollipop에서 무엇인가가 변경되었다고 가정합니다.

Android Bug Issue

+0

나는 등급 표시 줄이 괜찮다고 생각하지만 별들은 흰색으로 칠해져 있습니다. 테마에 접미사 'android : colorAccent'를 추가 할 수 있습니까? 아마도 다른 색상 매개 변수 일 수도 있습니다. 확실하지 않습니다. –

+0

나는 그렇게 생각하지 않는다 - 나는 appcompat을 사용하여 그 매개 변수를 망칠려고 노력했다. 그래서 접두어가 붙어 있지 않은 값을 선택하는 것 같다. 다른 요소는 정확한 색조를 가지며 등급 표시 줄은 InfoWindow. –

답변

1

나는이에 대한 해결 방법을 찾았습니다 - 당신이 명시 적으로 ratingBarStyleIndicator에 RatingBar에 스타일을 설정해야합니다 나는 RatingBar 초기화 중 일부는 우회 있으리라 믿고있어

<RatingBar 
    android:id="@+id/infowindow_rating" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:gravity="center_horizontal" 
    android:layout_below="@+id/infowindow_type" 
    android:numStars="5" 
    android:rating="3.75" 
    android:isIndicator="true" 
    style="?android:attr/ratingBarStyleIndicator" 
    /> 

Lollipop에서 Canvas.Draw를 사용하여 렌더링 할 때 Custom InfoWindows

관심이있는 버그 보고서의 결과를 기다리고 있습니다.