mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
Fixed minor issues
This commit is contained in:
parent
7804546ae3
commit
5a4251fe55
3 changed files with 7 additions and 9 deletions
|
|
@ -151,7 +151,7 @@ public class MediaWikiImageView extends ImageView {
|
||||||
// from the network.
|
// from the network.
|
||||||
ImageContainer newContainer = mImageLoader.get(mUrl,
|
ImageContainer newContainer = mImageLoader.get(mUrl,
|
||||||
new ImageListener() {
|
new ImageListener() {
|
||||||
|
@Override
|
||||||
public void onErrorResponse(final VolleyError error) {
|
public void onErrorResponse(final VolleyError error) {
|
||||||
if(!tryOriginal) {
|
if(!tryOriginal) {
|
||||||
post(new Runnable() {
|
post(new Runnable() {
|
||||||
|
|
@ -163,7 +163,7 @@ public class MediaWikiImageView extends ImageView {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void onResponse(final ImageContainer response, boolean isImmediate) {
|
public void onResponse(final ImageContainer response, boolean isImmediate) {
|
||||||
// If this was an immediate response that was delivered inside of a layout
|
// If this was an immediate response that was delivered inside of a layout
|
||||||
// pass do not set the image immediately as it will trigger a requestLayout
|
// pass do not set the image immediately as it will trigger a requestLayout
|
||||||
|
|
@ -171,7 +171,7 @@ public class MediaWikiImageView extends ImageView {
|
||||||
// the main thread.
|
// the main thread.
|
||||||
if (isImmediate && isInLayoutPass) {
|
if (isImmediate && isInLayoutPass) {
|
||||||
post(new Runnable() {
|
post(new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
onResponse(response, false);
|
onResponse(response, false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,6 @@ public class MediaDetailFragment extends SherlockFragment {
|
||||||
@Override
|
@Override
|
||||||
protected void onPreExecute() {
|
protected void onPreExecute() {
|
||||||
extractor = new MediaDataExtractor(media.getFilename(), licenseList);
|
extractor = new MediaDataExtractor(media.getFilename(), licenseList);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,6 @@ import android.util.Log;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by misao on 16-Dec-15.
|
|
||||||
*/
|
|
||||||
public class ImageProcessing {
|
public class ImageProcessing {
|
||||||
|
|
||||||
private Uri uri;
|
private Uri uri;
|
||||||
|
|
@ -23,8 +20,10 @@ public class ImageProcessing {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
this.uri = uri;
|
this.uri = uri;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
//Gets file path of image from its Uri
|
* Gets file path of image from its Uri
|
||||||
|
* May return null
|
||||||
|
*/
|
||||||
public String getFilePath(){
|
public String getFilePath(){
|
||||||
String filePath ="";
|
String filePath ="";
|
||||||
// Will return "image:x*"
|
// Will return "image:x*"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue