鲲鹏宴会酒店前厅经理张玲玲 發表於 2026-4-9 17:12:00

引导记录

<p>记录两种方案</p>
<h4>1、使用&nbsp;PorterDuff.Mode.CLEAR 绘制,挖洞处理(高亮原View,但是不支持高斯模糊)</h4>
<p><img src="https://img2024.cnblogs.com/blog/583064/202604/583064-20260409150117073-1525728034.png"></p>
<p><img src="https://img2024.cnblogs.com/blog/583064/202604/583064-20260409150914799-1585058482.png"></p>
<p>如图看到,其实是在rootView上面绘制了一个半透明蒙层,然后动态获取到高亮View的位置跟大小,对其进行图片混合绘制,将指定区域镂空擦除,这样就凸显出需要高亮的区域</p>
<div class="cnblogs_code"><img src="http://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif"><img id="code_img_opened_17480a87-bc2f-4c88-802c-c01b4e79cfdf" class="code_img_opened lazyload" style="display: none" data-src="http://images.cnblogs.com/OutliningIndicators/ExpandedBlockStart.gif">
<div id="cnblogs_code_open_17480a87-bc2f-4c88-802c-c01b4e79cfdf" class="cnblogs_code_hide">
<pre><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> android.annotation.SuppressLint
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> android.content.Context
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> android.graphics.Bitmap
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> android.graphics.Canvas
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> android.graphics.Color
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> android.graphics.Paint
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> android.graphics.PorterDuff
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> android.graphics.PorterDuffXfermode
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> android.graphics.RectF
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> android.util.AttributeSet
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> android.util.Log
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> android.view.Gravity
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> android.view.LayoutInflater
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> android.view.MotionEvent
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> android.view.View
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> android.view.ViewGroup
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> android.view.animation.AccelerateDecelerateInterpolator
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> android.widget.FrameLayout
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> androidx.core.content.ContextCompat
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> androidx.core.graphics.createBitmap
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> com.blankj.utilcode.util.GsonUtils

