Skip to content
This repository has been archived by the owner on Sep 8, 2019. It is now read-only.

Commit

Permalink
- v1.1.1 Beta release
Browse files Browse the repository at this point in the history
- Bug Fixes + code cleanup
  • Loading branch information
kollerlukas committed Feb 26, 2017
1 parent 6adc092 commit 4b79796
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 26 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "us.koller.cameraroll"
minSdkVersion 21
targetSdkVersion 25
versionCode 10
versionName "v1.1 Beta"
versionCode 11
versionName "v1.1.1 Beta"
renderscriptTargetApi 25
renderscriptSupportModeEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package us.koller.cameraroll.adapter.album.ViewHolder;

import android.app.Activity;
import android.content.Context;
import android.support.v4.content.ContextCompat;
import android.view.View;
import android.widget.ImageView;

Expand Down Expand Up @@ -51,7 +49,7 @@ public boolean onResourceReady(GifDrawable resource, String model,
return false;
}
})
.error(R.drawable.error_placeholder)
.error(R.drawable.error_placeholder_tinted)
.into(imageView);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public boolean onResourceReady(Bitmap resource, String model,
return false;
}
})
.error(R.drawable.error_placeholder)
.error(R.drawable.error_placeholder_tinted)
.into(imageView);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public boolean onResourceReady(Bitmap resource, String model,
return false;
}
})
.error(R.drawable.error_placeholder)
.error(R.drawable.error_placeholder_tinted)
.into(imageView);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ public boolean onTouch(View view, MotionEvent motionEvent) {
}

private void scaleDown(final ItemActivity.Callback callback) {
final SubsamplingScaleImageView imageView = (SubsamplingScaleImageView) itemView.findViewById(R.id.subsampling);
final SubsamplingScaleImageView imageView
= (SubsamplingScaleImageView) itemView.findViewById(R.id.subsampling);
if (imageView != null) {
try {
imageView.animateScale(0.0f)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,16 @@ private void loadImage() {
Glide.with(itemView.getContext())
.load(coverImage.getPath())
.asBitmap()
.error(R.drawable.error_placeholder)
.error(R.drawable.error_placeholder_tinted)
.listener(new RequestListener<String, Bitmap>() {
@Override
public boolean onException(Exception e, String model,
Target<Bitmap> target, boolean isFirstResource) {
coverImage.error = true;

if (image instanceof ParallaxImageView) {
((ParallaxImageView) image).setParallaxTranslation();
}
return false;
}

Expand Down
16 changes: 10 additions & 6 deletions app/src/main/java/us/koller/cameraroll/ui/AlbumActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,14 @@ protected void onPostResume() {

@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.album, menu);
this.menu = menu;
if (!pick_photos) {
getMenuInflater().inflate(R.menu.album, menu);
this.menu = menu;

Drawable icon = menu.findItem(R.id.share).getIcon().mutate();
icon.setTint(ContextCompat.getColor(this, R.color.grey_900_translucent));
menu.findItem(R.id.share).setIcon(icon);
Drawable icon = menu.findItem(R.id.share).getIcon().mutate();
icon.setTint(ContextCompat.getColor(this, R.color.grey_900_translucent));
menu.findItem(R.id.share).setIcon(icon);
}

return super.onCreateOptionsMenu(menu);
}
Expand Down Expand Up @@ -562,7 +564,9 @@ public void onSelectorModeEnter() {

Util.setDarkStatusBarIcons(findViewById(R.id.root_view));

menu.findItem(R.id.exclude).setVisible(false);
if (menu != null) {
menu.findItem(R.id.exclude).setVisible(false);
}

if (!pick_photos) {
ColorFade.fadeBackgroundColor(toolbar,
Expand Down
11 changes: 3 additions & 8 deletions app/src/main/java/us/koller/cameraroll/util/ItemViewUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

import android.app.Activity;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Handler;
import android.provider.MediaStore;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand All @@ -21,8 +18,6 @@
import com.davemorrissey.labs.subscaleview.ImageViewState;
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView;

import java.io.IOException;

import us.koller.cameraroll.R;
import us.koller.cameraroll.adapter.item.ViewHolder.GifViewHolder;
import us.koller.cameraroll.data.AlbumItem;
Expand Down Expand Up @@ -85,7 +80,7 @@ public static View bindTransitionView(final ImageView imageView,
.asBitmap()
.override(imageDimens[0], imageDimens[1])
.skipMemoryCache(true)
.error(R.drawable.error_placeholder)
.error(R.drawable.error_placeholder_tinted)
.listener(new RequestListener<String, Bitmap>() {
@Override
public boolean onException(Exception e, String model,
Expand Down Expand Up @@ -127,7 +122,7 @@ public static View bindGif(final GifViewHolder gifViewHolder,
.asGif()
.skipMemoryCache(true)
.diskCacheStrategy(DiskCacheStrategy.SOURCE)
.error(R.drawable.error_placeholder)
.error(R.drawable.error_placeholder_tinted)
.listener(new RequestListener<String, GifDrawable>() {
@Override
public boolean onException(Exception e, String model,
Expand Down Expand Up @@ -169,7 +164,7 @@ public static ViewGroup bindImageViewForVideo(final ImageView imageView,
.asBitmap()
.override(imageDimens[0], imageDimens[1])
.skipMemoryCache(true)
.error(R.drawable.error_placeholder)
.error(R.drawable.error_placeholder_tinted)
.into(imageView);
imageView.setTransitionName(albumItem.getPath());

Expand Down
6 changes: 4 additions & 2 deletions app/src/main/java/us/koller/cameraroll/util/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ public static int[] getVideoDimensions(String path) {

int[] dimensions = new int[2];

dimensions[0] = bitmap.getWidth() > 0 ? bitmap.getWidth() : 1;
dimensions[1] = bitmap.getHeight() > 0 ? bitmap.getHeight() : 1;
if (bitmap != null) {
dimensions[0] = bitmap.getWidth() > 0 ? bitmap.getWidth() : 1;
dimensions[1] = bitmap.getHeight() > 0 ? bitmap.getHeight() : 1;
}
return dimensions;

}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/albumItem_selected.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ripple"/>
<item android:drawable="@drawable/albumitem_selected_indicator"/>
<item android:drawable="@drawable/albumitem_selected_indicator_tinted"/>
</layer-list>
Binary file modified app/src/main/res/drawable/albumItem_selected_indicator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/albumitem_selected_indicator"
android:tint="@color/colorAccent"/>
Binary file modified app/src/main/res/drawable/error_placeholder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/src/main/res/drawable/error_placeholder_tinted.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/error_placeholder"
android:tint="@color/colorAccent"/>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4b79796

Please sign in to comment.