Skip to content

Commit

Permalink
fix some issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ali.hn committed Jun 5, 2018
1 parent 4941a57 commit 0328ebc
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ android {
compileSdkVersion 27
defaultConfig {
applicationId "imageslider.smarteist.com.imgeslider"
minSdkVersion 17
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1.0"
Expand Down
20 changes: 15 additions & 5 deletions autoimageslider/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
apply plugin: 'com.android.library'

buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
}
}

ext {

//For bintray and jcenter distribution
Expand Down Expand Up @@ -32,10 +43,10 @@ android {
compileSdkVersion 27

defaultConfig {
minSdkVersion 17
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1.0"
versionCode 2
versionName "1.2"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Expand All @@ -52,15 +63,14 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:27.1.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.romandanylyk:pageindicatorview:1.0.0'
implementation 'com.github.bumptech.glide:glide:4.7.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
implementation 'com.romandanylyk:pageindicatorview:1.0.1'
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class SliderView {

private String description;
private int descriptionTextColor = Color.WHITE;
private float descriptionTextSize = 1;

@DrawableRes
private int imageRes = 0;
Expand Down Expand Up @@ -56,6 +57,11 @@ public SliderView setDescriptionTextColor (int descriptionTextColor) {
return this;
}

public SliderView setDescriptionTextSize (float descriptionTextSize) {
this.descriptionTextSize = descriptionTextSize;
return this;
}

public int getImageRes() {
return imageRes;
}
Expand Down Expand Up @@ -118,6 +124,9 @@ public View getView() {
ImageView autoSliderImage = v.findViewById(R.id.iv_auto_image_slider);
TextView tv_description = v.findViewById(R.id.tv_auto_image_slider);
tv_description.getBackground();
if (descriptionTextSize != 1) {
tv_description.setTextSize(descriptionTextSize);
}
tv_description.setTextColor(descriptionTextColor);
tv_description.setText(getDescription());
bindData(v, autoSliderImage);
Expand Down
1 change: 1 addition & 0 deletions autoimageslider/src/main/res/layout/slider_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
android:layout_height="25dp"
android:layout_gravity="bottom|center"
android:gravity="center" />

</FrameLayout>
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Wed Apr 18 21:45:35 IRDT 2018
#Tue Jun 05 21:06:03 IRDT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Expand Down

0 comments on commit 0328ebc

Please sign in to comment.