</span><span style="color: rgba(0, 128, 0, 1)">/**</span><span style="color: rgba(0, 128, 0, 1)"> 高亮引导 </span><span style="color: rgba(0, 128, 0, 1)">*/</span>
<span style="color: rgba(0, 0, 255, 1)">class</span><span style="color: rgba(0, 0, 0, 1)"> HighlightGuideView @JvmOverloads constructor(
    context: Context,
    attrs: AttributeSet</span>? = <span style="color: rgba(0, 0, 255, 1)">null</span><span style="color: rgba(0, 0, 0, 1)">,
    defStyleAttr: Int </span>= 0<span style="color: rgba(0, 0, 0, 1)">
) : FrameLayout(context, attrs, defStyleAttr) {

    companion object {
      </span><span style="color: rgba(0, 0, 255, 1)">private</span> <span style="color: rgba(0, 0, 255, 1)">const</span> val TAG = "HighlightGuideView"
      <span style="color: rgba(0, 0, 255, 1)">private</span> <span style="color: rgba(0, 0, 255, 1)">const</span> val ANIMATION_DURATION = 200L
      <span style="color: rgba(0, 0, 255, 1)">private</span> var isShow = <span style="color: rgba(0, 0, 255, 1)">false</span><span style="color: rgba(0, 0, 0, 1)">

      @JvmStatic
      fun show(
            context: Context,
            highlightView: View,
            radius: Float </span>=<span style="color: rgba(0, 0, 0, 1)"> context.resources.getDimension(R.dimen.common_dp_28),
            onDismiss: (() </span>-&gt;<span style="color: rgba(0, 0, 0, 1)"> Unit)
      ) {
            </span><span style="color: rgba(0, 0, 255, 1)">if</span> (isShow) <span style="color: rgba(0, 0, 255, 1)">return</span><span style="color: rgba(0, 0, 0, 1)">
            isShow </span>= <span style="color: rgba(0, 0, 255, 1)">true</span><span style="color: rgba(0, 0, 0, 1)">
            HighlightGuideView(context).show(
                highlightView,
                FragmentGuideBinding.inflate(LayoutInflater.from(context)).root,
                radius,
                onDismiss
            )
      }
    }

    </span><span style="color: rgba(0, 0, 255, 1)">private</span> val bgPaint =<span style="color: rgba(0, 0, 0, 1)"> Paint(Paint.ANTI_ALIAS_FLAG).apply {
      color </span>=<span style="color: rgba(0, 0, 0, 1)"> ContextCompat.getColor(context, R.color.main_highlight_guide_bg)
      style </span>=<span style="color: rgba(0, 0, 0, 1)"> Paint.Style.FILL
    }

    </span><span style="color: rgba(0, 0, 255, 1)">private</span> val highlightPaint =<span style="color: rgba(0, 0, 0, 1)"> Paint(Paint.ANTI_ALIAS_FLAG).apply {
      color </span>=<span style="color: rgba(0, 0, 0, 1)"> Color.TRANSPARENT
      xfermode </span>=<span style="color: rgba(0, 0, 0, 1)"> PorterDuffXfermode(PorterDuff.Mode.CLEAR)
    }

    </span><span style="color: rgba(0, 0, 255, 1)">private</span> var highlightRect =<span style="color: rgba(0, 0, 0, 1)"> RectF()
    </span><span style="color: rgba(0, 0, 255, 1)">private</span> var highlightView: View? = <span style="color: rgba(0, 0, 255, 1)">null</span>
    <span style="color: rgba(0, 0, 255, 1)">private</span> var cornerRadius =<span style="color: rgba(0, 0, 0, 1)"> 0f
    </span><span style="color: rgba(0, 0, 255, 1)">private</span> var onDismissListener: (() -&gt; Unit)? = <span style="color: rgba(0, 0, 255, 1)">null</span>

    <span style="color: rgba(0, 0, 255, 1)">private</span> var bitmap: Bitmap? = <span style="color: rgba(0, 0, 255, 1)">null</span>
    <span style="color: rgba(0, 0, 255, 1)">private</span> var myCanvas: Canvas? = <span style="color: rgba(0, 0, 255, 1)">null</span><span style="color: rgba(0, 0, 0, 1)">

    init {
      setWillNotDraw(</span><span style="color: rgba(0, 0, 255, 1)">false</span><span style="color: rgba(0, 0, 0, 1)">)
      setLayerType(LAYER_TYPE_SOFTWARE, </span><span style="color: rgba(0, 0, 255, 1)">null</span><span style="color: rgba(0, 0, 0, 1)">)
      (layoutParams as</span>? LayoutParams)?.gravity =<span style="color: rgba(0, 0, 0, 1)"> Gravity.CENTER
    }

    override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {
      </span><span style="color: rgba(0, 0, 255, 1)">super</span><span style="color: rgba(0, 0, 0, 1)">.onSizeChanged(w, h, oldw, oldh)
      </span><span style="color: rgba(0, 0, 255, 1)">if</span> (w &lt;= 0 || h &lt;= 0<span style="color: rgba(0, 0, 0, 1)">) {
            bitmap</span>?<span style="color: rgba(0, 0, 0, 1)">.recycle()
            bitmap </span>= <span style="color: rgba(0, 0, 255, 1)">null</span><span style="color: rgba(0, 0, 0, 1)">
            myCanvas </span>= <span style="color: rgba(0, 0, 255, 1)">null</span>
            <span style="color: rgba(0, 0, 255, 1)">return</span><span style="color: rgba(0, 0, 0, 1)">
      }

      bitmap </span>=<span style="color: rgba(0, 0, 0, 1)"> createBitmap(w, h)
      bitmap</span>?<span style="color: rgba(0, 0, 0, 1)">.let {
            myCanvas </span>=<span style="color: rgba(0, 0, 0, 1)"> Canvas(it)
            invalidate()
      }
      Log.i(TAG, </span>"onSizeChanged width $w height $h"<span style="color: rgba(0, 0, 0, 1)">)
    }

    </span><span style="color: rgba(0, 128, 0, 1)">/**</span><span style="color: rgba(0, 128, 0, 1)">
   * 显示高亮引导
   * </span><span style="color: rgba(128, 128, 128, 1)">@param</span><span style="color: rgba(0, 128, 0, 1)"> highlightView 要高亮的View
   * </span><span style="color: rgba(128, 128, 128, 1)">@param</span><span style="color: rgba(0, 128, 0, 1)"> cornerRadius 圆角半径(当shape为ROUNDED_RECT时有效)
   * </span><span style="color: rgba(128, 128, 128, 1)">@param</span><span style="color: rgba(0, 128, 0, 1)"> onDismiss 关闭回调
   </span><span style="color: rgba(0, 128, 0, 1)">*/</span><span style="color: rgba(0, 0, 0, 1)">
    fun show(highlightView: View, contentView: View</span>?, radius: Float, onDismiss: (() -&gt;<span style="color: rgba(0, 0, 0, 1)"> Unit)) {
      </span><span style="color: rgba(0, 0, 255, 1)">this</span>.highlightView =<span style="color: rgba(0, 0, 0, 1)"> highlightView
      </span><span style="color: rgba(0, 0, 255, 1)">this</span>.cornerRadius =<span style="color: rgba(0, 0, 0, 1)"> radius
      </span><span style="color: rgba(0, 0, 255, 1)">this</span>.onDismissListener =<span style="color: rgba(0, 0, 0, 1)"> onDismiss

      val rootView </span>=<span style="color: rgba(0, 0, 0, 1)"> highlightView.rootView
      </span><span style="color: rgba(0, 0, 255, 1)">if</span> (rootView !<span style="color: rgba(0, 0, 0, 1)">is ViewGroup) {
            Log.w(TAG, </span>"rootView not view group"<span style="color: rgba(0, 0, 0, 1)">)
            </span><span style="color: rgba(0, 0, 255, 1)">return</span><span style="color: rgba(0, 0, 0, 1)">
      }
      rootView.findViewWithTag</span>&lt;HighlightGuideView&gt;(TAG)?<span style="color: rgba(0, 0, 0, 1)">.let {
            rootView.removeView(it)
      }
      tag </span>=<span style="color: rgba(0, 0, 0, 1)"> TAG
      contentView</span>?<span style="color: rgba(0, 0, 0, 1)">.let { addView(it) }
      rootView.addView(
            </span><span style="color: rgba(0, 0, 255, 1)">this</span><span style="color: rgba(0, 0, 0, 1)">,
            ViewGroup.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
      )

      calculateHighlightRect(highlightView)
      animateShow()
      Log.i(TAG, </span>"show"<span style="color: rgba(0, 0, 0, 1)">)
    }

    </span><span style="color: rgba(0, 0, 255, 1)">private</span><span style="color: rgba(0, 0, 0, 1)"> fun calculateHighlightRect(highlightView: View) {
      val location </span>= IntArray(2<span style="color: rgba(0, 0, 0, 1)">)
      highlightView.getLocationOnScreen(location)
      highlightRect.set(
            location[</span>0<span style="color: rgba(0, 0, 0, 1)">].toFloat(),
            location[</span>1<span style="color: rgba(0, 0, 0, 1)">].toFloat(),
            location[</span>0] +<span style="color: rgba(0, 0, 0, 1)"> highlightView.width.toFloat(),
            location[</span>1] +<span style="color: rgba(0, 0, 0, 1)"> highlightView.height.toFloat()
      )
      Log.i(TAG, </span>"calculateHighlightRect ${GsonUtils.toJson(highlightRect)}"<span style="color: rgba(0, 0, 0, 1)">)
    }

    override fun onDraw(canvas: Canvas) {
      </span><span style="color: rgba(0, 0, 255, 1)">super</span><span style="color: rgba(0, 0, 0, 1)">.onDraw(canvas)
      </span><span style="color: rgba(0, 0, 255, 1)">if</span> (myCanvas == <span style="color: rgba(0, 0, 255, 1)">null</span><span style="color: rgba(0, 0, 0, 1)">) {
            Log.w(TAG, </span>"myCanvas is null"<span style="color: rgba(0, 0, 0, 1)">)
            </span><span style="color: rgba(0, 0, 255, 1)">return</span><span style="color: rgba(0, 0, 0, 1)">
      }
      </span><span style="color: rgba(0, 0, 255, 1)">if</span> (bitmap == <span style="color: rgba(0, 0, 255, 1)">null</span><span style="color: rgba(0, 0, 0, 1)">) {
            Log.w(TAG, </span>"bitmap is null"<span style="color: rgba(0, 0, 0, 1)">)
            </span><span style="color: rgba(0, 0, 255, 1)">return</span><span style="color: rgba(0, 0, 0, 1)">
      }

      myCanvas</span>?<span style="color: rgba(0, 0, 0, 1)">.drawRect(0f, 0f, width.toFloat(), height.toFloat(), bgPaint)
      myCanvas</span>?<span style="color: rgba(0, 0, 0, 1)">.drawRoundRect(highlightRect, cornerRadius, cornerRadius, highlightPaint)
      bitmap</span>?.let { canvas.drawBitmap(it, 0f, 0f, <span style="color: rgba(0, 0, 255, 1)">null</span><span style="color: rgba(0, 0, 0, 1)">) }
    }

    @SuppressLint(</span>"ClickableViewAccessibility"<span style="color: rgba(0, 0, 0, 1)">)
    override fun onTouchEvent(event: MotionEvent): Boolean {
      when (event.action) {
            MotionEvent.ACTION_DOWN </span>-&gt;<span style="color: rgba(0, 0, 0, 1)"> {
                </span><span style="color: rgba(0, 0, 255, 1)">if</span> (!<span style="color: rgba(0, 0, 0, 1)">highlightRect.contains(event.x, event.y)) {
                  dismiss()
                }
            }

            MotionEvent.ACTION_CANCEL </span>-&gt;<span style="color: rgba(0, 0, 0, 1)"> {
                dismiss()
            }
      }
      </span><span style="color: rgba(0, 0, 255, 1)">return</span> <span style="color: rgba(0, 0, 255, 1)">true</span><span style="color: rgba(0, 0, 0, 1)">
    }

    fun dismiss() {
      animateDismiss()
    }

    </span><span style="color: rgba(0, 0, 255, 1)">private</span><span style="color: rgba(0, 0, 0, 1)"> fun animateShow() {
      alpha </span>=<span style="color: rgba(0, 0, 0, 1)"> 0f
      animate()
            .alpha(1f)
            .setDuration(ANIMATION_DURATION)
            .setInterpolator(AccelerateDecelerateInterpolator())
            .start()
    }

    </span><span style="color: rgba(0, 0, 255, 1)">private</span><span style="color: rgba(0, 0, 0, 1)"> fun animateDismiss() {
      animate()
            .alpha(0f)
            .setDuration(ANIMATION_DURATION)
            .setInterpolator(AccelerateDecelerateInterpolator())
            .withEndAction {
                (parent as</span>? ViewGroup)?.removeView(<span style="color: rgba(0, 0, 255, 1)">this</span><span style="color: rgba(0, 0, 0, 1)">)
                onDismissListener</span>?<span style="color: rgba(0, 0, 0, 1)">.invoke()
            }.start()
    }

    override fun onDetachedFromWindow() {
      </span><span style="color: rgba(0, 0, 255, 1)">super</span><span style="color: rgba(0, 0, 0, 1)">.onDetachedFromWindow()
      Log.i(TAG, </span>"onDetachedFromWindow"<span style="color: rgba(0, 0, 0, 1)">)
      isShow </span>= <span style="color: rgba(0, 0, 255, 1)">false</span><span style="color: rgba(0, 0, 0, 1)">
      bitmap</span>?<span style="color: rgba(0, 0, 0, 1)">.recycle()
      bitmap </span>= <span style="color: rgba(0, 0, 255, 1)">null</span><span style="color: rgba(0, 0, 0, 1)">
      myCanvas </span>= <span style="color: rgba(0, 0, 255, 1)">null</span><span style="color: rgba(0, 0, 0, 1)">
    }

}</span></pre>
</div>
<span class="cnblogs_code_collapse">View Code</span></div>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 255, 1)">private</span><span style="color: rgba(0, 0, 0, 1)"> fun showHighlightView() {
      mBinding.refreshLayout.getHighlightView()</span>?<span style="color: rgba(0, 0, 0, 1)">.let {
            HighlightGuideView.show(</span><span style="color: rgba(0, 0, 255, 1)">this</span><span style="color: rgba(0, 0, 0, 1)">, it) {}
      }
    }</span></pre>
