diff --git a/demo/res/layout/activity_demo.xml b/demo/res/layout/activity_demo.xml index 852f1a6d..440245b9 100644 --- a/demo/res/layout/activity_demo.xml +++ b/demo/res/layout/activity_demo.xml @@ -12,7 +12,7 @@ android:gravity="bottom" sothree:umanoPanelHeight="68dp" sothree:umanoShadowHeight="4dp" - sothree:umanoParalaxOffset="100dp" + sothree:umanoParallaxOffset="100dp" sothree:umanoDragView="@+id/dragView" sothree:umanoOverlay="true" sothree:umanoScrollableView="@+id/list"> diff --git a/library/res/values/attrs.xml b/library/res/values/attrs.xml index dc30a3e5..411f0947 100644 --- a/library/res/values/attrs.xml +++ b/library/res/values/attrs.xml @@ -4,7 +4,7 @@ - + diff --git a/library/src/com/sothree/slidinguppanel/SlidingUpPanelLayout.java b/library/src/com/sothree/slidinguppanel/SlidingUpPanelLayout.java index 4d5a445a..9323ceb5 100644 --- a/library/src/com/sothree/slidinguppanel/SlidingUpPanelLayout.java +++ b/library/src/com/sothree/slidinguppanel/SlidingUpPanelLayout.java @@ -86,9 +86,9 @@ public class SlidingUpPanelLayout extends ViewGroup { private int mCoveredFadeColor = DEFAULT_FADE_COLOR; /** - * Default paralax length of the main view + * Default parallax length of the main view */ - private static final int DEFAULT_PARALAX_OFFSET = 0; + private static final int DEFAULT_PARALLAX_OFFSET = 0; /** * The paint used to dim the main layout when sliding @@ -111,7 +111,7 @@ public class SlidingUpPanelLayout extends ViewGroup { private int mShadowHeight = -1; /** - * Paralax offset + * Parallax offset */ private int mParallaxOffset = -1; @@ -320,7 +320,7 @@ public SlidingUpPanelLayout(Context context, AttributeSet attrs, int defStyle) { if (ta != null) { mPanelHeight = ta.getDimensionPixelSize(R.styleable.SlidingUpPanelLayout_umanoPanelHeight, -1); mShadowHeight = ta.getDimensionPixelSize(R.styleable.SlidingUpPanelLayout_umanoShadowHeight, -1); - mParallaxOffset = ta.getDimensionPixelSize(R.styleable.SlidingUpPanelLayout_umanoParalaxOffset, -1); + mParallaxOffset = ta.getDimensionPixelSize(R.styleable.SlidingUpPanelLayout_umanoParallaxOffset, -1); mMinFlingVelocity = ta.getInt(R.styleable.SlidingUpPanelLayout_umanoFlingVelocity, DEFAULT_MIN_FLING_VELOCITY); mCoveredFadeColor = ta.getColor(R.styleable.SlidingUpPanelLayout_umanoFadeColor, DEFAULT_FADE_COLOR); @@ -347,7 +347,7 @@ public SlidingUpPanelLayout(Context context, AttributeSet attrs, int defStyle) { mShadowHeight = (int) (DEFAULT_SHADOW_HEIGHT * density + 0.5f); } if (mParallaxOffset == -1) { - mParallaxOffset = (int) (DEFAULT_PARALAX_OFFSET * density); + mParallaxOffset = (int) (DEFAULT_PARALLAX_OFFSET * density); } // If the shadow height is zero, don't show the shadow if (mShadowHeight > 0) { @@ -476,9 +476,9 @@ public int getPanelHeight() { } /** - * @return The current paralax offset + * @return The current parallax offset */ - public int getCurrentParalaxOffset() { + public int getCurrentParallaxOffset() { // Clamp slide offset at zero for parallax computation; int offset = (int) (mParallaxOffset * Math.max(mSlideOffset, 0)); return mIsSlidingUp ? -offset : offset; @@ -489,7 +489,7 @@ public int getCurrentParalaxOffset() { * * @param val A height in pixels */ - public void setParalaxOffset(int val) { + public void setParallaxOffset(int val) { mParallaxOffset = val; if (!mFirstLayout) { requestLayout(); @@ -614,7 +614,7 @@ public boolean isOverlayed() { /** * Sets whether or not the main content is clipped to the top of the panel * - * @param overlayed + * @param clip */ public void setClipPanel(boolean clip) { mClipPanel = clip; @@ -1148,7 +1148,7 @@ public void setPanelState(PanelState state) { @SuppressLint("NewApi") private void applyParallaxForCurrentSlideOffset() { if (mParallaxOffset > 0) { - int mainViewOffset = getCurrentParalaxOffset(); + int mainViewOffset = getCurrentParallaxOffset(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { mMainView.setTranslationY(mainViewOffset); } else {