pre-lollipop devices와 (과) 관련한 elevation 관련 글이 있습니다. 대화 상자에 적용 할 수있는 기술을 적용했지만 여전히 대화 상자에 입면도/그림자를 사용할 수 없습니다.프리 - 롤리팝 또는 프리 롤리팝에 대한 고도/음영
스타일에서 시도했지만 작동하지 않았습니다.
<item name="android:background">@android:drawable/dialog_holo_light_frame</item>
ViewCompat.setElevation() 및 View.setOutLineProvider() 메소드는 막대 사탕에서 가능하다. 그래서 그들을 사용할 수 없습니다.
알 수없는 이유로 여기에 screeshots를 추가 할 수 없습니다. 그러나 대화는 KK에서 평평하고 Lollipop에서 멋지게 보입니다.
<style name="AlertDialogStyle" parent="Theme.AppCompat.Light.Dialog.Alert">
</style>
당신은 내가 미리 롤리팝에 대화에 고도를 추가 할 수있는 방법에 대한 단서를 도와 줄 수 :
AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(context, R.style.AlertDialogStyle));
Dialog dialog = builder.create();
그리고 AlertDialogStyle이 바로 이것이다 :
이
내가 대화 상자를 생성하는 방법이다 또는 21 이전의 장치?