</div>
<p>如果要对窗口高斯模糊,那需要在rootView上进行绘制(activity共享一个window),会有很多麻烦 IllegalArgumentException: Software rendering doesn't support hardware bitmaps</p>
<h4>2、使用Dialog全屏覆盖</h4>
<p>使用弹框实现,因为DialogFragment是独立window,所以直接使用系统级高斯模糊</p>
<p>每次绘制时 CPU 内存,将图片数据打包好(也就是dequeueBuffer),然后上传到 GPU,GPU具体渲染,最终提交到屏幕设备</p>
<p>因为Dialog中window是在GPU渲染时模糊,最终提交到屏幕设备,所以不需要另外去处理模糊(Dialog中直接访问 Buffer Queue,activity需要截图绘制)</p>
<p><img alt="image" width="748" height="485" loading="lazy" src="https://img2024.cnblogs.com/blog/583064/202604/583064-20260409165650505-601240037.png"></p>
<div class="cnblogs_code"><img id="code_img_closed_7bdf1ec6-636c-4588-925c-edc7419beeed" class="code_img_closed lazyload" data-src="http://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif"><img id="code_img_opened_7bdf1ec6-636c-4588-925c-edc7419beeed" class="code_img_opened lazyload" style="display: none" data-src="http://images.cnblogs.com/OutliningIndicators/ExpandedBlockStart.gif">
<div id="cnblogs_code_open_7bdf1ec6-636c-4588-925c-edc7419beeed" class="cnblogs_code_hide">
<pre><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> android.content.res.Configuration
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> android.os.Bundle
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> android.util.Log
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> android.view.View
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> android.view.WindowManager
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> android.view.animation.AccelerateDecelerateInterpolator
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> androidx.annotation.IntDef
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> androidx.constraintlayout.widget.ConstraintLayout
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> androidx.core.view.WindowCompat
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> androidx.core.view.WindowInsetsCompat
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> androidx.core.view.WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> androidx.core.view.updateLayoutParams
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> androidx.fragment.app.DialogFragment
</span><span style="color: rgba(0, 0, 255, 1)">import</span><span style="color: rgba(0, 0, 0, 1)"> androidx.fragment.app.FragmentManager

