【问题标题】:BitmapDrawable() method deprecated [duplicate]不推荐使用 BitmapDrawable() 方法[重复]
【发布时间】:2014-07-01 23:25:27
【问题描述】:

我可以用什么来代替已弃用的 BitmapDrawable()。我有以下代码。我只是想清除这个视图的背景。

popupMessage = new PopupWindow(view, LayoutParams.MATCH_PARENT,
                    LayoutParams.WRAP_CONTENT);
            popupMessage.setContentView(view);

            // Clear the default translucent background
            popupMessage.setBackgroundDrawable(new BitmapDrawable());

提前致谢!

【问题讨论】:

    标签: android bitmap background


    【解决方案1】:

    popupMessage.setBackgroundDrawable(null) 将清除背景。

    来自documentation

    更改此弹出窗口的背景可绘制对象。背景 可以设置为null。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-11-14
      • 2015-07-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-28
      相关资源
      最近更新 更多