-1
A
回答
0
您可以創建具有透明背景的全屏對話框。
然後計算此循環的x/y點並放置箭頭。
對話框的例子:
public void showDialog(Context context, View hourView) {
dialog = new Dialog(context, R.style.DreamDialogStyle);
dialog.setContentView(R.layout.dream_custom_add_photo_dialog);
// hourView in your case will be probably view with hour timer
// you need get for this view x and y position on your screen
// then in your dialog layout you need setX() and setY() for your loppView
// but your loopView will be full transparent background
// for position of x and y on screen You can use
// int[] array = new int[2];
// hourView.getLocationOnScreen(array);
// X = array[0] , Y = array[1]
// and in setX() setY() calculate loopSize for position loop on hourView
// And for arrow would be nice if You have image with this arrow.
// then You will need also calculate for your dilogTop and loopLeftDown
// and setAngle() in image for fill arrow line
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){
dialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
}
dialog.show();
}
對話樣式爲透明背景:
<style name="DreamDialogStyle" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
</style>
相關問題
- 1. 如何創建100%自定義對話框片段
- 2. Android自定義對話框圖像
- 3. 片段中的自定義對話框
- 4. 試圖創建自定義對話框
- 5. Android創建意圖內部對話框自定義視圖
- 6. 在片段android創建一個自定義列表視圖
- 7. 在android上創建自定義格式的對話框
- 8. 調用自定義對話框中的片段的Android
- 9. 在Cumulocity中創建自定義片段
- 10. 爲片段創建自定義onClickListner
- 11. 在創建對話框片段時忽略對話框片段
- 12. 在wordpress中創建自定義字段和上傳圖像
- 13. Android自定義日曆對話框片段
- 14. Android片段過渡自定義視圖
- 15. 創建自定義對話框並在運行時操作它的字段
- 16. 自定義對話框片段不顯示整個視圖
- 17. 創建自定義jframe對話框
- 18. 創建自定義對話框
- 19. 如何創建自定義對話框
- 20. 以mfc創建自定義對話框
- 21. Wordpress自定義圖片上傳字段
- 22. 如何在自定義對話框中創建幻燈片?
- 23. 創建一個顯示完整視圖圖像的自定義對話框
- 24. 創建iPhone自定義圖片庫
- 25. 自定義對話框上的自定義鍵盤(Android)
- 26. 在Android中創建自定義的「Open-With」對話框
- 27. 如何創建像Instagram一樣的自定義照片視圖?
- 28. Android - 片段中的對話框片段
- 29. 創建自定義平面開關android
- 30. 如何創建像自定義列表視圖的自定義圖像視圖?