android.view.View.setBackgroundDrawable搞笑的废弃声明

来源:互联网 发布:黄金海岸打车软件 编辑:程序博客网 时间:2024/05/16 05:43

源码中是酱紫声明的


 /**     * @deprecated use {@link #setBackground(Drawable)} instead     */    @Deprecated    public void setBackgroundDrawable(Drawable background) {}

然后找到这个方法


/**     * Set the background to a given Drawable, or remove the background. If the     * background has padding, this View's padding is set to the background's     * padding. However, when a background is removed, this View's padding isn't     * touched. If setting the padding is desired, please use     * {@link #setPadding(int, int, int, int)}.     *     * @param background The Drawable to use as the background, or null to remove the     *        background     */    public void setBackground(Drawable background) {        //noinspection deprecation        setBackgroundDrawable(background);    }


你确定这不是在逗我玩?

原创粉丝点击