2016-07-04 2 views
0

내 앱에 맞춤 알림 레이아웃을 사용해야합니다. 알림은 기본 공간에 맞으므로 bigContentView을 사용하지 않으려합니다. 그러나 레이아웃 구성 요소를 올바르게 재배포하려면 전화기에서 생성하는 기본 알림의 높이를 알고 싶습니다. MarshMellow 전화에서 약 50dp로 보입니다.안드로이드 알림의 높이를 얻는 방법?

참고 : 나는 또한 사전 롤리팝 폰

답변

3

그건 16 + 16 + 8 + 14 + 16 = 70dp에 대해 동일한을 알고 싶습니다. design guidelinesdimens.xml를 참조하십시오

<!-- Size of notification text (see TextAppearance.StatusBar.EventContent) --> 
<dimen name="notification_text_size">14sp</dimen> 
<!-- Size of notification text titles (see TextAppearance.StatusBar.EventContent.Title) --> 
<dimen name="notification_title_text_size">16sp</dimen> 
<!-- Size of smaller notification text (see TextAppearance.StatusBar.EventContent.Line2, Info, Time) --> 
<dimen name="notification_subtext_size">12sp</dimen> 

전 롤리팝 (또는 적어도 킷캣)을 dimens가 here를 찾을 수 있습니다. 이들 값에 기초

에게는

<!-- Size of notification text (see TextAppearance.StatusBar.EventContent) --> 
<dimen name="notification_text_size">14dp</dimen> 
<!-- Size of notification text titles (see TextAppearance.StatusBar.EventContent.Title) --> 
<dimen name="notification_title_text_size">18dp</dimen> 
<!-- Size of smaller notification text (see TextAppearance.StatusBar.EventContent.Line2, Info, Time) --> 
<dimen name="notification_subtext_size">12dp</dimen> 

높이 16 + 18 + 8 + 14 + 16 = 72dp이어야한다. 패딩에 대한 사전 롤리팝 사양을 찾을 수 없어서 재료를 사용했습니다.

+0

은 이전 롤리팝과 동일합니까? – suku

+0

@suko 아니, 약간의 차이 –

+0

고마워. 훌륭한 자원. – suku

관련 문제