diff options
author | Andrew Dolgov <[email protected]> | 2017-06-03 09:49:45 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-06-03 09:49:45 +0300 |
commit | f26b5dda51c453484bd6b867bb9411180af1f5d3 (patch) | |
tree | 01d8d55154fe0d599a9d639bd636268a8bb18e4c /org.fox.ttrss/src/main | |
parent | 28a371a1b4ecd7ea7213f0109317e107a4983f54 (diff) |
move galleryentry to a public class because of serializable
Diffstat (limited to 'org.fox.ttrss/src/main')
3 files changed, 17 insertions, 12 deletions
diff --git a/org.fox.ttrss/src/main/AndroidManifest.xml b/org.fox.ttrss/src/main/AndroidManifest.xml index 6317cde7..73e8333d 100755 --- a/org.fox.ttrss/src/main/AndroidManifest.xml +++ b/org.fox.ttrss/src/main/AndroidManifest.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.fox.ttrss" - android:versionCode="433" - android:versionName="1.199" > + android:versionCode="434" + android:versionName="1.200" > <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryActivity.java index af60dce8..04f1792c 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryActivity.java @@ -2,6 +2,7 @@ package org.fox.ttrss; import android.net.Uri; import android.os.Bundle; +import android.os.Parcel; import android.preference.PreferenceManager; import android.support.v4.app.ActivityCompat; import android.support.v4.app.Fragment; @@ -18,6 +19,7 @@ import android.widget.ProgressBar; import com.ToxicBakery.viewpager.transforms.DepthPageTransformer; +import org.fox.ttrss.types.GalleryEntry; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; @@ -40,14 +42,6 @@ public class GalleryActivity extends CommonActivity { //private ProgressBar m_progress; private ViewPager m_pager; - private enum GalleryEntryType { TYPE_IMAGE, TYPE_VIDEO }; - - private class GalleryEntry implements Serializable { - String url; - GalleryEntryType type; - String coverUrl; - } - private class ArticleImagesPagerAdapter extends FragmentStatePagerAdapter { private List<GalleryEntry> m_items; @@ -218,7 +212,7 @@ public class GalleryActivity extends CommonActivity { item.url = src; item.coverUrl = cover; - item.type = GalleryEntryType.TYPE_VIDEO; + item.type = GalleryEntry.GalleryEntryType.TYPE_VIDEO; } else { String src = elem.attr("src"); @@ -231,7 +225,7 @@ public class GalleryActivity extends CommonActivity { firstFound = true; item.url = src; - item.type = GalleryEntryType.TYPE_IMAGE; + item.type = GalleryEntry.GalleryEntryType.TYPE_IMAGE; } if (firstFound && item.url != null) { diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/types/GalleryEntry.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/types/GalleryEntry.java new file mode 100644 index 00000000..4ab56ed4 --- /dev/null +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/types/GalleryEntry.java @@ -0,0 +1,11 @@ +package org.fox.ttrss.types; + +import java.io.Serializable; + +public class GalleryEntry implements Serializable { + public enum GalleryEntryType { TYPE_IMAGE, TYPE_VIDEO }; + + public String url; + public GalleryEntryType type; + public String coverUrl; +} |