</span><span style="color: rgba(0, 128, 0, 1)">/**</span><span style="color: rgba(0, 128, 0, 1)">
* 高亮引导弹框
* </span><span style="color: rgba(128, 128, 128, 1)">@param</span><span style="color: rgba(0, 128, 0, 1)"> sourceList 需要高亮的view
* </span><span style="color: rgba(128, 128, 128, 1)">@param</span><span style="color: rgba(0, 128, 0, 1)"> type 引导类型(目前支持首页+预览页)
</span><span style="color: rgba(0, 128, 0, 1)">*/</span>
<span style="color: rgba(0, 0, 255, 1)">class</span> GuideDialog(<span style="color: rgba(0, 0, 255, 1)">private</span> val sourceList: MutableList&lt;View&gt;, <span style="color: rgba(0, 0, 255, 1)">private</span><span style="color: rgba(0, 0, 0, 1)"> val type: Int) :
    DialogFragment(R.layout.fragment_guide) {

    </span><span style="color: rgba(0, 0, 255, 1)">private</span><span style="color: rgba(0, 0, 0, 1)"> val mBinding by viewBinding(FragmentGuideBinding::bind)

    init {
      setStyle(STYLE_NORMAL, R.style.guide_dialog_theme)
      SharedPreferencesUtils.setGuideRecord(getGuideKey(type))
    }

    companion object {
      </span><span style="color: rgba(0, 0, 255, 1)">private</span> <span style="color: rgba(0, 0, 255, 1)">const</span> val TAG = "GuideDialog"
      <span style="color: rgba(0, 0, 255, 1)">private</span> <span style="color: rgba(0, 0, 255, 1)">const</span> val PET_WALLPAPER_GUIDE_MAIN = "pet_wallpaper_guide_main"
      <span style="color: rgba(0, 0, 255, 1)">private</span> <span style="color: rgba(0, 0, 255, 1)">const</span> val PET_WALLPAPER_GUIDE_PREVIEW = "pet_wallpaper_guide_preview"
      <span style="color: rgba(0, 0, 255, 1)">private</span> var isShow = <span style="color: rgba(0, 0, 255, 1)">false</span>
      <span style="color: rgba(0, 0, 255, 1)">const</span> val MAIN = 0
      <span style="color: rgba(0, 0, 255, 1)">const</span> val PREVIEW = 1<span style="color: rgba(0, 0, 0, 1)">

      @IntDef(MAIN, PREVIEW)
      @Retention(AnnotationRetention.SOURCE)
      </span><span style="color: rgba(0, 0, 255, 1)">private</span> annotation <span style="color: rgba(0, 0, 255, 1)">class</span><span style="color: rgba(0, 0, 0, 1)"> GuideItemType

      </span><span style="color: rgba(0, 0, 255, 1)">private</span><span style="color: rgba(0, 0, 0, 1)"> fun getGuideKey(@GuideItemType type: Int): String {
            </span><span style="color: rgba(0, 0, 255, 1)">return</span> <span style="color: rgba(0, 0, 255, 1)">if</span> (type ==<span style="color: rgba(0, 0, 0, 1)"> PREVIEW) {
                PET_WALLPAPER_GUIDE_PREVIEW
            } </span><span style="color: rgba(0, 0, 255, 1)">else</span><span style="color: rgba(0, 0, 0, 1)"> {
                PET_WALLPAPER_GUIDE_MAIN
            }
      }

      @JvmStatic
      fun show(manager: FragmentManager, sourceView: View, @GuideItemType type: Int) {
            show(manager, mutableListOf(sourceView), type)
      }

      @JvmStatic
      fun show(
            manager: FragmentManager,
            sourceList: MutableList</span>&lt;View&gt;<span style="color: rgba(0, 0, 0, 1)">,
            @GuideItemType type: Int
      ) {
            </span><span style="color: rgba(0, 0, 255, 1)">if</span> (sourceList.isEmpty()) <span style="color: rgba(0, 0, 255, 1)">return</span>
            <span style="color: rgba(0, 0, 255, 1)">if</span> (isShow) <span style="color: rgba(0, 0, 255, 1)">return</span><span style="color: rgba(0, 0, 0, 1)">
            isShow </span>= <span style="color: rgba(0, 0, 255, 1)">true</span>
            <span style="color: rgba(0, 0, 255, 1)">if</span><span style="color: rgba(0, 0, 0, 1)"> (SharedPreferencesUtils.isShowGuide(getGuideKey(type))) {
                GuideDialog(sourceList, type).show(manager, TAG)
            }
      }
    }

    </span><span style="color: rgba(0, 0, 255, 1)">private</span><span style="color: rgba(0, 0, 0, 1)"> val mainItemView: View by lazy {
      LayoutGuideMainItemBinding.inflate(layoutInflater, mBinding.root, </span><span style="color: rgba(0, 0, 255, 1)">true</span><span style="color: rgba(0, 0, 0, 1)">).root
    }

    </span><span style="color: rgba(0, 0, 255, 1)">private</span><span style="color: rgba(0, 0, 0, 1)"> val previewBtnView: View by lazy {
      LayoutGuidePreviewBtnBinding.inflate(layoutInflater, mBinding.root, </span><span style="color: rgba(0, 0, 255, 1)">true</span><span style="color: rgba(0, 0, 0, 1)">).root
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle</span>?<span style="color: rgba(0, 0, 0, 1)">) {
      </span><span style="color: rgba(0, 0, 255, 1)">super</span><span style="color: rgba(0, 0, 0, 1)">.onViewCreated(view, savedInstanceState)
      Log.i(TAG, </span>"onViewCreated"<span style="color: rgba(0, 0, 0, 1)">)
      dialog</span>?.window?<span style="color: rgba(0, 0, 0, 1)">.apply {
            setLayout(
                WindowManager.LayoutParams.MATCH_PARENT,
                WindowManager.LayoutParams.MATCH_PARENT
            )
            </span><span style="color: rgba(0, 0, 255, 1)">if</span> (type ==<span style="color: rgba(0, 0, 0, 1)"> PREVIEW) {
                WindowCompat.setDecorFitsSystemWindows(</span><span style="color: rgba(0, 0, 255, 1)">this</span>, <span style="color: rgba(0, 0, 255, 1)">false</span><span style="color: rgba(0, 0, 0, 1)">)
                WindowCompat.getInsetsController(</span><span style="color: rgba(0, 0, 255, 1)">this</span><span style="color: rgba(0, 0, 0, 1)">, decorView).apply {
                  systemBarsBehavior </span>=<span style="color: rgba(0, 0, 0, 1)"> BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
                  hide(WindowInsetsCompat.Type.systemBars())
                }
            }
      }
      initView()
      animateShow()
    }

    </span><span style="color: rgba(0, 0, 255, 1)">private</span><span style="color: rgba(0, 0, 0, 1)"> fun initView() {
      setContent()
      mBinding.btnOk.setOnClickListener { click() }
      val highlightView </span>=<span style="color: rgba(0, 0, 0, 1)"> when (type) {
            PREVIEW </span>-&gt;<span style="color: rgba(0, 0, 0, 1)"> previewBtnView
            </span><span style="color: rgba(0, 0, 255, 1)">else</span> -&gt;<span style="color: rgba(0, 0, 0, 1)"> mainItemView
      }
      </span><span style="color: rgba(0, 0, 255, 1)">if</span><span style="color: rgba(0, 0, 0, 1)"> (sourceList.isNotEmpty()) {
            updateItemView(sourceList[</span>0<span style="color: rgba(0, 0, 0, 1)">], highlightView)
      } </span><span style="color: rgba(0, 0, 255, 1)">else</span><span style="color: rgba(0, 0, 0, 1)"> {
            Log.w(TAG, </span>"sourceList is empty"<span style="color: rgba(0, 0, 0, 1)">)
      }
      mBinding.root.setOnClickListener { click() }
    }

    </span><span style="color: rgba(0, 0, 255, 1)">private</span><span style="color: rgba(0, 0, 0, 1)"> fun setContent() {
      </span><span style="color: rgba(0, 0, 255, 1)">if</span> (type ==<span style="color: rgba(0, 0, 0, 1)"> PREVIEW) {
            mBinding.tvTitle.setExtText(R.string.screen_main_pet_guide_preview)
      } </span><span style="color: rgba(0, 0, 255, 1)">else</span><span style="color: rgba(0, 0, 0, 1)"> {
            mBinding.tvTitle.setExtText(R.string.screen_main_pet_guide_item)
      }
    }

    </span><span style="color: rgba(0, 0, 255, 1)">private</span><span style="color: rgba(0, 0, 0, 1)"> fun animateShow() {
      mBinding.root.alpha </span>=<span style="color: rgba(0, 0, 0, 1)"> 0f
      mBinding.root.animate()
            .alpha(1f)
            .setDuration(</span>300<span style="color: rgba(0, 0, 0, 1)">)
            .setInterpolator(AccelerateDecelerateInterpolator())
            .start()
    }

    </span><span style="color: rgba(0, 0, 255, 1)">private</span><span style="color: rgba(0, 0, 0, 1)"> fun updateItemView(sourceView: View, highlightView: View) {
      val location </span>= IntArray(2<span style="color: rgba(0, 0, 0, 1)">)
      sourceView.getLocationOnScreen(location)
      highlightView.updateLayoutParams</span>&lt;ConstraintLayout.LayoutParams&gt;<span style="color: rgba(0, 0, 0, 1)"> {
            width </span>=<span style="color: rgba(0, 0, 0, 1)"> sourceView.width
            height </span>=<span style="color: rgba(0, 0, 0, 1)"> sourceView.height
            setMargins(location[</span>0], location, 0, 0<span style="color: rgba(0, 0, 0, 1)">)
      }
      sourceList.remove(sourceView)
      Log.i(TAG, </span>"updateItemView [${location},${location}]"<span style="color: rgba(0, 0, 0, 1)">)
    }

    override fun onConfigurationChanged(newConfig: Configuration) {
      </span><span style="color: rgba(0, 0, 255, 1)">super</span><span style="color: rgba(0, 0, 0, 1)">.onConfigurationChanged(newConfig)
      setContent()
      mBinding.tvTitle.setPXTextSize(R.dimen.common_sp_64)
      mBinding.tvTitle.setExtTextColor(R.color.main_highlight_guide_title)
      mBinding.btnOk.setPXTextSize(R.dimen.common_sp_32)
      mBinding.btnOk.setExtTextColor(R.color.main_highlight_guide_title)
      mBinding.btnOk.setExtText(R.string.screen_main_pet_guide_btn)
    }

    </span><span style="color: rgba(0, 0, 255, 1)">private</span><span style="color: rgba(0, 0, 0, 1)"> fun click() {
      Log.i(TAG, </span>"click size=${sourceList.size}"<span style="color: rgba(0, 0, 0, 1)">)
      </span><span style="color: rgba(0, 0, 255, 1)">if</span><span style="color: rgba(0, 0, 0, 1)"> (sourceList.isEmpty()) {
            dismiss()
      } </span><span style="color: rgba(0, 0, 255, 1)">else</span><span style="color: rgba(0, 0, 0, 1)"> {
            updateItemView(sourceList[</span>0<span style="color: rgba(0, 0, 0, 1)">], mainItemView)
      }
    }

    override fun onDestroy() {
      </span><span style="color: rgba(0, 0, 255, 1)">super</span><span style="color: rgba(0, 0, 0, 1)">.onDestroy()
      sourceList.clear()
      isShow </span>= <span style="color: rgba(0, 0, 255, 1)">false</span><span style="color: rgba(0, 0, 0, 1)">
      Log.i(TAG, </span>"onDestroy"<span style="color: rgba(0, 0, 0, 1)">)
    }

}</span></pre>
</div>
<span class="cnblogs_code_collapse">View Code</span></div>
<div class="cnblogs_code"><img id="code_img_closed_841237df-a395-4c0f-a27f-94d3b12c340d" class="code_img_closed lazyload" data-src="http://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif"><img id="code_img_opened_841237df-a395-4c0f-a27f-94d3b12c340d" class="code_img_opened lazyload" style="display: none" data-src="http://images.cnblogs.com/OutliningIndicators/ExpandedBlockStart.gif">
<div id="cnblogs_code_open_841237df-a395-4c0f-a27f-94d3b12c340d" class="cnblogs_code_hide">
<pre><span style="color: rgba(0, 0, 255, 1)">&lt;?</span><span style="color: rgba(255, 0, 255, 1)">xml version="1.0" encoding="utf-8"</span><span style="color: rgba(0, 0, 255, 1)">?&gt;</span>
<span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">com.test.screensaver.view.ShapeImageView </span><span style="color: rgba(255, 0, 0, 1)">xmlns:android</span><span style="color: rgba(0, 0, 255, 1)">="http://schemas.android.com/apk/res/android"</span><span style="color: rgba(255, 0, 0, 1)">
    xmlns:app</span><span style="color: rgba(0, 0, 255, 1)">="http://schemas.android.com/apk/res-auto"</span><span style="color: rgba(255, 0, 0, 1)">
    android:layout_width</span><span style="color: rgba(0, 0, 255, 1)">="match_parent"</span><span style="color: rgba(255, 0, 0, 1)">
    android:layout_height</span><span style="color: rgba(0, 0, 255, 1)">="match_parent"</span><span style="color: rgba(255, 0, 0, 1)">
    android:padding</span><span style="color: rgba(0, 0, 255, 1)">="@dimen/common_dp_10"</span><span style="color: rgba(255, 0, 0, 1)">
    android:scaleType</span><span style="color: rgba(0, 0, 255, 1)">="fitXY"</span><span style="color: rgba(255, 0, 0, 1)">
    android:src</span><span style="color: rgba(0, 0, 255, 1)">="@drawable/icon_guide_main_item_pet"</span><span style="color: rgba(255, 0, 0, 1)">
    app:layout_constraintStart_toStartOf</span><span style="color: rgba(0, 0, 255, 1)">="parent"</span><span style="color: rgba(255, 0, 0, 1)">
    app:layout_constraintTop_toTopOf</span><span style="color: rgba(0, 0, 255, 1)">="parent"</span><span style="color: rgba(255, 0, 0, 1)">
    app:shapeAppearanceOverlay</span><span style="color: rgba(0, 0, 255, 1)">="@style/cornerRound24"</span> <span style="color: rgba(0, 0, 255, 1)">/&gt;</span></pre>
