Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update api 21 and update version lib #75

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified LICENSE
100644 → 100755
Empty file.
7 changes: 3 additions & 4 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ You can easily load images from an internet URL, drawable, or file. And there ar

```groovy
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.2@aar'
compile 'com.squareup.picasso:picasso:2.4.0'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:1.1.2@aar'
}
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.+'
classpath 'com.android.tools.build:gradle:1.0.0'
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.10.+'
}
}
Expand Down
Empty file modified demo/.gitignore
100644 → 100755
Empty file.
17 changes: 7 additions & 10 deletions demo/build.gradle
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
apply plugin: 'android-sdk-manager'
apply plugin: 'android'
apply plugin: 'com.android.application'


android {
compileSdkVersion 20
buildToolsVersion "20"
compileSdkVersion 21
buildToolsVersion "21.1.2"

defaultConfig {
minSdkVersion 8
targetSdkVersion 20
targetSdkVersion 21
versionCode 2
versionName "1.0.1"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':library')
compile 'com.android.support:appcompat-v7:20.+'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.androidanimations:library:1.0.3@aar'
compile 'com.android.support:appcompat-v7:21.0.3'
}
Empty file modified demo/proguard-rules.txt
100644 → 100755
Empty file.
Empty file modified demo/src/main/AndroidManifest.xml
100644 → 100755
Empty file.
Empty file modified demo/src/main/assets/nemo.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified demo/src/main/assets/toystory.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified demo/src/main/assets/up.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified demo/src/main/assets/wall.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
9 changes: 5 additions & 4 deletions demo/src/main/java/com/daimajia/slider/demo/MainActivity.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_main);
mDemoSlider = (SliderLayout)findViewById(R.id.slider);

HashMap<String,String> url_maps = new HashMap<String, String>();
HashMap<String,String> url_maps = new HashMap<>();
url_maps.put("Hannibal", "http://static2.hypable.com/wp-content/uploads/2013/12/hannibal-season-2-release-date.jpg");
url_maps.put("Big Bang Theory", "http://tvfiles.alphacoders.com/100/hdclearart-10.png");
url_maps.put("House of Cards", "http://cdn3.nflximg.net/images/3093/2043093.jpg");
url_maps.put("Game of Thrones", "http://images.boomsbeat.com/data/images/full/19640/game-of-thrones-season-4-jpg.jpg");

HashMap<String,Integer> file_maps = new HashMap<String, Integer>();
HashMap<String,Integer> file_maps = new HashMap<>();
file_maps.put("Hannibal",R.drawable.hannibal);
file_maps.put("Big Bang Theory",R.drawable.bigbang);
file_maps.put("House of Cards",R.drawable.house);
Expand All @@ -59,10 +59,12 @@ protected void onCreate(Bundle savedInstanceState) {

mDemoSlider.addSlider(textSliderView);
}

mDemoSlider.setPresetTransformer(SliderLayout.Transformer.Accordion);
mDemoSlider.setPresetIndicator(SliderLayout.PresetIndicators.Center_Bottom);
mDemoSlider.setCustomAnimation(new DescriptionAnimation());
mDemoSlider.setDuration(4000);

ListView l = (ListView)findViewById(R.id.transformers);
l.setAdapter(new TransformerAdapter(this));
l.setOnItemClickListener(new AdapterView.OnItemClickListener() {
Expand All @@ -72,8 +74,6 @@ public void onItemClick(AdapterView<?> parent, View view, int position, long id)
Toast.makeText(MainActivity.this, ((TextView) view).getText().toString(), Toast.LENGTH_SHORT).show();
}
});


}

@Override
Expand Down Expand Up @@ -106,6 +106,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
startActivity(browserIntent);
break;
}

return super.onOptionsItemSelected(item);
}
}
2 changes: 1 addition & 1 deletion demo/src/main/java/com/daimajia/slider/demo/TransformerAdapter.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public long getItemId(int position) {

@Override
public View getView(int position, View convertView, ViewGroup parent) {
TextView t = (TextView)LayoutInflater.from(mContext).inflate(R.layout.item,null);
TextView t = (TextView)LayoutInflater.from(mContext).inflate(R.layout.item, parent, false);
t.setText(getItem(position).toString());
return t;
}
Expand Down
Empty file modified demo/src/main/res/drawable-hdpi/bigbang.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified demo/src/main/res/drawable-hdpi/bird.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified demo/src/main/res/drawable-hdpi/d1.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified demo/src/main/res/drawable-hdpi/game_of_thrones.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified demo/src/main/res/drawable-hdpi/hannibal.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified demo/src/main/res/drawable-hdpi/house.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified demo/src/main/res/drawable-hdpi/ic_launcher.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified demo/src/main/res/drawable-mdpi/ic_launcher.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified demo/src/main/res/drawable-xhdpi/ic_launcher.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified demo/src/main/res/drawable-xxhdpi/ic_launcher.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified demo/src/main/res/layout/activity_main.xml
100644 → 100755
Empty file.
Empty file modified demo/src/main/res/layout/item.xml
100644 → 100755
Empty file.
Empty file modified demo/src/main/res/menu/main.xml
100644 → 100755
Empty file.
Empty file modified demo/src/main/res/values-w820dp/dimens.xml
100644 → 100755
Empty file.
Empty file modified demo/src/main/res/values/dimens.xml
100644 → 100755
Empty file.
Empty file modified demo/src/main/res/values/strings.xml
100644 → 100755
Empty file.
Empty file modified demo/src/main/res/values/styles.xml
100644 → 100755
Empty file.
Empty file modified gradle.properties
100644 → 100755
Empty file.
Empty file modified gradle/wrapper/gradle-wrapper.jar
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Jun 09 09:36:23 CST 2014
#Fri Jan 16 01:35:16 BRT 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
Empty file modified gradlew.bat
100644 → 100755
Empty file.
Empty file modified library/.gitignore
100644 → 100755
Empty file.
24 changes: 10 additions & 14 deletions library/build.gradle
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,31 +1,27 @@
apply plugin: 'android-library'
apply plugin: 'com.android.library'

android {
compileSdkVersion 20
buildToolsVersion "20"
compileSdkVersion 21
buildToolsVersion "21.1.2"

defaultConfig {
minSdkVersion 8
targetSdkVersion 20
targetSdkVersion 21
versionCode 10
versionName "1.0.9"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}

lintOptions {
abortOnError false
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:20.+'
compile "com.android.support:support-v4:20.0.+"
compile 'com.squareup.picasso:picasso:+'
compile 'com.nineoldandroids:library:+'
compile 'com.android.support:appcompat-v7:21.0.3'
compile "com.android.support:support-v4:21.0.3"
compile 'com.squareup.picasso:picasso:2.4.0'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.androidanimations:library:1.0.3@aar'
}
apply from: './gradle-mvn-push.gradle'
Empty file modified library/gradle-mvn-push.gradle
100644 → 100755
Empty file.
Empty file modified library/gradle.properties
100644 → 100755
Empty file.
Empty file modified library/proguard-rules.txt
100644 → 100755
Empty file.
Empty file modified library/src/main/AndroidManifest.xml
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
4 changes: 2 additions & 2 deletions library/src/main/java/com/daimajia/slider/library/SliderAdapter.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class SliderAdapter extends PagerAdapter implements BaseSliderView.ImageL

public SliderAdapter(Context context){
mContext = context;
mImageContents = new ArrayList<BaseSliderView>();
mImageContents = new ArrayList<>();
}

public <T extends BaseSliderView> void addSlider(T slider){
Expand Down Expand Up @@ -95,7 +95,7 @@ public void onStart(BaseSliderView target) {
*/
@Override
public void onEnd(boolean result, BaseSliderView target) {
if(target.isErrorDisappear() == false || result == true){
if(!target.isErrorDisappear() || result){
return;
}
for (BaseSliderView slider: mImageContents){
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified library/src/main/res/drawable/indicator_corner_bg.xml
100644 → 100755
Empty file.
Empty file modified library/src/main/res/layout/indicator_layout.xml
100644 → 100755
Empty file.
Empty file modified library/src/main/res/layout/render_type_default.xml
100644 → 100755
Empty file.
Empty file modified library/src/main/res/layout/render_type_text.xml
100644 → 100755
Empty file.
Empty file modified library/src/main/res/layout/slider_layout.xml
100644 → 100755
Empty file.
Empty file modified library/src/main/res/values/attrs.xml
100644 → 100755
Empty file.
Empty file modified library/src/main/res/values/strings.xml
100644 → 100755
Empty file.
Empty file modified library/src/main/res/values/styles.xml
100644 → 100755
Empty file.
Empty file modified settings.gradle
100644 → 100755
Empty file.