小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

國(guó)外源碼精品

 aaawoyucheng 2015-07-17

轉(zhuǎn)載地址:http://my.oschina.net/cuitongliang/blog/170708 (一)&&http://my.oschina.net/cuitongliang/blog/170737 (二)

PLEASE NOTE, THIS PROJECT IS NO LONGER BEING MAINTAINED

一、介紹

Pull To Refresh Views for Android

This project aims to provide a reusable Pull to Refresh widget for Android. It was originally based on Johan Nilsson's library (mainly for graphics, strings and animations), but these have been replaced since.

Features

  • Supports both Pulling Down from the top, and Pulling Up from the bottom (or even both).
  • Animated Scrolling for all devices.
  • Over Scroll supports for devices on Android v2.3+.
  • Currently works with:
    • ListView
    • ExpandableListView
    • GridView
    • WebView
    • ScrollView
    • HorizontalScrollView
    • ViewPager
  • Integrated End of List Listener for use of detecting when the user has scrolled to the bottom.
  • Maven Support.
  • Indicators to show the user when a Pull-to-Refresh is available.
  • Support for ListFragment!
  • Lots of Customisation options!

Repository at https://github.com/chrisbanes/Android-PullToRefresh.

附源碼截圖:

ListView                                                                              ExpandableListView

                        

GridView                                                                                 WebView

                      

ScrollView                                                                        Horizontal ScrollView

                                      

ViewPager                                                                   ListView Fragment

                                    

WebView Advanced                                      ListView in ViewPager

                                   

 二、DEMO導(dǎo)入

 

很多人看到有好源碼,但是在使用時(shí)碰到了問(wèn)題。在此簡(jiǎn)單介紹一下,希望能夠?qū)δ切┎粫?huì)的童鞋們有所幫助。

       首先下載源碼,源碼地址:https://github.com/chrisbanes/Android-PullToRefresh。
下載完源碼之后,解壓。在Android-PullToRefresh-master文件夾下,我們會(huì)看到還有三個(gè)文件夾:extras,
library,sample。其中sample就是作者為我們提供的Demo,library是我們?cè)谑褂肧ample必須用到的jar。extras中是使用ListFragment和ViewPage用到的jar。講解完目錄后現(xiàn)在開(kāi)始導(dǎo)入了。

       1. 導(dǎo)入library:導(dǎo)入很簡(jiǎn)單,如圖,點(diǎn)擊finish即可。

導(dǎo)入之后沒(méi)有問(wèn)題。OK! 

     2. 同樣導(dǎo)入extras中的PullToRefreshListFragment和PullToRefreshViewPager工程。切記:分別導(dǎo)入。
        如圖:

導(dǎo)入之后,你會(huì)發(fā)現(xiàn)工程報(bào)錯(cuò)了,很簡(jiǎn)單,沒(méi)有關(guān)聯(lián)libraray。右鍵工程--選擇Properties,打開(kāi)之后會(huì)發(fā)現(xiàn)有個(gè)紅色的X,這就是報(bào)錯(cuò)的原因。改了就可以。

選中紅色的報(bào)錯(cuò)的library,點(diǎn)擊Remove,再點(diǎn)擊Add,將Libarary添加上即可!如圖:

 

 同理將PullToRefreshViewPager工程的library也修改好。

 

3. 導(dǎo)入Sample工程,同時(shí)修改library。如圖:

 

至此,工程全部導(dǎo)入,錯(cuò)誤全部解決。          

運(yùn)行一下,看是否能夠正常運(yùn)行到手機(jī)上。接下來(lái)就可以慢慢研究著精品源碼吧!

感謝原作者詳細(xì)的講解,解決了我的問(wèn)題!

三、DEMO導(dǎo)入出現(xiàn)問(wèn)題及解決

一、運(yùn)行報(bào)錯(cuò):Unable to execute dex: Multiple dex files define Lcom/my/cop/miles/R$anim

導(dǎo)致原因:

1、在ADT編譯器和SDK的工具有差異或是版本不一致時(shí)常會(huì)出現(xiàn)

2、引用的兩個(gè)子項(xiàng)目有相同的包名也會(huì)導(dǎo)致這個(gè)問(wèn)題(引用多余的jar包,包出現(xiàn)沖突)

解決方案:

  Eclipse ——> Project ——> 去掉自動(dòng)構(gòu)建(Build Automatically)——> 選擇project中的clear ——> 選擇project中的Build Project ——>啟動(dòng)自動(dòng)構(gòu)建(Build Automatically)


    本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購(gòu)買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶 評(píng)論公約

    類似文章 更多