move galleryentry to a public class because of serializable
This commit is contained in:
parent
28a371a1b4
commit
f26b5dda51
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.fox.ttrss"
|
package="org.fox.ttrss"
|
||||||
android:versionCode="433"
|
android:versionCode="434"
|
||||||
android:versionName="1.199" >
|
android:versionName="1.200" >
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
|
@ -2,6 +2,7 @@ package org.fox.ttrss;
|
|||||||
|
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Parcel;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.support.v4.app.ActivityCompat;
|
import android.support.v4.app.ActivityCompat;
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
@ -18,6 +19,7 @@ import android.widget.ProgressBar;
|
|||||||
|
|
||||||
import com.ToxicBakery.viewpager.transforms.DepthPageTransformer;
|
import com.ToxicBakery.viewpager.transforms.DepthPageTransformer;
|
||||||
|
|
||||||
|
import org.fox.ttrss.types.GalleryEntry;
|
||||||
import org.jsoup.Jsoup;
|
import org.jsoup.Jsoup;
|
||||||
import org.jsoup.nodes.Document;
|
import org.jsoup.nodes.Document;
|
||||||
import org.jsoup.nodes.Element;
|
import org.jsoup.nodes.Element;
|
||||||
@ -40,14 +42,6 @@ public class GalleryActivity extends CommonActivity {
|
|||||||
//private ProgressBar m_progress;
|
//private ProgressBar m_progress;
|
||||||
private ViewPager m_pager;
|
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 class ArticleImagesPagerAdapter extends FragmentStatePagerAdapter {
|
||||||
private List<GalleryEntry> m_items;
|
private List<GalleryEntry> m_items;
|
||||||
|
|
||||||
@ -218,7 +212,7 @@ public class GalleryActivity extends CommonActivity {
|
|||||||
|
|
||||||
item.url = src;
|
item.url = src;
|
||||||
item.coverUrl = cover;
|
item.coverUrl = cover;
|
||||||
item.type = GalleryEntryType.TYPE_VIDEO;
|
item.type = GalleryEntry.GalleryEntryType.TYPE_VIDEO;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
String src = elem.attr("src");
|
String src = elem.attr("src");
|
||||||
@ -231,7 +225,7 @@ public class GalleryActivity extends CommonActivity {
|
|||||||
firstFound = true;
|
firstFound = true;
|
||||||
|
|
||||||
item.url = src;
|
item.url = src;
|
||||||
item.type = GalleryEntryType.TYPE_IMAGE;
|
item.type = GalleryEntry.GalleryEntryType.TYPE_IMAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (firstFound && item.url != null) {
|
if (firstFound && item.url != null) {
|
||||||
|
@ -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;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user