forked from hpdx/fresco-helper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
李松
committed
May 17, 2017
1 parent
337c5e9
commit c34de70
Showing
10 changed files
with
96 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
fresco-helper/src/main/java/com/facebook/fresco/helper/LargePhotoView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.facebook.fresco.helper; | ||
|
||
import android.content.Context; | ||
import android.util.AttributeSet; | ||
|
||
import com.anbetter.log.MLog; | ||
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView; | ||
import com.facebook.fresco.helper.listener.OnProgressListener; | ||
|
||
/** | ||
* Created by android_ls on 2017/5/17. | ||
*/ | ||
|
||
public class LargePhotoView extends SubsamplingScaleImageView { | ||
|
||
private OnProgressListener mOnProgressListener; | ||
public LargePhotoView(Context context, AttributeSet attr) { | ||
super(context, attr); | ||
} | ||
|
||
public LargePhotoView(Context context) { | ||
super(context); | ||
} | ||
|
||
public void setOnProgressListener(OnProgressListener listener) { | ||
this.mOnProgressListener = listener; | ||
} | ||
|
||
/** | ||
* 加载进度 | ||
* @param progress 0~100 | ||
*/ | ||
public void onProgress(int progress) { | ||
MLog.i("progress = " + progress); | ||
if(mOnProgressListener != null) { | ||
mOnProgressListener.onProgress(progress); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
fresco-helper/src/main/java/com/facebook/fresco/helper/listener/OnProgressListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.facebook.fresco.helper.listener; | ||
|
||
/** | ||
* | ||
* Created by android_ls on 2017/5/17. | ||
*/ | ||
|
||
public interface OnProgressListener { | ||
void onProgress(int progress); | ||
} |