• Stars
    star
    5,629
  • Rank 7,260 (Top 0.2 %)
  • Language
    Java
  • License
    MIT License
  • Created over 10 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An amazing and convenient Android image slider.

Android Image Slider Build Status

![Gitter](https://badges.gitter.im/Join Chat.svg)

This is an amazing image slider for the Android platform. I decided to open source this because there is really not an attractive, convenient slider widget in Android.

You can easily load images from an internet URL, drawable, or file. And there are many kinds of amazing animations you can choose. :-D

Demo

Download Apk

Usage

Step 1

Gradle

dependencies {
    	compile "com.android.support:support-v4:+"
    	compile 'com.squareup.picasso:picasso:2.3.2'
    	compile 'com.nineoldandroids:library:2.4.0'
    	compile 'com.daimajia.slider:library:1.1.5@aar'
}

Maven

<dependency>
    <groupId>com.squareup.picasso</groupId>
    <artifactId>picasso</artifactId>
    <version>2.3.2</version>
</dependency>
<dependency>
    <groupId>com.nineoldandroids</groupId>
    <artifactId>library</artifactId>
    <version>2.4.0</version>
</dependency>
<dependency>
    <groupId>com.daimajia.slider</groupId>
    <artifactId>library</artifactId>
    <version>1.1.2</version>
    <type>apklib</type>
</dependency>

Eclipse

For Eclipse users, I provided a sample project which orgnized as Eclipse way. You can download it from here, and make some changes to fit your project.

Notice: It's the version of 1.0.9, it may not update any more. You can update manually by yourself.

Step 2

Add permissions (if necessary) to your AndroidManifest.xml

<!-- if you want to load images from the internet -->
<uses-permission android:name="android.permission.INTERNET" /> 

<!-- if you want to load images from a file OR from the internet -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

Note: If you want to load images from the internet, you need both the INTERNET and READ_EXTERNAL_STORAGE permissions to allow files from the internet to be cached into local storage.

If you want to load images from drawable, then no additional permissions are necessary.

Step 3

Add the Slider to your layout:

<com.daimajia.slider.library.SliderLayout
        android:id="@+id/slider"
        android:layout_width="match_parent"
        android:layout_height="200dp"
/>

There are some default indicators. If you want to use a provided indicator:

<com.daimajia.slider.library.Indicators.PagerIndicator
        android:id="@+id/custom_indicator"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="center"
        />

Code example

====

Advanced usage

Please visit Wiki

Thanks

##About me

I am a student in mainland China. I love Google, love Android, love everything that is interesting. If you get any problems when using this library or you have an internship opportunity, please feel free to email me. 😃

More Repositories

1

AndroidViewAnimations

Cute view animation collection.
Java
12,422
star
2

AndroidSwipeLayout

The Most Powerful Swipe Layout!
Java
12,373
star
3

NumberProgressBar

A beautiful, slim Android ProgressBar.
Java
6,066
star
4

AndroidViewHover

An elegant way to show your menu or messages.
Java
3,208
star
5

AnimationEasingFunctions

Android Animation Easing Functions. Let's make animation more real!
Java
2,469
star
6

AnimeTaste

Taste global original animation
Java
1,624
star
7

EverMemo

Fast Record,Organize,and Share. The android memo app you will deeply love. ❤
Java
798
star
8

bleed-baidu-white

榨干百度网盘的剩余价值
Python
466
star
9

revenge

联手对抗臭长广告
JavaScript
307
star
10

little-bear-dictionary

This will be the most powerful android dictionary!!!
Java
274
star
11

java-multithread-downloader

Java multithread download library
Java
267
star
12

huntscreens

Take screenshots of each new project on Producthunt, YC, and Indiehackers, explore with Ease.
TypeScript
142
star
13

social-auth-simulator

模拟登陆->授权->获取access_token,目前支持人人、新浪微博、腾讯微博
Python
109
star
14

Gank.IO

Gank.IO source code.
23
star
15

EverMemo-EverNote

Small modifications for EverMemo
Java
14
star
16

Learn-Algorithm

拖延症患者学习算法小分队
5
star
17

dictionary

Click read me md 's redirect to know more
5
star
18

daimajia

My Intro.
4
star
19

todo

HTML
4
star
20

railway-pgvector

Dockerfile
3
star
21

SAE_wordpress_blog

SAE上的wordpress博客
PHP
3
star
22

old-version-little-bear-dictionary

Java
2
star
23

StoryTimeline

JavaScript
2
star
24

tp

1
star
25

little-bear-dictionary-dependency

All the dependencies of https://github.com/xuanqinanhai/little-bear-dictionary
1
star