Skip to content

Commit

Permalink
Fixed : #2 Custom color - instead of blue
Browse files Browse the repository at this point in the history
  • Loading branch information
amyu committed Aug 9, 2015
1 parent cb5717b commit 5802fad
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,10 @@ public void setShadowRadius(int radius) {
mWaveView.setShadowRadius(radius);
}

public void setWaveColor(int color){
mWaveView.setWaveColor(color);
}

private static int makeMeasureSpecExactly(int length) {
return MeasureSpec.makeMeasureSpec(length, MeasureSpec.EXACTLY);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -630,4 +630,9 @@ public boolean isDisappearCircleAnimatorRunning() {
public void setShadowRadius(int radius) {
mShadowPaint.setShadowLayer(radius, 0.0f, 2.0f, SHADOW_COLOR);
}

public void setWaveColor(int color) {
mPaint.setColor(color);
invalidate();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import java.util.ArrayList;
import jp.co.recruit_lifestyle.android.widget.WaveSwipeRefreshLayout;


public class MainActivity extends AppCompatActivity implements WaveSwipeRefreshLayout.OnRefreshListener {

private ListView mListview;
Expand All @@ -35,6 +34,7 @@ private void initView() {
mWaveSwipeRefreshLayout = (WaveSwipeRefreshLayout) findViewById(R.id.main_swipe);
mWaveSwipeRefreshLayout.setColorSchemeColors(Color.WHITE, Color.WHITE);
mWaveSwipeRefreshLayout.setOnRefreshListener(this);
mWaveSwipeRefreshLayout.setWaveColor(0x00000000);
//mWaveSwipeRefreshLayout.setMaxDropHeight(1500);

mListview = (ListView) findViewById(R.id.main_list);
Expand Down
4 changes: 2 additions & 2 deletions sample/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
>

<Toolbar
<android.support.v7.widget.Toolbar
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:minHeight="?attr/actionBarSize"
Expand Down

0 comments on commit 5802fad

Please sign in to comment.