├── .gitignore ├── .idea ├── codeStyles │ └── Project.xml ├── gradle.xml ├── misc.xml ├── modules.xml └── runConfigurations.xml ├── README.md ├── Screenshot_2018-05-11-18-44-00.png ├── Screenshot_2018-05-11-18-44-06.png ├── Screenshot_2018-05-11-18-44-10.png ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── ahmed │ │ └── easysliderdemo │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── ahmed │ │ │ └── easysliderdemo │ │ │ └── MainActivity.java │ └── res │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable │ │ ├── ic_launcher_background.xml │ │ ├── slide2.jpg │ │ ├── slide3.jpg │ │ ├── slide4.jpg │ │ └── slide6.jpg │ │ ├── layout │ │ ├── activity_main.xml │ │ └── fragment_main.xml │ │ ├── menu │ │ └── menu_main.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── values-w820dp │ │ └── dimens.xml │ │ └── values │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── ahmed │ └── easysliderdemo │ └── ExampleUnitTest.java ├── build.gradle ├── easyslider ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── ahmed │ │ └── easyslider │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── ahmed │ │ │ └── easyslider │ │ │ ├── EasySlider.java │ │ │ ├── EasySliderListener.java │ │ │ ├── SliderAdapter.java │ │ │ ├── SliderFragment.java │ │ │ └── SliderItem.java │ └── res │ │ ├── anim │ │ ├── bottom_up.xml │ │ └── up_bottom.xml │ │ ├── drawable │ │ └── rounded.xml │ │ ├── layout │ │ ├── slider_content.xml │ │ └── slider_item_container.xml │ │ └── values │ │ └── strings.xml │ └── test │ └── java │ └── ahmed │ └── easyslider │ └── ExampleUnitTest.java ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 26 | 27 | 28 | 29 | 30 | 31 | 33 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Easy Slider 2 | 3 | Easy Slider is one of android libs that helping to create slider as fast as possible 4 | 5 | ## Getting Started 6 | 7 | These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. 8 | 9 | 10 | 11 | ### Installing 12 | 13 | A step by step series of examples that tell you have to get a development env running 14 | 15 | Say what the step will be 16 | 17 | ``` 18 | allprojects { 19 | repositories { 20 | maven { url 'https://jitpack.io' } 21 | } 22 | } 23 | ``` 24 | 25 | ``` 26 | dependencies { 27 | implementation 'com.github.ahmedshaban1:EasySlider:1.0.0' 28 | } 29 | ``` 30 | 31 | 32 | 33 | 34 | ### And coding style tests 35 | 36 | Explain what these tests test and why 37 | * xml code 38 | ``` 39 | 43 | ``` 44 | 45 | * java code 46 | ``` 47 | EasySlider easySlider = findViewById(R.id.slider); 48 | 49 | List sliderItems = new ArrayList<>(); 50 | sliderItems.add(new SliderItem("title1",R.drawable.slide2)); 51 | sliderItems.add(new SliderItem("title2",R.drawable.slide3)); 52 | sliderItems.add(new SliderItem("title3",R.drawable.slide4)); 53 | sliderItems.add(new SliderItem("title4",R.drawable.slide6)); 54 | easySlider.setPages(sliderItems); 55 | ``` 56 | 57 | * you can add image url instead of image id 58 | 59 | 60 | * Screenshots 61 | 62 | ![alt text](https://github.com/ahmedshaban1/EasySlider/blob/master/Screenshot_2018-05-11-18-44-00.png) 63 | ![alt text](https://github.com/ahmedshaban1/EasySlider/blob/master/Screenshot_2018-05-11-18-44-06.png) 64 | ![alt text](https://github.com/ahmedshaban1/EasySlider/blob/master/Screenshot_2018-05-11-18-44-10.png) 65 | 66 | 67 | ## Built With 68 | 69 | * [picasso](http://square.github.io/picasso/)- Loading images framework 70 | 71 | 72 | ## Authors 73 | 74 | * **Ahmed Shaban** 75 | 76 | -------------------------------------------------------------------------------- /Screenshot_2018-05-11-18-44-00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedshaban1/EasySlider/4a85f0766cf9c0dd7b55d7ea2e486c467872a744/Screenshot_2018-05-11-18-44-00.png -------------------------------------------------------------------------------- /Screenshot_2018-05-11-18-44-06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedshaban1/EasySlider/4a85f0766cf9c0dd7b55d7ea2e486c467872a744/Screenshot_2018-05-11-18-44-06.png -------------------------------------------------------------------------------- /Screenshot_2018-05-11-18-44-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedshaban1/EasySlider/4a85f0766cf9c0dd7b55d7ea2e486c467872a744/Screenshot_2018-05-11-18-44-10.png -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 26 5 | defaultConfig { 6 | applicationId "ahmed.easysliderdemo" 7 | minSdkVersion 21 8 | targetSdkVersion 26 9 | versionCode 1 10 | versionName "1.0" 11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | implementation fileTree(dir: 'libs', include: ['*.jar']) 23 | implementation 'com.android.support:appcompat-v7:26.1.0' 24 | implementation 'com.android.support:design:26.1.0' 25 | implementation 'com.android.support.constraint:constraint-layout:1.1.0' 26 | compile project(':easyslider') 27 | } 28 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /app/src/androidTest/java/ahmed/easysliderdemo/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package ahmed.easysliderdemo; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("ahmed.easysliderdemo", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/java/ahmed/easysliderdemo/MainActivity.java: -------------------------------------------------------------------------------- 1 | package ahmed.easysliderdemo; 2 | 3 | import android.support.design.widget.FloatingActionButton; 4 | import android.support.design.widget.Snackbar; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.support.v7.widget.Toolbar; 7 | 8 | import android.support.v4.app.Fragment; 9 | import android.support.v4.app.FragmentManager; 10 | import android.support.v4.app.FragmentPagerAdapter; 11 | import android.support.v4.view.ViewPager; 12 | import android.os.Bundle; 13 | import android.view.LayoutInflater; 14 | import android.view.Menu; 15 | import android.view.MenuItem; 16 | import android.view.View; 17 | import android.view.ViewGroup; 18 | 19 | import android.widget.TextView; 20 | import android.widget.Toast; 21 | 22 | import java.util.ArrayList; 23 | import java.util.List; 24 | 25 | import ahmed.easyslider.EasySlider; 26 | import ahmed.easyslider.EasySliderListener; 27 | import ahmed.easyslider.SliderItem; 28 | 29 | public class MainActivity extends AppCompatActivity { 30 | 31 | 32 | private EasySlider easySlider; 33 | 34 | @Override 35 | protected void onCreate(Bundle savedInstanceState) { 36 | super.onCreate(savedInstanceState); 37 | setContentView(R.layout.activity_main); 38 | 39 | easySlider = findViewById(R.id.slider); 40 | easySlider.setOnItemClickListener(new EasySliderListener() { 41 | @Override 42 | public void onItemClick(int position) { 43 | Toast.makeText(MainActivity.this, "this is position"+position, Toast.LENGTH_SHORT).show(); 44 | } 45 | }); 46 | List sliderItems = new ArrayList<>(); 47 | sliderItems.add(new SliderItem("title1",R.drawable.slide2)); 48 | sliderItems.add(new SliderItem("title2",R.drawable.slide3)); 49 | sliderItems.add(new SliderItem("title3",R.drawable.slide4)); 50 | sliderItems.add(new SliderItem("title4",R.drawable.slide6)); 51 | easySlider.setPages(sliderItems); 52 | 53 | 54 | 55 | 56 | 57 | } 58 | 59 | 60 | 61 | } 62 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 13 | 19 | 22 | 25 | 26 | 27 | 28 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50 | 55 | 60 | 65 | 70 | 75 | 80 | 85 | 90 | 95 | 100 | 105 | 110 | 115 | 120 | 125 | 130 | 135 | 140 | 145 | 150 | 155 | 160 | 165 | 170 | 171 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/slide2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedshaban1/EasySlider/4a85f0766cf9c0dd7b55d7ea2e486c467872a744/app/src/main/res/drawable/slide2.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/slide3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedshaban1/EasySlider/4a85f0766cf9c0dd7b55d7ea2e486c467872a744/app/src/main/res/drawable/slide3.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/slide4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedshaban1/EasySlider/4a85f0766cf9c0dd7b55d7ea2e486c467872a744/app/src/main/res/drawable/slide4.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/slide6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedshaban1/EasySlider/4a85f0766cf9c0dd7b55d7ea2e486c467872a744/app/src/main/res/drawable/slide6.jpg -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_main.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedshaban1/EasySlider/4a85f0766cf9c0dd7b55d7ea2e486c467872a744/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedshaban1/EasySlider/4a85f0766cf9c0dd7b55d7ea2e486c467872a744/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedshaban1/EasySlider/4a85f0766cf9c0dd7b55d7ea2e486c467872a744/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedshaban1/EasySlider/4a85f0766cf9c0dd7b55d7ea2e486c467872a744/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedshaban1/EasySlider/4a85f0766cf9c0dd7b55d7ea2e486c467872a744/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedshaban1/EasySlider/4a85f0766cf9c0dd7b55d7ea2e486c467872a744/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedshaban1/EasySlider/4a85f0766cf9c0dd7b55d7ea2e486c467872a744/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedshaban1/EasySlider/4a85f0766cf9c0dd7b55d7ea2e486c467872a744/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedshaban1/EasySlider/4a85f0766cf9c0dd7b55d7ea2e486c467872a744/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmedshaban1/EasySlider/4a85f0766cf9c0dd7b55d7ea2e486c467872a744/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 16dp 6 | 8dp 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | EasySliderDemo 3 | Settings 4 | Hello World from section: %1$d 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 15 | 16 |