diff options
author | Andrew Dolgov <[email protected]> | 2015-06-02 00:00:14 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2015-06-02 00:00:14 +0300 |
commit | 1281e7dd42e5ea6f534dc4b343f4449b5871c13c (patch) | |
tree | 1ef9957363cc633f1e2d27faa818381d8540c342 /org.fox.ttrss/src/main/java | |
parent | 56cb9c1eabef86f3bd2f0d0053fcbf51876244e5 (diff) |
move share button to article fragment body; reinstate dreaded mark unread back to the freed space
Diffstat (limited to 'org.fox.ttrss/src/main/java')
5 files changed, 31 insertions, 8 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java index 58ffaa7a..05ee4896 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java @@ -12,12 +12,10 @@ import android.preference.PreferenceManager; import android.support.v4.app.Fragment; import android.support.v7.app.ActionBar; import android.text.Html; -import android.util.Log; import android.util.TypedValue; import android.view.ContextMenu; import android.view.ContextMenu.ContextMenuInfo; import android.view.LayoutInflater; -import android.view.MotionEvent; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; @@ -27,6 +25,7 @@ import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebView.HitTestResult; import android.widget.FrameLayout; +import android.widget.ImageView; import android.widget.ScrollView; import android.widget.TextView; @@ -264,6 +263,17 @@ public class ArticleFragment extends Fragment { registerForContextMenu(title); } + ImageView share = (ImageView)view.findViewById(R.id.share); + + if (share != null) { + share.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + m_activity.shareArticle(m_article); + } + }); + } + TextView comments = (TextView)view.findViewById(R.id.comments); if (comments != null) { diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java index 765b64fc..3dcb6ff9 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java @@ -907,11 +907,11 @@ public class OnlineActivity extends CommonActivity { dialog.show(); } return true; - case R.id.share_article: + /* case R.id.share_article: if (ap != null) { shareArticle(ap.getSelectedArticle()); } - return true; + return true; */ case R.id.toggle_marked: if (ap != null & ap.getSelectedArticle() != null) { Article a = ap.getSelectedArticle(); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineActivity.java index a7bcacb2..aa61a496 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineActivity.java @@ -440,13 +440,13 @@ public class OfflineActivity extends CommonActivity { } } return true; - case R.id.share_article: + /* case R.id.share_article: if (true) { int articleId = oap.getSelectedArticleId(); shareArticle(articleId); } - return true; + return true; */ case R.id.toggle_marked: if (oap != null) { int articleId = oap.getSelectedArticleId(); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticleFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticleFragment.java index 0211167f..c0a101c7 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticleFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticleFragment.java @@ -23,6 +23,7 @@ import android.view.ViewGroup; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebView.HitTestResult; +import android.widget.ImageView; import android.widget.ScrollView; import android.widget.TextView; @@ -226,7 +227,19 @@ public class OfflineArticleFragment extends Fragment { registerForContextMenu(title); } - + + ImageView share = (ImageView)view.findViewById(R.id.share); + + if (share != null) { + share.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + m_activity.shareArticle(m_articleId); + } + }); + } + + TextView comments = (TextView)view.findViewById(R.id.comments); if (comments != null) { diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java index a32a55a5..37cf627a 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java @@ -171,7 +171,7 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis } refresh(); return true; - case R.id.share_article: + case R.id.headlines_share_article: if (true) { int articleId = getArticleIdAtPosition(info.position); m_activity.shareArticle(articleId); |