diff options
Diffstat (limited to 'org.fox.ttrss/src/main/java/org/fox')
-rw-r--r--[-rwxr-xr-x] | org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryActivity.java (renamed from org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleImagesPagerActivity.java) | 18 | ||||
-rw-r--r-- | org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryBaseFragment.java | 4 | ||||
-rw-r--r-- | org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryImageFragment.java (renamed from org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleImageFragment.java) | 7 | ||||
-rw-r--r-- | org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryVideoFragment.java (renamed from org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleVideoFragment.java) | 13 | ||||
-rwxr-xr-x | org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java | 5 |
5 files changed, 12 insertions, 35 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleImagesPagerActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryActivity.java index ff2bbed9..e83e27db 100755..100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleImagesPagerActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryActivity.java @@ -1,8 +1,5 @@ package org.fox.ttrss; -import android.annotation.SuppressLint; -import android.graphics.Bitmap; -import android.os.AsyncTask; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.v4.app.ActivityCompat; @@ -11,13 +8,11 @@ import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentStatePagerAdapter; import android.support.v4.view.ViewPager; import android.support.v7.widget.Toolbar; -import android.util.Log; import android.view.ContextMenu; import android.view.View; import android.widget.ProgressBar; import com.ToxicBakery.viewpager.transforms.DepthPageTransformer; -import com.bumptech.glide.Glide; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; @@ -27,11 +22,8 @@ import org.jsoup.select.Elements; import java.io.Serializable; import java.util.ArrayList; import java.util.List; -import java.util.concurrent.ExecutionException; -import me.relex.circleindicator.CircleIndicator; - -public class ArticleImagesPagerActivity extends CommonActivity { +public class GalleryActivity extends CommonActivity { private final String TAG = this.getClass().getSimpleName(); private ArrayList<GalleryEntry> m_items; @@ -73,7 +65,7 @@ public class ArticleImagesPagerActivity extends CommonActivity { switch (item.type) { case TYPE_IMAGE: if (true) { - ArticleImageFragment frag = new ArticleImageFragment(); + GalleryImageFragment frag = new GalleryImageFragment(); frag.initialize(item.url); return frag; @@ -81,7 +73,7 @@ public class ArticleImagesPagerActivity extends CommonActivity { break; case TYPE_VIDEO: if (true) { - ArticleVideoFragment frag = new ArticleVideoFragment(); + GalleryVideoFragment frag = new GalleryVideoFragment(); frag.initialize(item.url, item.coverUrl); return frag; @@ -111,7 +103,7 @@ public class ArticleImagesPagerActivity extends CommonActivity { position++; try { - Bitmap bmp = Glide.with(ArticleImagesPagerActivity.this) + Bitmap bmp = Glide.with(zzzzticleImagesPagerActivity.this) .load(url) .asBitmap() .into(-1, -1) @@ -177,7 +169,7 @@ public class ArticleImagesPagerActivity extends CommonActivity { super.onCreate(savedInstanceState); - setContentView(R.layout.article_images_pager); + setContentView(R.layout.activity_gallery); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryBaseFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryBaseFragment.java index 4b5e40d5..9dc65311 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryBaseFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryBaseFragment.java @@ -9,7 +9,7 @@ import android.view.MenuItem; public class GalleryBaseFragment extends Fragment { private final String TAG = this.getClass().getSimpleName(); - protected ArticleImagesPagerActivity m_activity; + protected GalleryActivity m_activity; @Override public void onCreate(Bundle savedInstanceState) { @@ -56,7 +56,7 @@ public class GalleryBaseFragment extends Fragment { super.onAttach(activity); //m_prefs = PreferenceManager.getDefaultSharedPreferences(getActivity().getApplicationContext()); - m_activity = (ArticleImagesPagerActivity) activity; + m_activity = (GalleryActivity) activity; } diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleImageFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryImageFragment.java index d55ee127..ca7dfbb3 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleImageFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryImageFragment.java @@ -1,10 +1,7 @@ package org.fox.ttrss; -import android.app.Activity; -import android.net.Uri; import android.os.Bundle; import android.support.v4.app.ActivityCompat; -import android.support.v4.app.Fragment; import android.support.v4.view.ViewCompat; import android.util.Log; import android.view.LayoutInflater; @@ -24,14 +21,14 @@ import com.bumptech.glide.request.RequestListener; import com.bumptech.glide.request.target.GlideDrawableImageViewTarget; import com.bumptech.glide.request.target.Target; -public class ArticleImageFragment extends GalleryBaseFragment { +public class GalleryImageFragment extends GalleryBaseFragment { private final String TAG = this.getClass().getSimpleName(); String m_url; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - View view = inflater.inflate(R.layout.fragment_article_image, container, false); + View view = inflater.inflate(R.layout.fragment_gallery_entry, container, false); if (savedInstanceState != null) { m_url = savedInstanceState.getString("url"); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleVideoFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryVideoFragment.java index 98eb4295..aba56e39 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleVideoFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryVideoFragment.java @@ -1,15 +1,11 @@ package org.fox.ttrss; -import android.app.Activity; import android.content.res.Configuration; import android.graphics.Rect; import android.graphics.SurfaceTexture; import android.media.MediaPlayer; -import android.net.Uri; import android.os.Bundle; -import android.os.Handler; import android.support.v4.app.ActivityCompat; -import android.support.v4.app.Fragment; import android.support.v4.view.ViewCompat; import android.util.Log; import android.view.Display; @@ -17,18 +13,13 @@ import android.view.LayoutInflater; import android.view.MenuInflater; import android.view.MenuItem; import android.view.Surface; -import android.view.SurfaceHolder; -import android.view.SurfaceView; import android.view.TextureView; import android.view.View; import android.view.ViewGroup; -import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.MediaController; import android.widget.PopupMenu; -import android.widget.ProgressBar; -import com.bogdwellers.pinchtozoom.ImageMatrixTouchHandler; import com.bumptech.glide.Glide; import com.bumptech.glide.load.engine.DiskCacheStrategy; import com.bumptech.glide.load.resource.drawable.GlideDrawable; @@ -38,7 +29,7 @@ import com.bumptech.glide.request.target.Target; import java.io.IOException; -public class ArticleVideoFragment extends GalleryBaseFragment { +public class GalleryVideoFragment extends GalleryBaseFragment { private final String TAG = this.getClass().getSimpleName(); String m_url; @@ -48,7 +39,7 @@ public class ArticleVideoFragment extends GalleryBaseFragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - final View view = inflater.inflate(R.layout.fragment_article_image, container, false); + final View view = inflater.inflate(R.layout.fragment_gallery_entry, container, false); if (savedInstanceState != null) { m_url = savedInstanceState.getString("url"); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java index 9ca7870d..eb9295c5 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java @@ -42,7 +42,6 @@ import android.view.LayoutInflater; import android.view.MenuInflater; import android.view.MenuItem; import android.view.Surface; -import android.view.SurfaceHolder; import android.view.TextureView; import android.view.View; import android.view.View.OnClickListener; @@ -76,8 +75,6 @@ import org.fox.ttrss.types.Feed; import org.fox.ttrss.util.HeaderViewRecyclerAdapter; import org.fox.ttrss.util.HeadlinesRequest; -import java.io.IOException; -import java.io.InterruptedIOException; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; @@ -1503,7 +1500,7 @@ public class HeadlinesFragment extends Fragment { } else { - Intent intent = new Intent(m_activity, ArticleImagesPagerActivity.class); + Intent intent = new Intent(m_activity, GalleryActivity.class); intent.putExtra("firstSrc", article.flavorStreamUri != null ? article.flavorStreamUri : article.flavorImageUri); intent.putExtra("title", article.title); |