Browse Source

Update PhotoView to 1.2.3 to fix the ViewPager problem

Use Bitmap.Config.RGB_565 to reduce memory usage.
develop
Tommy Chen 8 years ago
parent
commit
ff3e3b4d12
  1. 8
      ehreader/build.gradle
  2. 1
      ehreader/src/tw/skyarrow/ehreader/BaseApplication.java
  3. 1
      ehreader/src/tw/skyarrow/ehreader/activity/PhotoFragment.java

8
ehreader/build.gradle

@ -1,6 +1,12 @@
apply plugin: 'android'
apply from: 'signing.gradle'
repositories {
maven {
url 'https://github.com/chrisbanes/PhotoView/raw/maven/'
}
}
android {
compileSdkVersion 19
buildToolsVersion '19.0.0'
@ -52,7 +58,7 @@ dependencies {
compile 'com.android.support:support-v4:19.0.+'
compile 'com.android.support:appcompat-v7:19.0.+'
compile files('libs/libGoogleAnalyticsServices.jar')
compile 'com.github.chrisbanes.photoview:library:1.2.2'
compile 'com.github.chrisbanes.photoview:library:1.2.3-SNAPSHOT'
compile 'de.greenrobot:greendao:1.3.7'
compile 'de.greenrobot:eventbus:2.2.0'
compile 'org.apache.httpcomponents:httpcore:4.3.1'

1
ehreader/src/tw/skyarrow/ehreader/BaseApplication.java

@ -7,6 +7,7 @@ import android.preference.PreferenceManager;
import com.google.analytics.tracking.android.GoogleAnalytics;
import com.google.analytics.tracking.android.Logger;
import com.google.analytics.tracking.android.Tracker;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;

1
ehreader/src/tw/skyarrow/ehreader/activity/PhotoFragment.java

@ -105,6 +105,7 @@ public class PhotoFragment extends Fragment {
imageLoader = ImageLoader.getInstance();
displayOptions = new DisplayImageOptions.Builder()
.cacheOnDisc(true)
.bitmapConfig(Bitmap.Config.RGB_565)
.build();
Bundle args = getArguments();

Loading…
Cancel
Save