updated versions

This commit is contained in:
Mariotaku Lee 2016-04-24 12:52:20 +08:00
parent 67912930cf
commit 08e0442132
4 changed files with 6 additions and 4 deletions

View File

@ -71,6 +71,8 @@ Bitcoin: `1FHAVAzge7cj1LfCTMfnLL49DgA3mVUCuW`
Buy me a ~~bread~~ [game](http://steamcommunity.com/id/mariotaku/wishlist) or anything you want :)
[帮我支付宝账户里随便加点钱](https://twitter.com/xmxsuperstar/status/724094631621750785)
---
## License ##

View File

@ -41,7 +41,7 @@ dependencies {
apt 'com.github.mariotaku.ObjectCursor:processor:0.9.7'
compile 'com.android.support:support-annotations:23.3.0'
compile 'com.bluelinelabs:logansquare:1.3.7'
compile 'com.github.mariotaku.RestFu:library:0.9.26'
compile 'com.github.mariotaku.RestFu:library:0.9.27'
compile 'com.hannesdorfmann.parcelableplease:annotation:1.0.2'
compile 'com.github.mariotaku.ObjectCursor:core:0.9.7'
compile fileTree(dir: 'libs', include: ['*.jar'])

View File

@ -141,7 +141,7 @@ dependencies {
compile 'com.soundcloud.android:android-crop:1.0.1@aar'
compile 'com.hannesdorfmann.parcelableplease:annotation:1.0.2'
compile 'com.github.mariotaku:PickNCrop:0.9.4'
compile 'com.github.mariotaku.RestFu:okhttp3:0.9.26'
compile 'com.github.mariotaku.RestFu:okhttp3:0.9.27'
compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'com.lnikkila:extendedtouchview:0.1.0'
compile 'com.google.dagger:dagger:2.1'

View File

@ -755,8 +755,8 @@ public final class MediaViewerActivity extends BaseActivity implements Constants
decodeBitmap(cr, uri, o);
final DisplayMetrics dm = context.getResources().getDisplayMetrics();
final int targetSize = Math.min(1024, Math.max(dm.widthPixels, dm.heightPixels));
o.inSampleSize = TwidereMathUtils.nextPowerOf2(Math.max(1,
Math.round(Math.min(o.outHeight, o.outWidth) / (float) targetSize)));
final double sizeRatio = Math.ceil(Math.min(o.outHeight, o.outWidth) / (double) targetSize);
o.inSampleSize = TwidereMathUtils.nextPowerOf2((int) Math.max(1, sizeRatio));
o.inJustDecodeBounds = false;
final Bitmap bitmap = decodeBitmap(cr, uri, o);
if (bitmap == null) throw new IOException();