Skip to content
This repository has been archived by the owner on Apr 13, 2021. It is now read-only.

simplezhli/ZCarouselView

Repository files navigation

ZCarouselView

这是一个自定义布局的轮播图。

效果图:

Alt Text

使用方法:

1.代码中进行初始化

CarouselView carouselView=(CarouselView) findViewById(R.id.cv); // carouselView.setImageDrawable_one(R.drawable.aa); // carouselView.setImageDrawable_two(R.drawable.bb); // carouselView.setImageDrawable_three(R.drawable.cc); carouselView.setOnImageClickListener(new ImageOnClickListener() {

	@Override
		public void image_left_Click() {
			Toast.makeText(MainActivity.this, "点击了1", Toast.LENGTH_LONG).show();
			
		}

		@Override
		public void image_middle_Click() {
			Toast.makeText(MainActivity.this, "点击了2", Toast.LENGTH_LONG).show();
			
		}

		@Override
		public void image_right_Click() {
			Toast.makeText(MainActivity.this, "点击了3", Toast.LENGTH_LONG).show();
			
		}
	});
	
	
	
	
	
	2.布局中添加
	
	
	<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:cv="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<com.zl.carouselview.CarouselView
    android:id="@+id/cv"
    android:layout_width="fill_parent"
    android:layout_height="140dp"
    cv:image_left="@drawable/aa"
    cv:image_middle="@drawable/bb"
    cv:image_right="@drawable/cc" />

About

[停止维护]一种轮播图效果

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages