Andrews Pictures Carousel Figure

According to the leaders of his recent app startup page to put the product images (with carousel form), enabling users to view, do a simple demo, to achieve the basic picture carousel function, pro-test available.

csdn address: https: //download.csdn.net/download/qq_35702985/11545257

Almost all the code posted below:

MainActivity:
. String [] = getResources URLs () as getStringArray (R.array.url); 
List List = Arrays.asList (URLs);
Images new new = the ArrayList (List);

// rotate automatically set, the default is to true
banner.isAutoPlay ( to true);
// set the rotation time
banner.setDelayTime (1500);

banner.setImages (ImagesRF Royalty Free)
.setImageLoader (new new GlideImageLoader ())
.setOnBannerListener (the this)
.start ();
picture address is on your own server, the server there are 200 days expire.

activity_main.xml:
<com.youth.banner.Banner
android:layout_width="match_parent"
android:layout_height="600px"
android:background="@color/white"
android:id="@+id/banner">
</com.youth.banner.Banner>

需要导入的包:
implementation 'com.youth.banner: banner: 1.4.10' 
version of their own free to download



Guess you like

Origin www.cnblogs.com/dmrbell/p/11351117.html