diff options
author | Andrew Dolgov <[email protected]> | 2014-11-29 11:31:45 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2014-11-29 11:31:45 +0300 |
commit | 49f5b1826bd67e11a932f9a4fd083fa13442ef06 (patch) | |
tree | c4eb8badf357d6caf89f897af5c1f196f07b6481 /org.fox.ttrss/src | |
parent | accfa1c6727caf5a68331fdde267d126d6d06111 (diff) |
more headlines/imagepager tweaks
Diffstat (limited to 'org.fox.ttrss/src')
3 files changed, 4 insertions, 36 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/ArticleImagesPagerActivity.java index 6a7fb269..9d31d8b0 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleImagesPagerActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleImagesPagerActivity.java @@ -116,7 +116,7 @@ public class ArticleImagesPagerActivity extends CommonActivity implements Gestur ImageViewTouch imgView = (ImageViewTouch) view.findViewById(R.id.flavor_image); imgView.setFitToScreen(true); - imgView.setFitToWidth(true); + //imgView.setFitToWidth(true); imgView.setOnTouchListener(new View.OnTouchListener() { @Override @@ -126,6 +126,7 @@ public class ArticleImagesPagerActivity extends CommonActivity implements Gestur }); registerForContextMenu(imgView); + getSupportActionBar().hide(); DisplayImageOptions options = new DisplayImageOptions.Builder() .cacheInMemory(true) diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java index 56704bf5..c754df79 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java @@ -30,7 +30,7 @@ public class CommonActivity extends ActionBarActivity { public final static String THEME_DEFAULT = CommonActivity.THEME_LIGHT; public static final int EXCERPT_MAX_LENGTH = 256; - public static final int EXCERPT_MAX_QUERY_LENGTH = 1024; + public static final int EXCERPT_MAX_QUERY_LENGTH = 512; private SQLiteDatabase m_readableDb; private SQLiteDatabase m_writableDb; 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 6a90865a..34f5dd59 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java @@ -828,20 +828,11 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, }); } - boolean showFlavorImage = "HL_DEFAULT".equals(m_prefs.getString("headline_mode", "HL_DEFAULT")); - String articleContent = article.content != null ? article.content : ""; - String articleContentReduced = articleContent.length() > CommonActivity.EXCERPT_MAX_QUERY_LENGTH ? articleContent.substring(0, CommonActivity.EXCERPT_MAX_QUERY_LENGTH) : articleContent; - /* if (m_compactLayoutMode || !showFlavorImage) { - if (articleContent.length() > CommonActivity.EXCERPT_MAX_QUERY_LENGTH) { - articleContent = articleContent.substring(0, CommonActivity.EXCERPT_MAX_QUERY_LENGTH); - } - } */ - Document articleDoc = Jsoup.parse(articleContentReduced); if (holder.excerptView != null) { @@ -859,17 +850,14 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, } if (!m_compactLayoutMode) { + boolean showFlavorImage = "HL_DEFAULT".equals(m_prefs.getString("headline_mode", "HL_DEFAULT")); if (holder.flavorImageView != null && showFlavorImage) { holder.flavorImageArrow.setVisibility(View.GONE); - //Document doc = Jsoup.parse(articleContent); - boolean loadableImageFound = false; if (articleDoc != null) { - //Element img = doc.select("img").first(); - final Elements imgs = articleDoc.select("img"); Element img = null; @@ -904,34 +892,13 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, holder.flavorImageView.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { - /* ArrayList<String> imgsList = new ArrayList<String>(); - - boolean firstFound = false; - - for (Element img : imgs) { - String imgSrc = img.attr("src"); - - if (imgSrcFirst.equals(imgSrc)) - firstFound = true; - - if (firstFound) { - if (imgSrc.indexOf("//") == 0) - imgSrc = "http:" + imgSrc; - - imgsList.add(imgSrc); - } - } */ Intent intent = new Intent(m_activity, ArticleImagesPagerActivity.class); - //intent.putExtra("urls", imgsList); intent.putExtra("firstSrc", imgSrcFirst); intent.putExtra("title", article.title); intent.putExtra("content", article.content); startActivityForResult(intent, 0); - //m_activity.overridePendingTransition(android.R.anim.fade_in, 0); - - } }); |