diff --git a/library/src/main/java/jp/co/recruit_lifestyle/android/widget/WaveSwipeRefreshLayout.java b/library/src/main/java/jp/co/recruit_lifestyle/android/widget/WaveSwipeRefreshLayout.java index 739db0c..84fdf60 100644 --- a/library/src/main/java/jp/co/recruit_lifestyle/android/widget/WaveSwipeRefreshLayout.java +++ b/library/src/main/java/jp/co/recruit_lifestyle/android/widget/WaveSwipeRefreshLayout.java @@ -180,6 +180,7 @@ private void createWaveView() { mTarget.measure( makeMeasureSpecExactly(getMeasuredWidth() - (getPaddingLeft() + getPaddingRight())), makeMeasureSpecExactly(getMeasuredHeight() - (getPaddingTop() + getPaddingBottom()))); + mWaveView.measure(widthMeasureSpec, heightMeasureSpec); mCircleView.measure(); } @@ -203,7 +204,7 @@ private void createWaveView() { mCircleView.layout((thisWidth - circleWidth) / 2, -circleHeight, (thisWidth + circleWidth) / 2, 0); - mWaveView.layout(left, top, right, bottom); + mWaveView.layout(getPaddingLeft(), getPaddingTop(), childRight, childBottom); } @Override public boolean onPreDraw() { diff --git a/library/src/main/java/jp/co/recruit_lifestyle/android/widget/WaveView.java b/library/src/main/java/jp/co/recruit_lifestyle/android/widget/WaveView.java index e13d50e..1e0cadd 100644 --- a/library/src/main/java/jp/co/recruit_lifestyle/android/widget/WaveView.java +++ b/library/src/main/java/jp/co/recruit_lifestyle/android/widget/WaveView.java @@ -20,7 +20,6 @@ import android.animation.ValueAnimator; import android.content.Context; import android.graphics.Canvas; -import android.graphics.Color; import android.graphics.Paint; import android.graphics.Path; import android.graphics.RectF; @@ -345,7 +344,7 @@ private void initView() { private void setUpPaint() { mPaint = new Paint(); - mPaint.setColor(Color.BLUE); + mPaint.setColor(0xff2196F3); mPaint.setAntiAlias(true); mPaint.setStyle(Paint.Style.FILL); diff --git a/sample/src/androidTest/java/jp/list/view/amyu/WaveSwipeRefreshLayout/ApplicationTest.java b/sample/src/androidTest/java/jp/list/view/amyu/WaveSwipeRefreshLayout/ApplicationTest.java deleted file mode 100644 index 733f38c..0000000 --- a/sample/src/androidTest/java/jp/list/view/amyu/WaveSwipeRefreshLayout/ApplicationTest.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.list.view.amyu.WaveSwipeRefreshLayout; - -import android.app.Application; -import android.test.ApplicationTestCase; - -/** - * Testing Fundamentals - */ -public class ApplicationTest extends ApplicationTestCase { - public ApplicationTest() { - super(Application.class); - } -} \ No newline at end of file diff --git a/sample/src/main/java/jp/co/recruit_lifestyle/sample/MainActivity.java b/sample/src/main/java/jp/co/recruit_lifestyle/sample/MainActivity.java index f323397..40336eb 100644 --- a/sample/src/main/java/jp/co/recruit_lifestyle/sample/MainActivity.java +++ b/sample/src/main/java/jp/co/recruit_lifestyle/sample/MainActivity.java @@ -6,6 +6,8 @@ import android.support.v7.app.AppCompatActivity; import android.view.Menu; import android.view.MenuItem; +import android.view.Window; +import android.view.WindowManager; import android.widget.ArrayAdapter; import android.widget.ListView; import java.util.ArrayList; @@ -20,9 +22,11 @@ public class MainActivity extends AppCompatActivity implements WaveSwipeRefreshL @Override protected void onCreate(Bundle savedInstanceState) { + requestWindowFeature(Window.FEATURE_NO_TITLE); + getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); + setContentView(R.layout.activity_main); initView(); setSampleData(); } @@ -39,7 +43,7 @@ private void initView() { private void setSampleData() { ArrayList sampleArrayStr = new ArrayList<>(); for (int i = 0; i < 60; i++) { - sampleArrayStr.add("sample" + i); + sampleArrayStr.add("" ); } ArrayAdapter adapter = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_list_item_1, sampleArrayStr); mListview.setAdapter(adapter); @@ -52,7 +56,7 @@ public void run() { // 更新が終了したらインジケータ非表示 mWaveSwipeRefreshLayout.setRefreshing(false); } - }, 5000); + }, 3000); } @Override diff --git a/sample/src/main/res/drawable/toolbar_dropshadow.xml b/sample/src/main/res/drawable/toolbar_dropshadow.xml new file mode 100644 index 0000000..10804dc --- /dev/null +++ b/sample/src/main/res/drawable/toolbar_dropshadow.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/sample/src/main/res/layout/activity_main.xml b/sample/src/main/res/layout/activity_main.xml index 4d5771c..bdfbc69 100644 --- a/sample/src/main/res/layout/activity_main.xml +++ b/sample/src/main/res/layout/activity_main.xml @@ -1,21 +1,56 @@ - + + + + + + + + + + android:id="@+id/main_swipe" + android:layout_below="@+id/toolbar" + > - + - + + + diff --git a/sample/src/main/res/values-v21/styles.xml b/sample/src/main/res/values-v21/styles.xml new file mode 100644 index 0000000..816e419 --- /dev/null +++ b/sample/src/main/res/values-v21/styles.xml @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file diff --git a/sample/src/main/res/values/colors.xml b/sample/src/main/res/values/colors.xml new file mode 100644 index 0000000..dbe9c41 --- /dev/null +++ b/sample/src/main/res/values/colors.xml @@ -0,0 +1,5 @@ + + + #2196F3 + #1976D2 + \ No newline at end of file diff --git a/sample/src/main/res/values/styles.xml b/sample/src/main/res/values/styles.xml index 1355d09..c1a06e5 100644 --- a/sample/src/main/res/values/styles.xml +++ b/sample/src/main/res/values/styles.xml @@ -1,8 +1,6 @@ - - diff --git a/sc/animation.gif b/sc/animation.gif index 655faef..7c1360c 100644 Binary files a/sc/animation.gif and b/sc/animation.gif differ diff --git a/sc/sc1.png b/sc/sc1.png index ec52971..d09900a 100644 Binary files a/sc/sc1.png and b/sc/sc1.png differ diff --git a/sc/sc2.png b/sc/sc2.png index 545483c..60fa88c 100644 Binary files a/sc/sc2.png and b/sc/sc2.png differ diff --git a/sc/sc3.png b/sc/sc3.png index 437f628..9cd49d4 100644 Binary files a/sc/sc3.png and b/sc/sc3.png differ