diff options
author | Andrew Dolgov <[email protected]> | 2012-12-02 21:00:55 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2012-12-02 21:00:55 +0400 |
commit | 66d9ed7f20932db16859b7191045da9721f03432 (patch) | |
tree | 7ebfde6bd365c5fae32371ea5c81179d241b1c6b | |
parent | df1b02237bfb79b51a29392ca4b3d2cd094dcacb (diff) |
fix not restoring current directory after pause/resume; code cleanup
-rw-r--r-- | src/org/fox/ttcomics/ComicFragment.java | 6 | ||||
-rw-r--r-- | src/org/fox/ttcomics/ComicListFragment.java | 2 | ||||
-rw-r--r-- | src/org/fox/ttcomics/ComicPager.java | 2 | ||||
-rw-r--r-- | src/org/fox/ttcomics/ViewPager.java | 4 |
4 files changed, 2 insertions, 12 deletions
diff --git a/src/org/fox/ttcomics/ComicFragment.java b/src/org/fox/ttcomics/ComicFragment.java index 18b221d..4787297 100644 --- a/src/org/fox/ttcomics/ComicFragment.java +++ b/src/org/fox/ttcomics/ComicFragment.java @@ -3,7 +3,6 @@ package org.fox.ttcomics; import it.sephiroth.android.library.imagezoom.ImageViewTouch;
import java.io.IOException;
-import java.io.InputStream;
import android.app.ActionBar;
import android.app.Activity;
@@ -14,14 +13,11 @@ import android.os.AsyncTask; import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.v4.app.Fragment;
-import android.util.Log;
import android.view.GestureDetector;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
-import android.widget.ImageView;
-import android.widget.ImageView.ScaleType;
import android.widget.TextView;
public class ComicFragment extends Fragment implements GestureDetector.OnDoubleTapListener {
@@ -44,8 +40,6 @@ public class ComicFragment extends Fragment implements GestureDetector.OnDoubleT }
public void setThumbnail(final boolean thumbnail) {
- Log.d(TAG, "setThumbnail=" + thumbnail + " isAdded=" + isAdded() + " view=" + getView());
-
if (isAdded() && getView() != null && m_thumbnail != thumbnail) {
AsyncTask<ComicArchive, Void, Bitmap> loadTask = new AsyncTask<ComicArchive, Void, Bitmap>() {
diff --git a/src/org/fox/ttcomics/ComicListFragment.java b/src/org/fox/ttcomics/ComicListFragment.java index 809d77a..edd13ff 100644 --- a/src/org/fox/ttcomics/ComicListFragment.java +++ b/src/org/fox/ttcomics/ComicListFragment.java @@ -167,6 +167,7 @@ public class ComicListFragment extends Fragment implements OnItemClickListener { if (savedInstanceState != null) {
m_mode = savedInstanceState.getInt("mode");
+ m_baseDirectory = savedInstanceState.getString("baseDir");
//m_files = savedInstanceState.getStringArrayList("files");
}
@@ -428,6 +429,7 @@ public class ComicListFragment extends Fragment implements OnItemClickListener { super.onSaveInstanceState(out);
out.putInt("mode", m_mode);
+ out.putString("baseDir", m_baseDirectory);
//out.putStringArrayList("files", m_files);
}
diff --git a/src/org/fox/ttcomics/ComicPager.java b/src/org/fox/ttcomics/ComicPager.java index d3c8c70..cb10591 100644 --- a/src/org/fox/ttcomics/ComicPager.java +++ b/src/org/fox/ttcomics/ComicPager.java @@ -150,8 +150,6 @@ public class ComicPager extends Fragment { }
ComicFragment cf = m_adapter.getFragmentAt(position);
-
- Log.d(TAG, "cf=" + cf);
if (cf != null) {
if (m_current != null) {
diff --git a/src/org/fox/ttcomics/ViewPager.java b/src/org/fox/ttcomics/ViewPager.java index 6d9c68f..a81261d 100644 --- a/src/org/fox/ttcomics/ViewPager.java +++ b/src/org/fox/ttcomics/ViewPager.java @@ -3,14 +3,10 @@ package org.fox.ttcomics; import it.sephiroth.android.library.imagezoom.ImageViewTouch;
import android.content.Context;
import android.util.AttributeSet;
-import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
public class ViewPager extends android.support.v4.view.ViewPager {
-
- private final String TAG = this.getClass().getSimpleName();
-
public ViewPager(Context context, AttributeSet attrs) {
super(context, attrs);
}
|