</div>
<span class="cnblogs_code_collapse">LayoutGuideMainItemBinding</span></div>
<div class="cnblogs_code"><img id="code_img_closed_d6739d30-b22c-4d59-bb3d-2c13700a8742" class="code_img_closed lazyload" data-src="http://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif"><img id="code_img_opened_d6739d30-b22c-4d59-bb3d-2c13700a8742" class="code_img_opened lazyload" style="display: none" data-src="http://images.cnblogs.com/OutliningIndicators/ExpandedBlockStart.gif">
<div id="cnblogs_code_open_d6739d30-b22c-4d59-bb3d-2c13700a8742" class="cnblogs_code_hide">
<pre><span style="color: rgba(0, 0, 255, 1)">&lt;?</span><span style="color: rgba(255, 0, 255, 1)">xml version="1.0" encoding="utf-8"</span><span style="color: rgba(0, 0, 255, 1)">?&gt;</span>
<span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">com.test.button.ZeekrButton </span><span style="color: rgba(255, 0, 0, 1)">xmlns:android</span><span style="color: rgba(0, 0, 255, 1)">="http://schemas.android.com/apk/res/android"</span><span style="color: rgba(255, 0, 0, 1)">
    xmlns:app</span><span style="color: rgba(0, 0, 255, 1)">="http://schemas.android.com/apk/res-auto"</span><span style="color: rgba(255, 0, 0, 1)">
    style</span><span style="color: rgba(0, 0, 255, 1)">="@style/ButtonHMI.RealButton.Large"</span><span style="color: rgba(255, 0, 0, 1)">
    android:layout_width</span><span style="color: rgba(0, 0, 255, 1)">="match_parent"</span><span style="color: rgba(255, 0, 0, 1)">
    android:layout_height</span><span style="color: rgba(0, 0, 255, 1)">="match_parent"</span><span style="color: rgba(255, 0, 0, 1)">
    android:clickable</span><span style="color: rgba(0, 0, 255, 1)">="false"</span><span style="color: rgba(255, 0, 0, 1)">
    android:focusable</span><span style="color: rgba(0, 0, 255, 1)">="false"</span><span style="color: rgba(255, 0, 0, 1)">
    android:focusableInTouchMode</span><span style="color: rgba(0, 0, 255, 1)">="false"</span><span style="color: rgba(255, 0, 0, 1)">
    android:maxLines</span><span style="color: rgba(0, 0, 255, 1)">="1"</span><span style="color: rgba(255, 0, 0, 1)">
    android:text</span><span style="color: rgba(0, 0, 255, 1)">="test"</span><span style="color: rgba(255, 0, 0, 1)">
    android:textSize</span><span style="color: rgba(0, 0, 255, 1)">="@dimen/common_sp_32"</span><span style="color: rgba(255, 0, 0, 1)">
    app:cornerRadius</span><span style="color: rgba(0, 0, 255, 1)">="@dimen/common_dp_24"</span><span style="color: rgba(255, 0, 0, 1)">
    app:layout_constraintStart_toStartOf</span><span style="color: rgba(0, 0, 255, 1)">="parent"</span><span style="color: rgba(255, 0, 0, 1)">
    app:layout_constraintTop_toTopOf</span><span style="color: rgba(0, 0, 255, 1)">="parent"</span> <span style="color: rgba(0, 0, 255, 1)">/&gt;</span></pre>
