Skip to content

Commit

Permalink
Code format
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinea committed Mar 14, 2015
1 parent 7c4ddb1 commit 5c170dc
Showing 1 changed file with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package cn.trinea.android.view.autoscrollviewpager;

import java.lang.ref.WeakReference;
import java.lang.reflect.Field;

import android.content.Context;
import android.os.Handler;
import android.os.Message;
Expand All @@ -10,9 +13,6 @@
import android.view.MotionEvent;
import android.view.animation.Interpolator;

import java.lang.ref.WeakReference;
import java.lang.reflect.Field;

/**
* Auto Scroll View Pager
* <ul>
Expand All @@ -29,7 +29,7 @@
* <li>{@link #setSlideBorderMode(int)} set how to process when sliding at the last or first item</li>
* <li>{@link #setStopScrollWhenTouch(boolean)} set whether stop auto scroll when touching, default is true</li>
* </ul>
*
*
* @author <a href="http://www.trinea.cn" target="_blank">Trinea</a> 2013-12-30
*/
public class AutoScrollViewPager extends ViewPager {
Expand Down Expand Up @@ -81,7 +81,7 @@ public AutoScrollViewPager(Context paramContext, AttributeSet paramAttributeSet)
init();
}

private void init() {
private void init() {
handler = new MyHandler(this);
setViewPagerScroller();
}
Expand All @@ -91,12 +91,12 @@ private void init() {
*/
public void startAutoScroll() {
isAutoScroll = true;
sendScrollMessage((long) (interval + scroller.getDuration()/ autoScrollFactor * swipeScrollFactor));
sendScrollMessage((long)(interval + scroller.getDuration() / autoScrollFactor * swipeScrollFactor));
}

/**
* start auto scroll
*
*
* @param delayTimeInMills first scroll delay time
*/
public void startAutoScroll(int delayTimeInMills) {
Expand Down Expand Up @@ -254,7 +254,7 @@ public void handleMessage(Message msg) {

/**
* get auto scroll time in milliseconds, default is {@link #DEFAULT_INTERVAL}
*
*
* @return the interval
*/
public long getInterval() {
Expand All @@ -263,7 +263,7 @@ public long getInterval() {

/**
* set auto scroll time in milliseconds, default is {@link #DEFAULT_INTERVAL}
*
*
* @param interval the interval to set
*/
public void setInterval(long interval) {
Expand All @@ -272,7 +272,7 @@ public void setInterval(long interval) {

/**
* get auto scroll direction
*
*
* @return {@link #LEFT} or {@link #RIGHT}, default is {@link #RIGHT}
*/
public int getDirection() {
Expand All @@ -281,7 +281,7 @@ public int getDirection() {

/**
* set auto scroll direction
*
*
* @param direction {@link #LEFT} or {@link #RIGHT}, default is {@link #RIGHT}
*/
public void setDirection(int direction) {
Expand All @@ -290,7 +290,7 @@ public void setDirection(int direction) {

/**
* whether automatic cycle when auto scroll reaching the last or first item, default is true
*
*
* @return the isCycle
*/
public boolean isCycle() {
Expand All @@ -299,7 +299,7 @@ public boolean isCycle() {

/**
* set whether automatic cycle when auto scroll reaching the last or first item, default is true
*
*
* @param isCycle the isCycle to set
*/
public void setCycle(boolean isCycle) {
Expand All @@ -308,7 +308,7 @@ public void setCycle(boolean isCycle) {

/**
* whether stop auto scroll when touching, default is true
*
*
* @return the stopScrollWhenTouch
*/
public boolean isStopScrollWhenTouch() {
Expand All @@ -317,7 +317,7 @@ public boolean isStopScrollWhenTouch() {

/**
* set whether stop auto scroll when touching, default is true
*
*
* @param stopScrollWhenTouch
*/
public void setStopScrollWhenTouch(boolean stopScrollWhenTouch) {
Expand All @@ -326,7 +326,7 @@ public void setStopScrollWhenTouch(boolean stopScrollWhenTouch) {

/**
* get how to process when sliding at the last or first item
*
*
* @return the slideBorderMode {@link #SLIDE_BORDER_MODE_NONE}, {@link #SLIDE_BORDER_MODE_TO_PARENT},
* {@link #SLIDE_BORDER_MODE_CYCLE}, default is {@link #SLIDE_BORDER_MODE_NONE}
*/
Expand All @@ -336,7 +336,7 @@ public int getSlideBorderMode() {

/**
* set how to process when sliding at the last or first item
*
*
* @param slideBorderMode {@link #SLIDE_BORDER_MODE_NONE}, {@link #SLIDE_BORDER_MODE_TO_PARENT},
* {@link #SLIDE_BORDER_MODE_CYCLE}, default is {@link #SLIDE_BORDER_MODE_NONE}
*/
Expand All @@ -346,7 +346,7 @@ public void setSlideBorderMode(int slideBorderMode) {

/**
* whether animating when auto scroll at the last or first item, default is true
*
*
* @return
*/
public boolean isBorderAnimation() {
Expand All @@ -355,7 +355,7 @@ public boolean isBorderAnimation() {

/**
* set whether animating when auto scroll at the last or first item, default is true
*
*
* @param isBorderAnimation
*/
public void setBorderAnimation(boolean isBorderAnimation) {
Expand Down

0 comments on commit 5c170dc

Please sign in to comment.