Skip to content

Commit

Permalink
Remove SVG & Add glide_slider_indicator_color
Browse files Browse the repository at this point in the history
  • Loading branch information
firdausmaulan committed Aug 6, 2018
1 parent c32f06f commit fdf0f5f
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 181 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
.DS_Store
/build
/captures
.externalNativeBuild
.externalNativeBuild
.idea/
22 changes: 0 additions & 22 deletions .idea/compiler.xml

This file was deleted.

3 changes: 0 additions & 3 deletions .idea/copyright/profiles_settings.xml

This file was deleted.

3 changes: 0 additions & 3 deletions .idea/markdown-navigator/profiles_settings.xml

This file was deleted.

33 changes: 0 additions & 33 deletions .idea/misc.xml

This file was deleted.

12 changes: 4 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.support_version = '27.0.2'
ext.glide_version = '4.6.1'
ext.androidsvg_version = '1.2.1'
ext.support_version = '27.1.1'
ext.glide_version = '4.7.1'
repositories {
jcenter()
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
Expand All @@ -18,15 +17,12 @@ buildscript {

allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven {
url "https://jitpack.io"
}
maven {
url 'https://maven.google.com'
}
google()
}
}

Expand Down
8 changes: 3 additions & 5 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
group = 'com.github.firdausmaulan'

android {
compileSdkVersion 27
buildToolsVersion "$support_version"

defaultConfig {
minSdkVersion 14
targetSdkVersion 27
versionCode 14
versionName "1.3.1"
versionCode 15
versionName "1.3.2"
}
buildTypes {
release {
Expand All @@ -24,8 +22,8 @@ android {
}

dependencies {
//noinspection GradleCompatible
implementation "com.android.support:appcompat-v7:$support_version"
implementation "com.github.bumptech.glide:glide:$glide_version"
annotationProcessor "com.github.bumptech.glide:compiler:$glide_version"
implementation "com.caverock:androidsvg:$androidsvg_version"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.LayerDrawable;
import android.support.v4.content.ContextCompat;
import android.support.v4.view.PagerAdapter;
import android.util.AttributeSet;
import android.view.View;
Expand All @@ -18,6 +19,7 @@
import com.glide.slider.library.Tricks.ViewPagerEx;

import java.util.ArrayList;
import java.util.logging.Handler;

/**
* Pager Indicator.
Expand Down Expand Up @@ -67,9 +69,7 @@ public class PagerIndicator extends LinearLayout implements ViewPagerEx.OnPageCh
public enum IndicatorVisibility {
Visible,
Invisible;
}

;
};

private GradientDrawable mUnSelectedGradientDrawable;
private GradientDrawable mSelectedGradientDrawable;
Expand Down Expand Up @@ -102,7 +102,7 @@ public PagerIndicator(Context context, AttributeSet attrs) {

mContext = context;

final TypedArray attributes = context.obtainStyledAttributes(attrs, R.styleable.PagerIndicator, 0, 0);
TypedArray attributes = context.obtainStyledAttributes(attrs, R.styleable.PagerIndicator, 0, 0);

int visibility = attributes.getInt(R.styleable.PagerIndicator_visibility, IndicatorVisibility.Visible.ordinal());

Expand All @@ -127,8 +127,12 @@ public PagerIndicator(Context context, AttributeSet attrs) {
mUserSetUnSelectedIndicatorResId = attributes.getResourceId(R.styleable.PagerIndicator_unselected_drawable,
0);

int mDefaultSelectedColor = attributes.getColor(R.styleable.PagerIndicator_selected_color, Color.rgb(255, 255, 255));
int mDefaultUnSelectedColor = attributes.getColor(R.styleable.PagerIndicator_unselected_color, Color.argb(33, 255, 255, 255));
int resColor = ContextCompat.getColor(context, R.color.glide_slider_indicator_color);
int r = Color.red(resColor);
int g = Color.green(resColor);
int b = Color.blue(resColor);
int mDefaultSelectedColor = attributes.getColor(R.styleable.PagerIndicator_selected_color, Color.rgb(r, g, b));
int mDefaultUnSelectedColor = attributes.getColor(R.styleable.PagerIndicator_unselected_color, Color.argb(33, r, g, b));

float mDefaultSelectedWidth = attributes.getDimension(R.styleable.PagerIndicator_selected_width, (int) pxFromDp(6));
float mDefaultSelectedHeight = attributes.getDimensionPixelSize(R.styleable.PagerIndicator_selected_height, (int) pxFromDp(6));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,6 @@ public PagerIndicator.IndicatorVisibility getIndicatorVisibility() {
return mIndicator.getIndicatorVisibility();
}
return PagerIndicator.IndicatorVisibility.Invisible;

}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import android.support.v7.widget.AppCompatTextView;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.glide.slider.library.R;

Expand Down
36 changes: 0 additions & 36 deletions library/src/main/java/com/glide/slider/library/svg/SvgDecoder.java

This file was deleted.

This file was deleted.

34 changes: 0 additions & 34 deletions library/src/main/java/com/glide/slider/library/svg/SvgModule.java

This file was deleted.

4 changes: 4 additions & 0 deletions library/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="glide_slider_indicator_color">#FFFFFF</color>
</resources>

0 comments on commit fdf0f5f

Please sign in to comment.