回答

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>