</div>
<span class="cnblogs_code_collapse">LayoutGuidePreviewBtnBinding</span></div>
<div class="cnblogs_code"><img id="code_img_closed_e31afed2-bfe8-41b7-8f26-bd9bdf6e5823" class="code_img_closed lazyload" data-src="http://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif"><img id="code_img_opened_e31afed2-bfe8-41b7-8f26-bd9bdf6e5823" class="code_img_opened lazyload" style="display: none" data-src="http://images.cnblogs.com/OutliningIndicators/ExpandedBlockStart.gif">
<div id="cnblogs_code_open_e31afed2-bfe8-41b7-8f26-bd9bdf6e5823" class="cnblogs_code_hide">
<pre><span style="color: rgba(0, 0, 255, 1)">&lt;?</span><span style="color: rgba(255, 0, 255, 1)">xml version="1.0" encoding="utf-8"</span><span style="color: rgba(0, 0, 255, 1)">?&gt;</span>
<span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">androidx.constraintlayout.widget.ConstraintLayout </span><span style="color: rgba(255, 0, 0, 1)">xmlns:android</span><span style="color: rgba(0, 0, 255, 1)">="http://schemas.android.com/apk/res/android"</span><span style="color: rgba(255, 0, 0, 1)">
    xmlns:app</span><span style="color: rgba(0, 0, 255, 1)">="http://schemas.android.com/apk/res-auto"</span><span style="color: rgba(255, 0, 0, 1)">
    android:layout_width</span><span style="color: rgba(0, 0, 255, 1)">="match_parent"</span><span style="color: rgba(255, 0, 0, 1)">
    android:layout_height</span><span style="color: rgba(0, 0, 255, 1)">="match_parent"</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>

    <span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">TextView
      </span><span style="color: rgba(255, 0, 0, 1)">android:id</span><span style="color: rgba(0, 0, 255, 1)">="@+id/tv_title"</span><span style="color: rgba(255, 0, 0, 1)">
      android:layout_width</span><span style="color: rgba(0, 0, 255, 1)">="wrap_content"</span><span style="color: rgba(255, 0, 0, 1)">
      android:layout_height</span><span style="color: rgba(0, 0, 255, 1)">="wrap_content"</span><span style="color: rgba(255, 0, 0, 1)">
      android:layout_marginTop</span><span style="color: rgba(0, 0, 255, 1)">="@dimen/common_dp_624"</span><span style="color: rgba(255, 0, 0, 1)">
      android:gravity</span><span style="color: rgba(0, 0, 255, 1)">="center_horizontal"</span><span style="color: rgba(255, 0, 0, 1)">
      android:text</span><span style="color: rgba(0, 0, 255, 1)">="@string/screen_main_pet_guide_item"</span><span style="color: rgba(255, 0, 0, 1)">
      android:textColor</span><span style="color: rgba(0, 0, 255, 1)">="@color/main_highlight_guide_title"</span><span style="color: rgba(255, 0, 0, 1)">
      android:textSize</span><span style="color: rgba(0, 0, 255, 1)">="@dimen/common_sp_64"</span><span style="color: rgba(255, 0, 0, 1)">
      app:layout_constraintEnd_toEndOf</span><span style="color: rgba(0, 0, 255, 1)">="parent"</span><span style="color: rgba(255, 0, 0, 1)">
      app:layout_constraintStart_toStartOf</span><span style="color: rgba(0, 0, 255, 1)">="parent"</span><span style="color: rgba(255, 0, 0, 1)">
      app:layout_constraintTop_toTopOf</span><span style="color: rgba(0, 0, 255, 1)">="parent"</span> <span style="color: rgba(0, 0, 255, 1)">/&gt;</span>

    <span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">com.test.button.ZeekrButton
      </span><span style="color: rgba(255, 0, 0, 1)">android:id</span><span style="color: rgba(0, 0, 255, 1)">="@+id/btn_ok"</span><span style="color: rgba(255, 0, 0, 1)">
      style</span><span style="color: rgba(0, 0, 255, 1)">="@style/Widget.ZeekrButton.GhostButton.Large"</span><span style="color: rgba(255, 0, 0, 1)">
      android:layout_width</span><span style="color: rgba(0, 0, 255, 1)">="@dimen/common_dp_224"</span><span style="color: rgba(255, 0, 0, 1)">
      android:layout_height</span><span style="color: rgba(0, 0, 255, 1)">="@dimen/common_dp_104"</span><span style="color: rgba(255, 0, 0, 1)">
      android:layout_marginTop</span><span style="color: rgba(0, 0, 255, 1)">="@dimen/common_dp_88"</span><span style="color: rgba(255, 0, 0, 1)">
      android:focusedByDefault</span><span style="color: rgba(0, 0, 255, 1)">="true"</span><span style="color: rgba(255, 0, 0, 1)">
      android:gravity</span><span style="color: rgba(0, 0, 255, 1)">="center"</span><span style="color: rgba(255, 0, 0, 1)">
      android:text</span><span style="color: rgba(0, 0, 255, 1)">="@string/screen_main_pet_guide_btn"</span><span style="color: rgba(255, 0, 0, 1)">
      android:textColor</span><span style="color: rgba(0, 0, 255, 1)">="@color/main_highlight_guide_title"</span><span style="color: rgba(255, 0, 0, 1)">
      android:textSize</span><span style="color: rgba(0, 0, 255, 1)">="@dimen/common_sp_32"</span><span style="color: rgba(255, 0, 0, 1)">
      app:backgroundTint</span><span style="color: rgba(0, 0, 255, 1)">="@color/screen_main_select_bg"</span><span style="color: rgba(255, 0, 0, 1)">
      app:cornerRadius</span><span style="color: rgba(0, 0, 255, 1)">="@dimen/common_dp_24"</span><span style="color: rgba(255, 0, 0, 1)">
      app:layout_constraintEnd_toEndOf</span><span style="color: rgba(0, 0, 255, 1)">="parent"</span><span style="color: rgba(255, 0, 0, 1)">
      app:layout_constraintStart_toStartOf</span><span style="color: rgba(0, 0, 255, 1)">="parent"</span><span style="color: rgba(255, 0, 0, 1)">
      app:layout_constraintTop_toBottomOf</span><span style="color: rgba(0, 0, 255, 1)">="@+id/tv_title"</span> <span style="color: rgba(0, 0, 255, 1)">/&gt;</span>

