-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. Android自定义对话框图像
- 2. 片段中的自定义对话框
- 3. Android创建意图内部对话框自定义视图
- 4. 在片段android创建一个自定义列表视图
- 5. 在android上创建自定义格式的对话框
- 6. 在Cumulocity中创建自定义片段
- 7. 在创建对话框片段时忽略对话框片段
- 8. Android片段过渡自定义视图
- 9. Wordpress自定义图片上传字段
- 10. 创建自定义对话框
- 11. 以mfc创建自定义对话框
- 12. 如何创建自定义对话框
- 13. 创建一个显示完整视图图像的自定义对话框
- 14. 创建iPhone自定义图片库
- 15. 自定义对话框上的自定义键盘(Android)
- 16. Android - 片段中的对话框片段
- 17. 自定义对话框Android
- 18. Android自定义对话框
- 19. android自定义对话框
- 20. Android自定义对话框
- 21. 使用全屏地图创建自定义片段
- 22. 如何创建包含VideoControl和图像的自定义字段?
- 23. 为批量照片上传创建自定义文件对话框
- 24. Facebook上的自定义图像发送对话框?
- 25. 在Android中创建自定义对话框
- 26. 在Android中创建自定义对话框
- 27. Android:使用列表创建自定义对话框
- 28. 创建自定义字段
- 29. 创建具有自定义图像帧
- 30. 如何在Android上的对话框片段后面设置自己的颜色?