Android FrameLayout等 设置子控件层级 控件最上层显示 顶层显示

Android FrameLayout等 设置子控件层级 控件最上层显示 顶层显示,第1张

概述View.javaview.bringToFront();//将view提高到最顶层显示/***Changetheview'szorderinthetree,soit'sontopofothersibling*views.Thisorderingchangemayaffectlayout,iftheparentcontainer*usesanorder-dependentla

VIEw.java
vIEw.bringToFront(); // 将vIEw提高到最顶层显示

    /**     * Change the vIEw's z order in the tree, so it's on top of other sibling     * vIEws. This ordering change may affect layout, if the parent container     * uses an order-dependent layout scheme (e.g., linearLayout). Prior     * to {@link androID.os.Build.VERSION_CODES#KITKAT} this     * method should be followed by calls to {@link #requestLayout()} and     * {@link VIEw#invalIDate()} on the vIEw's parent to force the parent to redraw     * with the new child ordering.     *     * @see VIEwGroup#bringChildToFront(VIEw)     */    public voID bringToFront() {        if (mParent != null) {            mParent.bringChildToFront(this);        }    }
总结

以上是内存溢出为你收集整理的Android FrameLayout等 设置子控件层级 控件最上层显示 顶层显示全部内容,希望文章能够帮你解决Android FrameLayout等 设置子控件层级 控件最上层显示 顶层显示所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1035841.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存