diff --git a/res/anim/slide_in_left.xml b/res/anim/slide_in_left.xml
index 11991019..b51d378c 100644
--- a/res/anim/slide_in_left.xml
+++ b/res/anim/slide_in_left.xml
@@ -3,7 +3,7 @@
\ No newline at end of file
diff --git a/res/anim/slide_out_right.xml b/res/anim/slide_out_right.xml
index cc43178e..d7854d63 100644
--- a/res/anim/slide_out_right.xml
+++ b/res/anim/slide_out_right.xml
@@ -1,11 +1,9 @@
-
-
-
-
+
+
\ No newline at end of file
diff --git a/res/drawable-hdpi/mark_set.png b/res/drawable-hdpi/mark_set.png
deleted file mode 100644
index bd7c3755..00000000
Binary files a/res/drawable-hdpi/mark_set.png and /dev/null differ
diff --git a/res/drawable-hdpi/mark_unset.png b/res/drawable-hdpi/mark_unset.png
deleted file mode 100644
index cb29576c..00000000
Binary files a/res/drawable-hdpi/mark_unset.png and /dev/null differ
diff --git a/res/drawable/mark_set.svg b/res/drawable/mark_set.svg
deleted file mode 100644
index 5f55e61a..00000000
--- a/res/drawable/mark_set.svg
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
-
-
diff --git a/res/drawable/mark_unset.svg b/res/drawable/mark_unset.svg
deleted file mode 100644
index 0d46aeb0..00000000
--- a/res/drawable/mark_unset.svg
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
-
-
diff --git a/res/layout/article_fragment.xml b/res/layout/article_fragment.xml
index 4610d207..de8caed0 100644
--- a/res/layout/article_fragment.xml
+++ b/res/layout/article_fragment.xml
@@ -1,6 +1,6 @@
-
+
-
+
diff --git a/res/layout/headlines_row_selected.xml b/res/layout/headlines_row_selected.xml
index 81760bc4..ff755483 100644
--- a/res/layout/headlines_row_selected.xml
+++ b/res/layout/headlines_row_selected.xml
@@ -2,9 +2,9 @@
-
+ android:background="?headlineSelectedBackground"
+ android:id="@+id/headlines_row" android:orientation="horizontal" android:layout_height="wrap_content">
+
diff --git a/res/layout/headlines_row_unread.xml b/res/layout/headlines_row_unread.xml
index e139cfad..f6fef283 100644
--- a/res/layout/headlines_row_unread.xml
+++ b/res/layout/headlines_row_unread.xml
@@ -2,9 +2,9 @@
-
+ android:background="?headlineUnreadBackground"
+ android:id="@+id/headlines_row" android:orientation="horizontal" android:layout_height="wrap_content">
+
diff --git a/res/layout/main.xml b/res/layout/main.xml
index ee05766b..1509b309 100644
--- a/res/layout/main.xml
+++ b/res/layout/main.xml
@@ -1,16 +1,16 @@
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index 9a6bbea0..6ed260dd 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -6,6 +6,10 @@
-
+
+
+
+
+
\ No newline at end of file
diff --git a/res/values/style.xml b/res/values/style.xml
index 69c2e1d6..ba524ccc 100644
--- a/res/values/style.xml
+++ b/res/values/style.xml
@@ -6,8 +6,12 @@
- #ffffff
- #96c5ff
- #ffffff
- - #fff7d5
+ - #fff7d5
+ - #ffffff
- #96C5FF
+ - #96C5FF
+ - #909090
+ - #DBC981
\ No newline at end of file
diff --git a/src/org/fox/ttrss/Article.java b/src/org/fox/ttrss/Article.java
index 0e156af8..c4989d7a 100644
--- a/src/org/fox/ttrss/Article.java
+++ b/src/org/fox/ttrss/Article.java
@@ -14,4 +14,5 @@ public class Article {
int feed_id;
List tags;
String content;
+ boolean _selected;
}
diff --git a/src/org/fox/ttrss/HeadlinesFragment.java b/src/org/fox/ttrss/HeadlinesFragment.java
index 00e1448e..953bed54 100644
--- a/src/org/fox/ttrss/HeadlinesFragment.java
+++ b/src/org/fox/ttrss/HeadlinesFragment.java
@@ -16,12 +16,16 @@ import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
+import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
+import android.widget.CheckBox;
+import android.widget.CompoundButton;
+import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.ListView;
import android.widget.TextView;
@@ -210,7 +214,20 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener {
public static final int VIEW_SELECTED = 2;
public static final int VIEW_COUNT = VIEW_SELECTED+1;
+
+ private ArrayList m_selectedArticles = new ArrayList();
+ /* private class ArticleCheckListener implements OnCheckedChangeListener {
+
+ @Override
+ public void onCheckedChanged(CompoundButton buttonView,
+ boolean isChecked) {
+
+ Log.d(TAG, "onCheckedChanged: " + buttonView + "/" + getContext());
+ }
+
+ } */
+
public ArticleListAdapter(Context context, int textViewResourceId, ArrayList items) {
super(context, textViewResourceId, items);
this.items = items;
@@ -238,8 +255,8 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener {
View v = convertView;
- Article article = items.get(position);
-
+ final Article article = items.get(position);
+
if (v == null) {
int layoutId = R.layout.headlines_row;
@@ -281,6 +298,28 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener {
dv.setText(df.format(d));
}
+ CheckBox cb = (CheckBox) v.findViewById(R.id.selected);
+
+ if (cb != null) {
+ cb.setChecked(m_selectedArticles.contains(article));
+
+ cb.setOnCheckedChangeListener(new OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(CompoundButton buttonView,
+ boolean isChecked) {
+
+ if (isChecked) {
+ m_selectedArticles.add(article);
+ } else {
+ m_selectedArticles.remove(article);
+ }
+
+ Log.d(TAG, "num selected: " + m_selectedArticles.size());
+
+ }
+ });
+ }
+
return v;
}
}
diff --git a/src/org/fox/ttrss/MainActivity.java b/src/org/fox/ttrss/MainActivity.java
index 35309338..44625ad4 100644
--- a/src/org/fox/ttrss/MainActivity.java
+++ b/src/org/fox/ttrss/MainActivity.java
@@ -103,12 +103,9 @@ public class MainActivity extends Activity implements FeedsFragment.OnFeedSelect
ft.replace(R.id.feeds_fragment, new FeedsFragment());
ft.replace(R.id.headlines_fragment, hf);
ft.replace(R.id.article_fragment, af);
- //ft.hide(hf);
- //ft.hide(af);
ft.commit();
findViewById(R.id.article_fragment).setVisibility(View.GONE);
- //findViewById(R.id.headlines_fragment).setVisibility(View.GONE);
LoginRequest ar = new LoginRequest();
ar.setApi(m_prefs.getString("ttrss_url", null));
@@ -232,9 +229,6 @@ public class MainActivity extends Activity implements FeedsFragment.OnFeedSelect
setLoadingStatus(R.string.loading_message, true);
- //FragmentManager fm = getFragmentManager();
- //FeedsFragment ff = (FeedsFragment) fm.findFragmentById(R.id.feeds_fragment);
-
ViewFlipper vf = (ViewFlipper) findViewById(R.id.main_flipper);
if (vf != null) {
@@ -245,6 +239,7 @@ public class MainActivity extends Activity implements FeedsFragment.OnFeedSelect
FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.replace(R.id.feeds_fragment, frag);
+ ft.show(frag);
ft.commit();
if (m_refreshTask != null) {
@@ -293,7 +288,6 @@ public class MainActivity extends Activity implements FeedsFragment.OnFeedSelect
m_activeFeed = feed;
HeadlinesFragment hf = new HeadlinesFragment();
- //hf.initialize(m_sessionId, feed.id, m_prefs);
FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.setCustomAnimations(android.R.animator.fade_in, android.R.animator.fade_out);
@@ -301,8 +295,6 @@ public class MainActivity extends Activity implements FeedsFragment.OnFeedSelect
ft.replace(R.id.headlines_fragment, hf);
ft.addToBackStack(null);
ft.commit();
-
- findViewById(R.id.headlines_fragment).setVisibility(View.VISIBLE);
}
public Article getSelectedArticle() {
@@ -319,13 +311,14 @@ public class MainActivity extends Activity implements FeedsFragment.OnFeedSelect
FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.setCustomAnimations(android.R.animator.fade_in, android.R.animator.fade_out);
+ //ft.setCustomAnimations(R.anim.slide_in_left, R.anim.slide_out_right);
ft.show(getFragmentManager().findFragmentById(R.id.article_fragment));
- //ft.hide(getFragmentManager().findFragmentById(R.id.feeds_fragment));
ft.replace(R.id.article_fragment, frag);
ft.addToBackStack(null);
ft.commit();
findViewById(R.id.article_fragment).setVisibility(View.VISIBLE);
+
}
public Feed getActiveFeed() {