ActionSheet.java 文件源码

java
阅读 37 收藏 0 点赞 0 评论 0

项目:ShangHanLun 作者:
private Drawable getOtherButtonBg(String[] titles, int i) {
    if (titles.length == 1) {
        return mAttrs.otherButtonSingleBackground;
    }
    if (titles.length == 2) {
        switch (i) {
            case 0:
                return mAttrs.otherButtonTopBackground;
            case 1:
                return mAttrs.otherButtonBottomBackground;
        }
    }
    if (titles.length > 2) {
        if (i == 0) {
            return mAttrs.otherButtonTopBackground;
        }
        if (i == (titles.length - 1)) {
            return mAttrs.otherButtonBottomBackground;
        }
        return mAttrs.getOtherButtonMiddleBackground();
    }
    return null;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号