Skip to content

Commit d17600e

Browse files
committed
version 1.3.2 is now ready.
1 parent 6486e09 commit d17600e

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

app/src/main/res/layout/activity_main.xml

+9-6
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,19 @@
1818
android:layout_width="match_parent"
1919
android:layout_height="300dp"
2020
app:sliderAnimationDuration="600"
21+
app:sliderAutoCycleDirection="back_and_forth"
22+
app:sliderAutoCycleEnabled="true"
23+
app:sliderCircularHandlerEnabled="true"
2124
app:sliderIndicatorAnimationDuration="600"
22-
app:sliderScrollTimeInSec="1"
23-
app:sliderIndicatorMargin="15dp"
24-
app:sliderIndicatorPadding="2dp"
2525
app:sliderIndicatorGravity="center_horizontal|bottom"
26-
app:sliderAutoCycleDirection="back_and_forth"
26+
app:sliderIndicatorMargin="15dp"
2727
app:sliderIndicatorOrientation="horizontal"
28-
app:sliderStartAutoCycle="true"
28+
app:sliderIndicatorPadding="3dp"
29+
app:sliderIndicatorRadius="2dp"
30+
app:sliderIndicatorSelectedColor="#5A5A5A"
2931
app:sliderIndicatorUnselectedColor="#FFF"
30-
app:sliderIndicatorSelectedColor="#5A5A5A"/>
32+
app:sliderScrollTimeInSec="1"
33+
app:sliderStartAutoCycle="true" />
3134

3235
</androidx.cardview.widget.CardView>
3336

autoimageslider/src/main/java/com/smarteist/autoimageslider/SliderView.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,16 @@ public class SliderView extends FrameLayout {
5454
public static final int AUTO_CYCLE_DIRECTION_BACK_AND_FORTH = 2;
5555

5656
private final Handler mHandler = new Handler();
57+
private boolean mFlagBackAndForth;
5758
private boolean mIsAutoCycle;
59+
private int mAutoCycleDirection;
5860
private int mScrollTimeInSec;
5961
private CircularSliderHandle mCircularSliderHandle;
6062
private PageIndicatorView mPagerIndicator;
6163
private DataSetObserver mDataSetObserver;
6264
private PagerAdapter mPagerAdapter;
6365
private Runnable mSliderRunnable;
6466
private SliderPager mSliderPager;
65-
private int mAutoCycleDirection;
66-
private boolean mFlagBackAndForth;
67-
6867

6968
public SliderView(Context context) {
7069
super(context);
@@ -100,7 +99,7 @@ private void setUpAttributes(Context context, AttributeSet attrs) {
10099
int indicatorUnselectedColor = typedArray.getColor(R.styleable.SliderView_sliderIndicatorUnselectedColor, Color.parseColor(ColorAnimation.DEFAULT_UNSELECTED_COLOR));
101100
int indicatorSelectedColor = typedArray.getColor(R.styleable.SliderView_sliderIndicatorSelectedColor, Color.parseColor(ColorAnimation.DEFAULT_SELECTED_COLOR));
102101
int indicatorAnimationDuration = typedArray.getInt(R.styleable.SliderView_sliderIndicatorAnimationDuration, BaseAnimation.DEFAULT_ANIMATION_TIME);
103-
int indicatorRtlMode = typedArray.getInt(R.styleable.PageIndicatorView_piv_rtl_mode, RtlMode.Off.ordinal());
102+
int indicatorRtlMode = typedArray.getInt(R.styleable.SliderView_sliderIndicatorRtlMode, RtlMode.Off.ordinal());
104103
RtlMode rtlMode = getRtlMode(indicatorRtlMode);
105104
int sliderAnimationDuration = typedArray.getInt(R.styleable.SliderView_sliderAnimationDuration, SliderPager.DEFAULT_SCROLL_DURATION);
106105
int sliderScrollTimeInSec = typedArray.getInt(R.styleable.SliderView_sliderScrollTimeInSec, 2);

0 commit comments

Comments
 (0)