【问题标题】:Remove foreground view from FrameLayout从 FrameLayout 中删除前景视图
【发布时间】:2014-12-09 09:44:35
【问题描述】:

我正在使用以下命令在 frameLayout 上绘制边框:

frameLayout.setForeground(getResources().getDrawable(R.drawable.blue_border));

现在我想删除这个前景可绘制对象。我该怎么做?

【问题讨论】:

    标签: android android-drawable android-framelayout


    【解决方案1】:

    传递 null 作为参数就足够了:

    frameLayout.setForeground(null);
    

    【讨论】:

    • 扳机比我快。 :(
    • 调用需要 API 23...
    • 几乎没有,因为它在 api v1 中可用。仔细检查文档
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-03-25
    • 2013-05-23
    • 1970-01-01
    • 2011-01-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多