# AhLive # ææºç活客æ·ç«¯ # ### éææ°é»ï¼å¾çï¼çµå½±ï¼æç¬è§é¢çåè½ä¸ºä¸ä½çApp,使ç¨å°ä»æ¥å¤´æ¡ï¼æ¶å ç½ï¼æ¯æ¥ä¸æï¼åå 涵段åçAPIæ¥å£ï¼æ¬è½¯ä»¶æ ä»»ä½åä¸ç¨éï¼å¦æä¾µæï¼è¯·èç³»æ¬äººã ![](https://github.com/MiChongGET/AhLive/blob/master/app/ahlive.gif) ---------- >1ã æ¬æ¬¡é¡¹ç®ä½¿ç¨å°å¦ä¸çå¼æºåº ##### Xutils ##### Gson ##### MZBannerView ##### Glide ##### Jiecaovideoplayer ##### fastjson ##### butterknife ##### RxTools ##### ucrop ##### EventBus ---------- >2ãè¿ä½¿ç¨å°ç¬¬ä¸æ¹éæSDK #### é«å¾·å°å¾å®ä½æ¨¡å #### Mobçsharesdkï¼ç¤¾ä¼åå享 ---------- >3ãç¹å«æè°¢ä½è jokermonnå¼æºçAPIæ¥å£ [https://github.com/jokermonn/-Api](https://github.com/jokermonn/-Api) #App详æ >4ãåºç¡æ¡æ¶æ建 #### SlidingActivity+TabFragmentå®ç°ä¾§è¾¹æ ååºé¨å¯¼èªæé® ![](https://github.com/MiChongGET/AhLive/blob/master/app/pic/1.png)![](https://github.com/MiChongGET/AhLive/blob/master/app/pic/2.png) 1ï¼ä¾§è¾¹æ 主è¦å¼åäºä¸ªäººä¸å¿ï¼å æ¬ä¸ªäººå¤´åï¼å§åï¼ä¸ªæ§ç¾åï¼ä½ç½®ä¿¡æ¯ãå ¶ä¸ä½ç½®ä¿¡æ¯æ¯éæäºé«å¾·å°å¾çå®ä½æå¡ï¼å®æ¶è·åç¨æ·çå°çä½ç½®ã头ååç¾å使ç¨EventBusæ¥æ´æ°çãå¾ç使ç¨Glideæ¡æ¶å®ç°å è½½å¾çã 2ï¼åºé¨å¯¼èªæ å为å个åè½ï¼é¦é¡µï¼æ°é»ä¸å¿ï¼ä¸æ çµå½±ï¼ä»¥åæç¬è§é¢æ¨¡åã >5ãé¦é¡µæ建 ![](https://github.com/MiChongGET/AhLive/blob/master/app/pic/2.png)![](https://github.com/MiChongGET/AhLive/blob/master/app/pic/3.png) ###### ï¼ï¼å¾çæ»å¨ä½¿ç¨çæ¯[MZBannerView](https://github.com/pinguo-zhouwei/MZBannerView)ï¼ä»¿ç §é æååºçæ»å¨å¾çåç ###### 2ï¼æ¯æ¥ä¸æ使ç¨çæ¯[æ¯æ¥ä¸æ](https://github.com/jokermonn/-Api/blob/master/OneArticle.md)çæ¥å£ãæç« æ¾ç¤ºçé¢ä½¿ç¨çæ¯CollapsingToolbarLayout+AppBarLayout ###### å ¶ä¸æ¹åæ é¢æ¾ç¤º
mAppBarLayout.addOnOffsetChangedListener(new AppBarLayout.OnOffsetChangedListener() {
@Override
public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) {
//å¤æä½ç½®
if (verticalOffset <= -mLayout.getHeight() /2){
mToolbarLayout.setTitle(mTitle1);
}else {
mToolbarLayout.setTitle("");
}
}
});
>6ãæ°é»ä¸å¿
###### æ°é»ä¸å¿å为æ¨èã社ä¼ã段åã趣å¾å个模å
![](https://github.com/MiChongGET/AhLive/blob/master/app/pic/4.png)
![](https://github.com/MiChongGET/AhLive/blob/master/app/pic/5.png)
![](https://github.com/MiChongGET/AhLive/blob/master/app/pic/6.png)
使ç¨å°[ä»æ¥å¤´æ¡](https://github.com/jokermonn/-Api/blob/master/Todaynews.md)çapiæ¥å£
çé¢ä½¿ç¨çæ¯ReclerViewæ建çï¼æ°é»æ¨¡åå社ä¼æ¨¡åä¸å¨èªå®ä¹adapterå¤æå¾çææ 以åæ¾ç¤ºå¾çå¤å°è®¾ç½®ç¸åºçxmlã趣å¾æ¨¡å使ç¨Glideå®ç°éæå¾åGifå¾çæ¾ç¤ºã
>7ãä¸æ çµå½±æ¨¡å使ç¨[æ¶å
ç½](https://github.com/jokermonn/-Api/blob/master/Time.md)çAPI
![](https://github.com/MiChongGET/AhLive/blob/master/app/pic/7.png)![](https://github.com/MiChongGET/AhLive/blob/master/app/pic/8.png)![](https://github.com/MiChongGET/AhLive/blob/master/app/pic/9.png)
çµå½±è¯¦æ
模å使ç¨CollapsingToolbarLayout+AppBarLayoutï¼ä¸åé¨å使ç¨TabLayout+ViewPagerç»å使ç¨å®ç°æ»å¨ææãé¢åçè§é¢ä½¿ç¨çæ¯[Jiecaovideoplayer](https://github.com/lipangit/JieCaoVideoPlayer)ãå享模å使ç¨çMobç社ä¼åå享ä¸å¡ãè¯è®ºåºä¸»è¦æ¯å®ç°æ¯20个æ¡ç®æ´æ°ã
è¯è®ºåºæ¡ç®æ´æ°çå®ç°ï¼æ建 èªå®ä¹ç[BaseLoadAdapter](https://github.com/MiChongGET/AhLive/blob/master/app/src/main/java/cn/buildworld/ahlive/adapter/BaseLoadAdapter.java)以å[LoadMoreScrollListener](https://github.com/MiChongGET/AhLive/blob/master/app/src/main/java/cn/buildworld/ahlive/listener/LoadMoreScrollListener.java)
public void addList(List addList) {
Log.i("MiChong", "addList: "+addList.size());
int count = this.list.size();
this.list.addAll(addList);
notifyItemRangeChanged(count, addList.size());
setLoading(false);
}
>8ãæç¬è§é¢æ¨¡åï¼å¼ç¨[å
涵段å](https://github.com/jokermonn/-Api/blob/master/Neihan.md)çapiæ¥å£ã
![](https://github.com/MiChongGET/AhLive/blob/master/app/pic/11.png)
主è¦ä½¿ç¨[Jiecaovideoplayer](https://github.com/lipangit/JieCaoVideoPlayer)æ¡æ¶ãä¿®æ¹äºæ¹æ³å®ç°è§é¢ä¸ä¸æ»å¨èªå¨æååèªå¨ææ¾ã详æ
请ç[代ç ](https://github.com/MiChongGET/AhLive/blob/master/app/src/main/java/cn/buildworld/ahlive/fragment/GaoxiaoVideo.java)
>9ã[个人ä¸å¿æ¨¡å](https://github.com/MiChongGET/AhLive/blob/master/app/src/main/java/cn/buildworld/ahlive/activity/PersonalActivity.java)ï¼å®ç°å¤´åæ´æ¢ï¼ä¿®æ¹ç¾åï¼çæ¥çã
![](https://github.com/MiChongGET/AhLive/blob/master/app/pic/12.png)
头åå¾çåªè£ä½¿ç¨çæ¯[uCrop](https://github.com/Yalantis/uCrop)å¼æºæ¡æ¶ã头åä¿®æ¹ä¿åå®ç°æ¯å©ç¨å¾çåªè£ååå¨æ¬å°ç¼åï¼éè¿è®°å½ç¼åè·¯å¾æ¾å°å¤´åï¼å®ç°å¤´åçæ´æ°åä¿åã
注æè®°å¾å¨AndroidManifestä¸å å
¥