<span style="color: rgba(0, 0, 255, 1)">&lt;/</span><span style="color: rgba(128, 0, 0, 1)">androidx.constraintlayout.widget.ConstraintLayout</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span></pre>
</div>
<span class="cnblogs_code_collapse">FragmentGuideBinding</span></div>
<div class="cnblogs_code"><img id="code_img_closed_f3d0b115-15cd-4ef5-b3df-0e00e4cf1da5" class="code_img_closed lazyload" data-src="http://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif"><img id="code_img_opened_f3d0b115-15cd-4ef5-b3df-0e00e4cf1da5" class="code_img_opened lazyload" style="display: none" data-src="http://images.cnblogs.com/OutliningIndicators/ExpandedBlockStart.gif">
<div id="cnblogs_code_open_f3d0b115-15cd-4ef5-b3df-0e00e4cf1da5" class="cnblogs_code_hide">
<pre><span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">style </span><span style="color: rgba(255, 0, 0, 1)">name</span><span style="color: rgba(0, 0, 255, 1)">="guide_dialog_theme"</span><span style="color: rgba(255, 0, 0, 1)"> parent</span><span style="color: rgba(0, 0, 255, 1)">="@style/Theme26.SplashScreen"</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
      <span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">item </span><span style="color: rgba(255, 0, 0, 1)">name</span><span style="color: rgba(0, 0, 255, 1)">="android:windowNoTitle"</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>true<span style="color: rgba(0, 0, 255, 1)">&lt;/</span><span style="color: rgba(128, 0, 0, 1)">item</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
      <span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">item </span><span style="color: rgba(255, 0, 0, 1)">name</span><span style="color: rgba(0, 0, 255, 1)">="android:windowIsFloating"</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>false<span style="color: rgba(0, 0, 255, 1)">&lt;/</span><span style="color: rgba(128, 0, 0, 1)">item</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
      <span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">item </span><span style="color: rgba(255, 0, 0, 1)">name</span><span style="color: rgba(0, 0, 255, 1)">="android:windowIsTranslucent"</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>true<span style="color: rgba(0, 0, 255, 1)">&lt;/</span><span style="color: rgba(128, 0, 0, 1)">item</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
      <span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">item </span><span style="color: rgba(255, 0, 0, 1)">name</span><span style="color: rgba(0, 0, 255, 1)">="android:windowFullscreen"</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>true<span style="color: rgba(0, 0, 255, 1)">&lt;/</span><span style="color: rgba(128, 0, 0, 1)">item</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
      <span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">item </span><span style="color: rgba(255, 0, 0, 1)">name</span><span style="color: rgba(0, 0, 255, 1)">="android:backgroundDimEnabled"</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>false<span style="color: rgba(0, 0, 255, 1)">&lt;/</span><span style="color: rgba(128, 0, 0, 1)">item</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
      <span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">item </span><span style="color: rgba(255, 0, 0, 1)">name</span><span style="color: rgba(0, 0, 255, 1)">="android:windowCloseOnTouchOutside"</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>true<span style="color: rgba(0, 0, 255, 1)">&lt;/</span><span style="color: rgba(128, 0, 0, 1)">item</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
      <span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">item </span><span style="color: rgba(255, 0, 0, 1)">name</span><span style="color: rgba(0, 0, 255, 1)">="android:background"</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>@android:color/transparent<span style="color: rgba(0, 0, 255, 1)">&lt;/</span><span style="color: rgba(128, 0, 0, 1)">item</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
      <span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">item </span><span style="color: rgba(255, 0, 0, 1)">name</span><span style="color: rgba(0, 0, 255, 1)">="android:windowBackground"</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>@android:color/transparent<span style="color: rgba(0, 0, 255, 1)">&lt;/</span><span style="color: rgba(128, 0, 0, 1)">item</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
      <span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">item </span><span style="color: rgba(255, 0, 0, 1)">name</span><span style="color: rgba(0, 0, 255, 1)">="android:windowContentOverlay"</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>@null<span style="color: rgba(0, 0, 255, 1)">&lt;/</span><span style="color: rgba(128, 0, 0, 1)">item</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
      <span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">item </span><span style="color: rgba(255, 0, 0, 1)">name</span><span style="color: rgba(0, 0, 255, 1)">="android:windowBlurBehindEnabled"</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>true<span style="color: rgba(0, 0, 255, 1)">&lt;/</span><span style="color: rgba(128, 0, 0, 1)">item</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
      <span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">item </span><span style="color: rgba(255, 0, 0, 1)">name</span><span style="color: rgba(0, 0, 255, 1)">="android:windowBlurBehindRadius"</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>70px<span style="color: rgba(0, 0, 255, 1)">&lt;/</span><span style="color: rgba(128, 0, 0, 1)">item</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
      <span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">item </span><span style="color: rgba(255, 0, 0, 1)">name</span><span style="color: rgba(0, 0, 255, 1)">="android:windowBackgroundBlurRadius"</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>10px<span style="color: rgba(0, 0, 255, 1)">&lt;/</span><span style="color: rgba(128, 0, 0, 1)">item</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
    <span style="color: rgba(0, 0, 255, 1)">&lt;/</span><span style="color: rgba(128, 0, 0, 1)">style</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span></pre>
</div>
<span class="cnblogs_code_collapse">guide_dialog_theme</span></div>
<p>&nbsp;</p><br><br>
来源:https://www.cnblogs.com/LiuZhen/p/19842155
頁: [1]
查看完整版本: 引导记录