GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 完成compile 'com.scwang.smartrefresh:SmartRefreshLayout:1.0.0-alpha-1' · StandOpen/SmartRefreshLayout@7f437c2

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • refresh-header/src/main/java/com/scwang/smartrefresh/header
    • CircleHeader.java
    • CircleRefreshHeader.java
    • FlyRefreshHeader.java
    • FunGameBattleCityHeader.java
    • FunGameHitBlockHeader.java
    • MaterialHeader.java
    • PhoenixHeader.java
    • StoreHouseHeader.java
    • TaurusHeader.java
    • WaterDropHeader.java
    • fungame
      • FunGameBase.java
  • refresh-layout/src/main/java/com/scwang/smartrefresh/layout
    • api
      • RefreshContent.java
      • RefreshLayoutHookFooter.java
      • RefreshLayoutHookHeader.java
    • impl
      • RefreshContentWrapper.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎refresh-header/src/main/java/com/scwang/smartrefresh/header/CircleHeader.java‎

Copy file name to clipboardExpand all lines: refresh-header/src/main/java/com/scwang/smartrefresh/header/CircleHeader.java
+4-6Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,12 +239,13 @@ private void drawFinish(Canvas canvas, int viewWidth) {
239239

240240
//</editor-fold>
241241

242-
//<editor-fold desc="SizeObserver">
242+
//<editor-fold desc="RefreshHeader">
243+
243244
@Override
244245
public void onSizeDefined(RefreshKernel kernel, int height, int extendHeight) {
245246
kernel.registHeaderHook(new RefreshLayoutHeaderHooker() {
246247
@Override
247-
public void onHookFinishRefresh(SuperMethod method, RefreshLayout layout) {
248+
public void onHookFinishRefresh(SuperMethod supper, RefreshLayout layout) {
248249
mShowOuter = false;
249250
mShowBoll = false;
250251
ValueAnimator animator = ValueAnimator.ofFloat(0, 1);
@@ -257,16 +258,13 @@ public void onHookFinishRefresh(SuperMethod method, RefreshLayout layout) {
257258
animator.addListener(new AnimatorListenerAdapter() {
258259
@Override
259260
public void onAnimationEnd(Animator animation) {
260-
method.invoke(0);
261+
supper.invoke(0);
261262
}
262263
});
263264
animator.start();
264265
}
265266
});
266267
}
267-
//</editor-fold>
268-
269-
//<editor-fold desc="RefreshHeader">
270268

271269
@Override
272270
public void onPullingDown(float percent, int offset, int headHeight, int extendHeight) {
Collapse file

‎refresh-header/src/main/java/com/scwang/smartrefresh/header/CircleRefreshHeader.java‎

Copy file name to clipboardExpand all lines: refresh-header/src/main/java/com/scwang/smartrefresh/header/CircleRefreshHeader.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,9 +520,9 @@ public void onSizeDefined(RefreshKernel kernel, int height, int extendHeight) {
520520
PULL_DELTA = height / 2;
521521
kernel.registHeaderHook(new RefreshLayoutHeaderHooker() {
522522
@Override
523-
public void onHookFinishRefresh(SuperMethod method, RefreshLayout layout) {
523+
public void onHookFinishRefresh(SuperMethod supper, RefreshLayout layout) {
524524
setRefreshing(false);
525-
setOnViewAniDone(method::invoke);
525+
setOnViewAniDone(supper::invoke);
526526
}
527527
});
528528
}
Collapse file

‎refresh-header/src/main/java/com/scwang/smartrefresh/header/FlyRefreshHeader.java‎

Copy file name to clipboardExpand all lines: refresh-header/src/main/java/com/scwang/smartrefresh/header/FlyRefreshHeader.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,11 @@ public void onSizeDefined(RefreshKernel kernel, int height, int extendHeight) {
158158
mRefreshLayout = kernel.getRefreshLayout();
159159
mRefreshKernel.registHeaderHook(new RefreshLayoutHeaderHooker() {
160160
@Override
161-
public void onHookFinishRefresh(SuperMethod method, RefreshLayout layout) {
161+
public void onHookFinishRefresh(SuperMethod supper, RefreshLayout layout) {
162162
if (mIsRefreshing) {
163163
finishRefresh(null);
164164
} else {
165-
method.invoke();
165+
supper.invoke();
166166
}
167167
}
168168
});
Collapse file

‎refresh-header/src/main/java/com/scwang/smartrefresh/header/FunGameBattleCityHeader.java‎

Copy file name to clipboardExpand all lines: refresh-header/src/main/java/com/scwang/smartrefresh/header/FunGameBattleCityHeader.java
-7Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import android.util.SparseArray;
99

1010
import com.scwang.smartrefresh.header.fungame.FunGameView;
11-
import com.scwang.smartrefresh.layout.api.RefreshKernel;
1211

1312
import java.util.LinkedList;
1413
import java.util.Queue;
@@ -391,10 +390,4 @@ private int apperanceOption() {
391390
return random.nextInt(TANK_ROW_NUM);
392391
}
393392

394-
//<editor-fold desc="Description">
395-
@Override
396-
public void onSizeDefined(RefreshKernel kernel, int height, int extendHeight) {
397-
super.onSizeDefined(kernel, height, extendHeight);
398-
}
399-
//</editor-fold>
400393
}
Collapse file

‎refresh-header/src/main/java/com/scwang/smartrefresh/header/FunGameHitBlockHeader.java‎

Copy file name to clipboardExpand all lines: refresh-header/src/main/java/com/scwang/smartrefresh/header/FunGameHitBlockHeader.java
+2-11Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import android.util.AttributeSet;
1111

1212
import com.scwang.smartrefresh.header.fungame.FunGameView;
13-
import com.scwang.smartrefresh.layout.api.RefreshKernel;
1413
import com.scwang.smartrefresh.layout.util.DensityUtil;
1514

1615
import java.util.ArrayList;
@@ -133,7 +132,7 @@ protected void drawGame(Canvas canvas, int width, int height) {
133132
if (status == STATUS_GAME_PLAY
134133
|| status == STATUS_GAME_FINISHED
135134
|| isInEditMode()) {
136-
makeBallPath(canvas, width, height);
135+
makeBallPath(canvas, width);
137136
}
138137
}
139138

@@ -168,9 +167,8 @@ private void drawRacket(Canvas canvas) {
168167
* 绘制并处理小球运动的轨迹
169168
* @param canvas 默认画布
170169
* @param width
171-
* @param height
172170
*/
173-
private void makeBallPath(Canvas canvas, int width, int height) {
171+
private void makeBallPath(Canvas canvas, int width) {
174172
mPaint.setColor(mModelColor);
175173

176174
if (cx <= blockLeft + blockHorizontalNum * blockWidth + (blockHorizontalNum - 1) * DIVIDING_LINE_SIZE + BALL_RADIUS) { // 小球进入到色块区域
@@ -284,11 +282,4 @@ private void drawColorBlock(Canvas canvas) {
284282
canvas.drawRect(left, top, left + blockWidth, top + blockHeight, blockPaint);
285283
}
286284
}
287-
288-
//<editor-fold desc="Description">
289-
@Override
290-
public void onSizeDefined(RefreshKernel kernel, int height, int extendHeight) {
291-
super.onSizeDefined(kernel, height, extendHeight);
292-
}
293-
//</editor-fold>
294285
}
Collapse file

‎refresh-header/src/main/java/com/scwang/smartrefresh/header/MaterialHeader.java‎

Copy file name to clipboardExpand all lines: refresh-header/src/main/java/com/scwang/smartrefresh/header/MaterialHeader.java
+7-4Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,10 +283,6 @@ public void setPrimaryColors(int... colors) {
283283
//mProgress.setColorSchemeColors(colors);
284284
}
285285

286-
public void setColorSchemeColors(int... colors) {
287-
mProgress.setColorSchemeColors(colors);
288-
}
289-
290286
@NonNull
291287
@Override
292288
public View getView() {
@@ -299,4 +295,11 @@ public SpinnerStyle getSpinnerStyle() {
299295
}
300296
//</editor-fold>
301297

298+
299+
//<editor-fold desc="API">
300+
public MaterialHeader setColorSchemeColors(int... colors) {
301+
mProgress.setColorSchemeColors(colors);
302+
return this;
303+
}
304+
//</editor-fold>
302305
}
Collapse file

‎refresh-header/src/main/java/com/scwang/smartrefresh/header/PhoenixHeader.java‎

Copy file name to clipboardExpand all lines: refresh-header/src/main/java/com/scwang/smartrefresh/header/PhoenixHeader.java
+8-1Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
public class PhoenixHeader extends View implements RefreshHeader/*, SizeDefinition*/ {
3131

32+
//<editor-fold desc="static">
3233
private static final int ANIMATION_DURATION = 1000;
3334
private static final float SUN_INITIAL_ROTATE_GROWTH = 1.2f;
3435
private static final Interpolator LINEAR_INTERPOLATOR = new LinearInterpolator();
@@ -92,6 +93,7 @@ public class PhoenixHeader extends View implements RefreshHeader/*, SizeDefiniti
9293
"m109.1,226.62c-0.79,-0.95 -1.06,-6.89 -0.87,-19.14 0.24,-15.65 0.48,-17.89 2.02,-18.86 1.28,-0.8 2.22,-0.8 3.5,0 1.54,0.97 1.78,3.22 2.02,18.86C116.06,225.82 115.66,228 112,228c-0.97,0 -2.27,-0.62 -2.9,-1.38zM56.2,211.8c-0.66,-0.66 -1.2,-1.75 -1.2,-2.42 0,-0.67 3.91,-8 8.68,-16.3C71.62,179.3 72.61,178 75.16,178c5.4,0 4.68,3.34 -3.95,18.26 -4.35,7.52 -8.48,14.36 -9.18,15.2C60.5,213.3 57.85,213.45 56.2,211.8ZM165.97,211.47c-0.7,-0.84 -4.83,-7.68 -9.18,-15.2C148.16,181.34 147.43,178 152.84,178c2.56,0 3.55,1.3 11.48,15.08 4.78,8.3 8.68,15.63 8.68,16.3 0,3.33 -4.81,4.76 -7.03,2.08zM16.2,171.8c-1.65,-1.65 -1.5,-4.3 0.33,-5.83 0.84,-0.7 7.68,-4.83 15.2,-9.18C46.66,148.16 50,147.43 50,152.84c0,2.56 -1.3,3.55 -15.08,11.48C26.62,169.09 19.29,173 18.62,173 17.95,173 16.86,172.46 16.2,171.8ZM192.75,164.26C179.38,156.4 178,155.33 178,152.81c0,-5.44 3.35,-4.67 18.95,4.39 7.89,4.58 14.83,9.1 15.44,10.06 1.38,2.19 -0.25,5.15 -2.99,5.45 -1.04,0.12 -8.54,-3.69 -16.65,-8.46zM105.06,164.91C90.72,162.1 75.91,150.34 69.37,136.56 48.31,92.21 94.21,46.31 138.56,67.37c10.34,4.91 19.16,13.73 24.07,24.07 18.52,38.99 -15.04,81.81 -57.58,73.47zM125.2,156.89c12.02,-2.51 23.55,-11.32 29.53,-22.54 13.91,-26.1 -2.19,-58.49 -31.58,-63.53 -29.3,-5.02 -55.36,21.03 -50.33,50.33 4.23,24.68 27.93,40.85 52.38,35.74zM1.22,118.82C0.55,118.15 0,116.85 0,115.92c0,-3.57 2.26,-3.98 20.52,-3.7 15.65,0.24 17.89,0.48 18.86,2.02 0.8,1.28 0.8,2.22 -0,3.5 -0.97,1.54 -3.22,1.78 -19.02,2.02 -13.09,0.2 -18.25,-0.06 -19.14,-0.95zM189.22,118.82C188.55,118.15 188,116.85 188,115.92c0,-3.57 2.26,-3.98 20.52,-3.7 15.65,0.24 17.89,0.48 18.86,2.02 0.8,1.28 0.8,2.22 -0,3.5 -0.97,1.54 -3.22,1.78 -19.02,2.02 -13.09,0.2 -18.25,-0.06 -19.14,-0.95zM30.61,70.66c-7.64,-4.49 -14.39,-8.95 -14.99,-9.91 -1.28,-2.02 0.14,-5.06 2.59,-5.54 0.82,-0.16 8.31,3.63 16.64,8.43C48.51,71.51 50,72.63 50,75.08c0,2.57 -1.65,4.04 -4.33,3.84 -0.64,-0.05 -7.42,-3.76 -15.06,-8.25zM179.25,78.34C178.56,78.06 178,76.6 178,75.1c0,-2.48 1.44,-3.56 15.16,-11.46 8.34,-4.8 15.83,-8.59 16.64,-8.43 2.44,0.48 3.86,3.52 2.59,5.53 -1.22,1.93 -28.89,18.3 -30.73,18.18 -0.64,-0.04 -1.72,-0.31 -2.41,-0.58zM63.65,34.92C58.83,26.62 55.02,19.13 55.19,18.27c0.49,-2.51 3.51,-3.95 5.55,-2.66 0.96,0.6 5.48,7.55 10.06,15.44C79.85,46.65 80.63,50 75.19,50 72.66,50 71.62,48.63 63.65,34.92ZM149.46,47.69c-0.43,-1.71 1.57,-6.01 7.74,-16.65 4.58,-7.89 9.1,-14.83 10.06,-15.44 2.02,-1.27 5.05,0.15 5.53,2.59 0.16,0.82 -3.63,8.31 -8.43,16.64C156.39,48.7 155.39,50 152.84,50c-2.09,0 -2.95,-0.59 -3.38,-2.31zM109.1,38.62c-0.79,-0.95 -1.06,-6.89 -0.87,-19.14 0.24,-15.65 0.48,-17.89 2.02,-18.86 1.28,-0.8 2.22,-0.8 3.5,0 1.54,0.97 1.78,3.22 2.02,18.86C116.06,37.82 115.66,40 112,40c-0.97,0 -2.27,-0.62 -2.9,-1.38z",
9394
"M105.5,156.61C83.66,151.3 69.02,129.01 72.82,106.85 76.91,83 99.57,66.78 123.15,70.82c23.85,4.09 40.07,26.75 36.03,50.33 -4.31,25.12 -29.03,41.45 -53.68,35.46z"
9495
};
96+
//</editor-fold>
9597

9698
private PathsDrawable mDrawableSun;
9799
private PathsDrawable mDrawableSky;
@@ -104,6 +106,7 @@ public class PhoenixHeader extends View implements RefreshHeader/*, SizeDefiniti
104106
private boolean isRefreshing;
105107
private Animation mAnimation;
106108

109+
//<editor-fold desc="View">
107110
public PhoenixHeader(Context context) {
108111
this(context,null);
109112
}
@@ -180,7 +183,9 @@ private void setupPathsDrawable() {
180183
mDrawableSun.parserColors(sunColors);
181184
mDrawableSun.setBounds(0, 0, mSunSize, mSunSize);
182185
}
186+
//</editor-fold>
183187

188+
//<editor-fold desc="RefreshHeader">
184189
@Override
185190
public void onSizeDefined(RefreshKernel layout, int height, int extendHeight) {
186191

@@ -238,7 +243,7 @@ public View getView() {
238243
public SpinnerStyle getSpinnerStyle() {
239244
return SpinnerStyle.Scale;
240245
}
241-
246+
//</editor-fold>
242247

243248
// @Override
244249
// public int defineHeight() {
@@ -250,6 +255,7 @@ public SpinnerStyle getSpinnerStyle() {
250255
// return (int) (defineHeight() * 0.3f);
251256
// }
252257

258+
//<editor-fold desc="draw">
253259
@Override
254260
public void onDraw(Canvas canvas) {
255261
int width = getWidth();
@@ -348,6 +354,7 @@ private void drawSun(Canvas canvas, int width, int height) {
348354
mDrawableSun.draw(canvas);
349355
canvas.restoreToCount(saveCount);
350356
}
357+
//</editor-fold>
351358

352359
}
353360

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.