美文网首页
AS常用jar_自用

AS常用jar_自用

作者: yangjianan | 来源:发表于2016-05-09 09:23 被阅读115次

    首发 珠珠のBlog

    1. orhanobut/logger

    allprojects {
        repositories {
            jcenter()
            // 项目gradle中添加 jitpack仓库
            maven { url "https://jitpack.io" }
        }
    }
    
    dependencies {
            //  moudle/gradle中添加
          compile 'com.github.orhanobut:logger:1.12'
    }
    

    注意: Logger.init(YOUR_TAG)为初始化入口

    2. orhanobut/dialogplus

    compile 'com.orhanobut:dialogplus:1.11@aar'
    

    例如:

        private DialogPlus generateDialog(String tag) {
    
            View contentView = this.getActivity().getLayoutInflater().inflate(R.layout.bundle_filelter_pop, null);
    
            bundleFilterList = (ListView) contentView.findViewById(R.id.bundle_filter_list);
    
            cancelBundleFilterBtn = (TextView) contentView.findViewById(R.id.bundle_selfilter_cancel_btn);
    
            if (catalogs != null && !catalogs.isEmpty()) {
                ArrayAdapter<String> adapter = new ArrayAdapter<>(this.getActivity(), R.layout.simple_list_item_1_center, catalogs);
                bundleFilterList.setAdapter(adapter);
            }
    
            DialogPlus dialog = DialogPlus.newDialog(this.getActivity())
                    .setContentHolder(new ViewHolder(contentView))
                    .create();
            return dialog;
    }
    

    效果图如下:

    dialogplus.png

    3. 懒人框架

    compile 'com.jakewharton:butterknife:7.0.0'
    

    4. http封装-hongyang

    compile 'com.zhy:okhttputils:2.4.1'
    

    5. Gson

    compile 'com.google.code.gson:gson:2.2.4'
    

    相关文章

      网友评论

          本文标题:AS常用jar_自用

          本文链接:https://www.haomeiwen.com/subject/hiferttx.html