This write is loader the package after the network architecture, on this basis, the API to everyone, add some custom controls, easy to develop ~ Continuous Update ~ Thank you ~
650) this.width=650; "Width=" src= "Http://s5.51cto.com/wyfs02/M02/8A/0F/wKiom1glNrHSGwoDAANYFnM4RR4495.jpg" Title= "13_conew1.jpg" alt= "Wkiom1glnrhsgwodaanyfnm4rr4495.jpg"/>
Address: Https://github.com/geeklx/MakeJarAAR
Api:
1.GlideUtil: Picture cache frame, support rounded corners
1glideutil.display (Mainactivity.this, Iv1, "http://img0.bdstatic.com/img/image/touxiang01.jpg", Glideoptionsfactory.get (GlideOptionsFactory.Type.RADIUS));//2glideoptions glideoptions = new Glideoptions ( R.drawable.pic_head, R.drawable.pic_head, 300); Glideutil.display (Mainactivity.this, Iv2, "http://img0.bdstatic.com/img/image/touxiang01.jpg", glideoptions);// 3glideutil.display (Mainactivity.this, Iv3, "http://img0.bdstatic.com/img/image/touxiang01.jpg");
2. Request Network method: Donewwork ("id");
Private void donewwork (string user_id) { demoparams p = new demoparams (user_id); net.build (Demoapi.class, getclass (). GetName ()) . Getdemomodel (Paramsutils.just (P)). Enqueue (new callback<demomodel> () { @Override public void Onresponse (Result<demomodel> result) { if (Result.isok ()) { demomodel = new demomodel (); demoModel_item = new Demomodel_item (); demomodel_list = neW arraylist<demomodel_list> (); demomodel_item = result.getresult (). Getpage_info (); demoModel_list = Result.getresult (). Getfood_list (); if (Demomodel_list != null && demomodel_list.size () > 0) { //has data status //handle your own logic If you don't God can't save you ~ Toastutil.showtoastcenter ("with data"); } else { //No data status //can use a custom layout reference:http://liangxiao.blog.51cto.com/3626612/1851105 Toastutil.showtoastcenter ("no Data"); } } else { //No network status Toastutil.showtoastcenter ("No network status please re-Request the server! "); } } });}
Not to be continued ....
650) this.width=650; "Width=" src= "Http://s1.51cto.com/wyfs02/M00/8A/0B/wKioL1glORTgHZmnAAWi8RwxbhI926.png" Title= "Shining044.png" alt= "Wkiol1glortghzmnaawi8rwxbhi926.png"/>
This article is from the "Liangxiao Technology Center" blog, please be sure to keep this source http://liangxiao.blog.51cto.com/3626612/1871729
Android Studio Phase 19th-Glin architecture