Removed old dependency for logcat logging (replaced with slf4j).

master
Tomasz Półgrabia 2016-09-17 14:04:37 +02:00
parent 4f24cab000
commit 78d73914de
3 changed files with 9 additions and 6 deletions

View File

@ -3,7 +3,6 @@ package pl.tpolgrabia.urbanexplorer.callbacks;
import android.location.Location;
import android.location.LocationListener;
import android.os.Bundle;
import android.util.Log;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -2,12 +2,13 @@ package pl.tpolgrabia.urbanexplorer.callbacks;
import android.content.Intent;
import android.net.Uri;
import android.util.Log;
import android.widget.Toast;
import com.androidquery.callback.AjaxCallback;
import com.androidquery.callback.AjaxStatus;
import org.json.JSONException;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import pl.tpolgrabia.urbanexplorer.dto.wiki.app.WikiAppObject;
import pl.tpolgrabia.urbanexplorer.fragments.WikiLocationsFragment;
@ -15,6 +16,7 @@ import pl.tpolgrabia.urbanexplorer.fragments.WikiLocationsFragment;
* Created by tpolgrabia on 14.09.16.
*/
public class WikiInfoRunBrowserCallback extends AjaxCallback<JSONObject> {
private static final Logger lg = LoggerFactory.getLogger(WikiInfoRunBrowserCallback.class);
private static final String CLASS_TAG = WikiInfoRunBrowserCallback.class.getSimpleName();
private WikiLocationsFragment wikiLocationsFragment;
private final WikiAppObject item;
@ -44,7 +46,7 @@ public class WikiInfoRunBrowserCallback extends AjaxCallback<JSONObject> {
Uri.parse(wikiUrl));
wikiLocationsFragment.startActivity(intent);
} catch (JSONException e) {
Log.e(CLASS_TAG, "Error", e);
lg.error("JSON error", e);
}
}
}

View File

@ -1,14 +1,16 @@
package pl.tpolgrabia.urbanexplorer.handlers;
import android.util.Log;
import android.view.GestureDetector;
import android.view.MotionEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import pl.tpolgrabia.urbanexplorer.MainActivity;
/**
* Created by tpolgrabia on 13.09.16.
*/
public class SwipeHandler implements GestureDetector.OnGestureListener {
private static final Logger lg = LoggerFactory.getLogger(SwipeHandler.class);
private static final String CLASS_TAG = SwipeHandler.class.getSimpleName();
private final MainActivity activity;
private static final float SWIPE_THRESHOLD = 50;
@ -56,8 +58,8 @@ public class SwipeHandler implements GestureDetector.OnGestureListener {
float diffx = e2.getX() - e1.getX();
float diffy = e2.getY() - e1.getY();
Log.d(CLASS_TAG, "Flinging... diffx: " + diffx + " diffy" + diffy
+ ", velocityx: " + velocityX + ", velocityY: " + velocityY);
lg.debug(CLASS_TAG, "Flinging... diffx: {} diffy: {}, velocityx: {}, velocityY: {}",
diffx, diffy, velocityX, velocityY);
if (Math.abs(diffx) > Math.abs(diffy)) {
// horizontal moves