From bff9f02646ec1f081b46e8d3436e91d6af6410e9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E7=92=90?= <2021765485@qq.com>
Date: Thu, 22 Sep 2016 22:58:46 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DBug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.idea/gradle.xml | 8 +-
.idea/misc.xml | 2 +-
.../wanglu1209/bannerlibrary/Banner.java | 37 +-
.../bannerlibrary/BannerViewPager.java | 1 -
build.gradle | 2 +-
projectFilesBackup/.idea/workspace.xml | 3695 +++++++++++++++++
6 files changed, 3717 insertions(+), 28 deletions(-)
create mode 100644 projectFilesBackup/.idea/workspace.xml
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index a1299e5..ef5f819 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -13,13 +13,7 @@
-
+
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 8cdb7eb..13e6014 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -37,7 +37,7 @@
-
+
diff --git a/bannerlibrary/src/main/java/com/github/wanglu1209/bannerlibrary/Banner.java b/bannerlibrary/src/main/java/com/github/wanglu1209/bannerlibrary/Banner.java
index f37afb0..2399c46 100644
--- a/bannerlibrary/src/main/java/com/github/wanglu1209/bannerlibrary/Banner.java
+++ b/bannerlibrary/src/main/java/com/github/wanglu1209/bannerlibrary/Banner.java
@@ -90,24 +90,7 @@ private void init() {
*/
addView(mFrameLayout, params);
- /**
- * 添加到任务栈,当前所有任务完事之后添加已经选中的那个小圆点
- */
- post(new Runnable() {
- @Override
- public void run() {
- ImageView iv = new ImageView(mContext);
- iv.setImageDrawable(mContext.getResources().getDrawable(mDot[1]));
- FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
- /**
- * 设置选中小圆点的左边距
- */
- params.leftMargin = (int) mDotGroup.getChildAt(0).getX();
- params.gravity = Gravity.BOTTOM;
- mFrameLayout.addView(iv, params);
- mSelectedDot = mFrameLayout.getChildAt(1);
- }
- });
+
mPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
@@ -190,6 +173,24 @@ public Banner setTime(int time) {
public Banner setDot(int... dots) {
mDot[0] = dots[0];
mDot[1] = dots[1];
+ /**
+ * 添加到任务栈,当前所有任务完事之后添加已经选中的那个小圆点
+ */
+ post(new Runnable() {
+ @Override
+ public void run() {
+ ImageView iv = new ImageView(mContext);
+ iv.setImageDrawable(mContext.getResources().getDrawable(mDot[1]));
+ FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+ /**
+ * 设置选中小圆点的左边距
+ */
+ params.leftMargin = (int) mDotGroup.getChildAt(0).getX();
+ params.gravity = Gravity.BOTTOM;
+ mFrameLayout.addView(iv, params);
+ mSelectedDot = mFrameLayout.getChildAt(1);
+ }
+ });
return this;
}
diff --git a/bannerlibrary/src/main/java/com/github/wanglu1209/bannerlibrary/BannerViewPager.java b/bannerlibrary/src/main/java/com/github/wanglu1209/bannerlibrary/BannerViewPager.java
index e2ab9d8..cb5bcc2 100644
--- a/bannerlibrary/src/main/java/com/github/wanglu1209/bannerlibrary/BannerViewPager.java
+++ b/bannerlibrary/src/main/java/com/github/wanglu1209/bannerlibrary/BannerViewPager.java
@@ -37,7 +37,6 @@ public BannerViewPager(Context context, AttributeSet attrs) {
super(context, attrs);
}
-
public BannerViewPager startAutoPlay() {
mHandler.sendEmptyMessageDelayed(MSG_WHAT, SEND_TIME);
return this;
diff --git a/build.gradle b/build.gradle
index 77ce66e..a3330d4 100644
--- a/build.gradle
+++ b/build.gradle
@@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:2.1.3'
+ classpath 'com.android.tools.build:gradle:2.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
diff --git a/projectFilesBackup/.idea/workspace.xml b/projectFilesBackup/.idea/workspace.xml
new file mode 100644
index 0000000..1dc1e7a
--- /dev/null
+++ b/projectFilesBackup/.idea/workspace.xml
@@ -0,0 +1,3695 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+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