Skip to content

Commit dedcae3

Browse files
committed
FIX BUGS
1 parent bc2ac2c commit dedcae3

18 files changed

Lines changed: 142 additions & 163 deletions

File tree

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repositories {
1818
}
1919
2020
dependencies {
21-
compile 'com.github.Bleoo:WindowImageView:1.0.1'
21+
compile 'com.github.Bleoo:WindowImageView:1.0.2'
2222
}
2323
```
2424

@@ -46,6 +46,12 @@ window_image_view.setFrescoEnable(true);
4646
window_image_view.setImageURI(YourUri);
4747
```
4848

49+
### Revision History
50+
##### V1.0.2 版本更新说明(2017-12-28)
51+
- 修复图片不显示问题
52+
- fresco 图片不显示及小图不放大的问题
53+
- 包名更换
54+
4955
## MIT License
5056

5157
Copyright (c) 2017 Yang Liu

app/build.gradle

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apply plugin: 'com.android.application'
33
android {
44
compileSdkVersion 26
55
defaultConfig {
6-
applicationId "io.github.bleoo.windowimageview"
6+
applicationId "io.github.bleoo.simple"
77
minSdkVersion 19
88
targetSdkVersion 26
99
versionCode 1
@@ -16,16 +16,28 @@ android {
1616
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
1717
}
1818
}
19+
20+
lintOptions {
21+
checkReleaseBuilds false
22+
// Or, if you prefer, you can continue to check for errors in release builds,
23+
// but continue the build even when errors are found:
24+
abortOnError false
25+
}
26+
dexOptions { // 增大编译内存
27+
preDexLibraries = false
28+
javaMaxHeapSize "4g"
29+
}
1930
}
2031

2132
dependencies {
2233
implementation fileTree(include: ['*.jar'], dir: 'libs')
23-
implementation 'com.android.support:appcompat-v7:26.1.0'
2434
testImplementation 'junit:junit:4.12'
2535
androidTestImplementation 'com.android.support.test:runner:1.0.1'
2636
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
37+
38+
implementation 'com.android.support:appcompat-v7:26.1.0'
2739
implementation 'com.android.support:recyclerview-v7:26.1.0'
2840

29-
api project(':window-image-view')
41+
implementation project(':window-image-view')
3042
implementation 'com.facebook.fresco:fresco:1.5.0'
3143
}

app/src/androidTest/java/io/github/bleoo/windowimageview/ExampleInstrumentedTest.java renamed to app/src/androidTest/java/io/github/bleoo/windowImageView/ExampleInstrumentedTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.github.bleoo.windowimageview;
1+
package io.github.bleoo.windowImageView;
22

33
import android.content.Context;
44
import android.support.test.InstrumentationRegistry;

app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="io.github.bleoo.windowimageview">
3+
package="io.github.bleoo.simple">
44

55
<uses-permission android:name="android.permission.INTERNET" />
66

77
<application
8-
android:name=".MyApp"
8+
android:name="io.github.bleoo.windowImageView.MyApp"
99
android:allowBackup="true"
1010
android:icon="@mipmap/ic_launcher"
1111
android:label="@string/app_name"
1212
android:roundIcon="@mipmap/ic_launcher_round"
1313
android:supportsRtl="true"
1414
android:theme="@style/AppTheme">
15-
<activity android:name=".MainActivity">
15+
<activity android:name="io.github.bleoo.windowImageView.MainActivity">
1616
<intent-filter>
1717
<action android:name="android.intent.action.MAIN" />
1818

app/src/main/java/io/github/bleoo/windowimageview/MainActivity.java renamed to app/src/main/java/io/github/bleoo/windowImageView/MainActivity.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.github.bleoo.windowimageview;
1+
package io.github.bleoo.windowImageView;
22

33
import android.graphics.Color;
44
import android.net.Uri;
@@ -8,6 +8,7 @@
88
import android.support.v7.widget.RecyclerView;
99
import android.view.View;
1010
import android.view.ViewGroup;
11+
import io.github.bleoo.simple.R;
1112

1213
public class MainActivity extends AppCompatActivity {
1314

@@ -57,10 +58,12 @@ public void onBindViewHolder(MyHolder holder, int position) {
5758
holder.windowImageView.setImageResource(R.drawable.timg2);
5859
} else if (position == 19) {
5960
holder.windowImageView.bindRecyclerView(rv_content);
60-
holder.windowImageView.setFrescoEnable(false);
61-
holder.windowImageView.setImageResource(R.drawable.timg);
62-
// holder.windowImageView.setFrescoEnable(true);
61+
// holder.windowImageView.setFrescoEnable(false);
62+
// holder.windowImageView.setImageResource(R.drawable.timg);
63+
holder.windowImageView.setFrescoEnable(true);
6364
// holder.windowImageView.setImageURI(Uri.parse("https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1510654468262&di=c878e5c02043f8dc7720abaab760549e&imgtype=0&src=http%3A%2F%2Fimg.bbs.cnhubei.com%2Fforum%2Fdvbbs%2F2004-4%2F200441915031894.jpg"));
65+
holder.windowImageView.setImageURI(Uri.parse("http://www.fzlu.net/uploads/allimg/150918/3-15091Q00R2a2.jpg"));
66+
// holder.windowImageView.setImageURI(Uri.parse("http://pic92.nipic.com/file/20160316/20647925_150655660000_2.jpg"));
6467
} else {
6568
holder.itemView.setBackgroundColor(Color.rgb((int) (Math.random() * 255), (int) (Math.random() * 255), (int) (Math.random() * 255)));
6669
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package io.github.bleoo.windowImageView;
2+
3+
import android.app.Application;
4+
5+
import com.facebook.common.logging.FLog;
6+
import com.facebook.drawee.backends.pipeline.Fresco;
7+
import com.facebook.imagepipeline.core.ImagePipelineConfig;
8+
import com.facebook.imagepipeline.listener.RequestListener;
9+
import com.facebook.imagepipeline.listener.RequestLoggingListener;
10+
11+
import java.util.HashSet;
12+
import java.util.Set;
13+
14+
/**
15+
* Created by bleoo on 2017/11/13.
16+
*/
17+
18+
public class MyApp extends Application {
19+
20+
@Override
21+
public void onCreate() {
22+
super.onCreate();
23+
Set<RequestListener> requestListeners = new HashSet<>();
24+
requestListeners.add(new RequestLoggingListener());
25+
ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this)
26+
// other setters
27+
.setRequestListeners(requestListeners)
28+
.build();
29+
Fresco.initialize(this, config);
30+
FLog.setMinimumLoggingLevel(FLog.VERBOSE);
31+
}
32+
}

app/src/main/java/io/github/bleoo/windowimageview/MyApp.java

Lines changed: 0 additions & 18 deletions
This file was deleted.

app/src/main/res/layout/item0.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
android:layout_height="200dp"
1010
android:gravity="center"
1111
android:textColor="@android:color/white"
12-
android:text=""/>
12+
android:text="WindowImageView"/>
1313

1414
</LinearLayout>

app/src/main/res/layout/item1.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
android:orientation="vertical" android:layout_width="match_parent"
44
android:layout_height="match_parent">
55

6-
<io.github.bleoo.windowimageview.WindowImageView
6+
<io.github.bleoo.windowImageView.WindowImageView
77
android:id="@+id/wiv"
88
android:layout_width="match_parent"
99
android:layout_height="200dp" />

window-image-view/src/test/java/io/github/bleoo/windowimageview/ExampleUnitTest.java renamed to app/src/test/java/io/github/bleoo/windowImageView/ExampleUnitTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.github.bleoo.windowimageview;
1+
package io.github.bleoo.windowImageView;
22

33
import org.junit.Test;
44

0 commit comments

Comments
 (0)