From 45b7bff4231a225b3d5ebc54192f2a2f16c6542b Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 27 Nov 2011 15:47:38 +0300 Subject: [PATCH] implement published articles --- res/drawable-hdpi/ic_menu_rss.png | Bin 0 -> 1913 bytes res/drawable-hdpi/ic_rss.png | Bin 0 -> 1709 bytes res/drawable-hdpi/ic_rss_bw.png | Bin 0 -> 1264 bytes res/drawable-hdpi/rss.png | Bin 3015 -> 0 bytes res/drawable-hdpi/rss_bw.png | Bin 2506 -> 0 bytes res/layout/headlines_row.xml | 25 +++++- res/layout/headlines_row_selected.xml | 107 +++++++++++++++++++---- res/layout/headlines_row_unread.xml | 25 +++++- res/menu/main_menu.xml | 13 +-- src/org/fox/ttrss/HeadlinesFragment.java | 17 ++++ 10 files changed, 161 insertions(+), 26 deletions(-) create mode 100644 res/drawable-hdpi/ic_menu_rss.png create mode 100644 res/drawable-hdpi/ic_rss.png create mode 100644 res/drawable-hdpi/ic_rss_bw.png delete mode 100644 res/drawable-hdpi/rss.png delete mode 100644 res/drawable-hdpi/rss_bw.png diff --git a/res/drawable-hdpi/ic_menu_rss.png b/res/drawable-hdpi/ic_menu_rss.png new file mode 100644 index 0000000000000000000000000000000000000000..431921abfea8f86c667b3ce5e8b674b03d4c93b4 GIT binary patch literal 1913 zcmV-<2Zs2GP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5&!@T5&_cPe*6Fc02y>eSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+j*J^5N%%w}0WL~~}*<87DMdsD3 zSIxC+*Gz3~t<1W*I+@q6UpF^y+%Wa^_2%ZyoBrfIzH{!}Im6m8z!HGu4etpm^YZd` zSfsqX+~nuy%PcG`lv!L{Y)VQ>%-OSNRqOTEPKkDyR#4>((vP(9j?c zaOTXJ9gn5lWBOAdF)P$uKp8+h(750LbKzV?Rn1s%3aF6Y`r9zU7QyaFi*iLpMLt|X zLBRp#%F4?AbLDKf#>Pfb5`|%c4FyZ_IZS3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A@HX0F)00000NkvXXu0mjfIA4q^ literal 0 HcmV?d00001 diff --git a/res/drawable-hdpi/ic_rss.png b/res/drawable-hdpi/ic_rss.png new file mode 100644 index 0000000000000000000000000000000000000000..bd03379a1434dc55653b7a70870ff6de0c47768e GIT binary patch literal 1709 zcmV;e22%NnP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5&!@T5&_cPe*6Fc02y>eSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+kEN4#@n>r|;`K)HgxvO$$?f*-GvU}`fvr3PgXQV4 zS7yLbm4TrxnQ(oQ3HP=v3|E^mveOLD?reBJ%Z6`n4*dIa5IB&F;6V#Q^%jga&}p23 z(WXMU_ZFgk?d0|w#S?P`7^CxrV_QD@KTM^Q4BPq?0!)RYG7ZkEGy+T~zzhs;%fLu= zCOo^c;N6o2UyT|5S~CLsvk5F4p}HIb%R#s?7vZK{NQdb(&w#If7K7duOqnt>i-VP= z!oJB&%(CFz%~&C9+LGYq^>rM-oA|B&yDc4 zu7S7iMJl8DKQj|xbeJtO57ZTio|;%7+%v6=u9|sJLSBr06rTf;_8$>CTMGYy8BZ+Z zI4~-?uhs(V#&noijVutYXYSfZ1IGUVSwhry3!~q>`^cWf%gD^?i5Y`Yuf2P+g{lRh zP-9FW?iwoTgR6)R_dyA`0XaO5t+-HR$al^n+)@-5hyjetsDY8lMs^V3rWhbg|50l6 z)xUti=@kfHZ9>%1K_JobrFOO>^3@{IFGJ6CV8h#aq|9QLP5g!D?BCQFY$!zdQW>Iy zx0#*+Sn&=(KD$H}h`x->jK;`KBjx&-j6wtCq1NWiQd2)vfPc^c8Xfoxej0K%22n<0#$XPzIY-PY1)#92n1lG6=M$iByime^ z$hS^GI#DDXg!?6b`!*E6-SD&FwiDyP>@<3VGBV-z?^n=%0b>fL&aQ7ksW?hj4>&g^ZE2xJIC^ogWJde+T;<|4f>OnH=LwTYK z{-(J!3eE%*TL+w5a)dyJTS^V~=Q_DnfORcP!owBG2|zU#sGC}9T|f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C^~xDa4chmzqw zt}X6M0PTt~c9aa=XlnWl>!X#ql0(7l9qdbR`qoh&P0_?1>4RfG?}N*31pCAwXvUuI asQ(`j?YurbETyIZ0000_`&; literal 0 HcmV?d00001 diff --git a/res/drawable-hdpi/rss.png b/res/drawable-hdpi/rss.png deleted file mode 100644 index 240e45e3cb6f4acb88781b423db7d0a26255453b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3015 zcmV;&3pn(NP)}XT2LA-f5%;gWDk5EE#fwvZs!P9>;} zRIuL0skT!UEB2z!IPjr$rf8w+C|_Ec!4DnBG187=r&XpUai+HA;&ik^06PUC5zEFv z0&LR2F5&F%Ip^(%y=1dFmrV#L^qI+=%kFv4`Th5OpXdL+nIrIs{i~+e8K(J!fCa!( zukU|BVyA=yQsuS9EvFB-eNi}l@ZqW{3lx)I1516uAmOSAp-2Q@Fn})@9QP+4k4Wn} zX+24zua9`FkF>4>?6g$YI0<1Zz@7)Dt`}1NA{Z*Cs}X@n5@ z7K8wV$ZoTZ+MXLa&K!!N>kHe$?tIbxvh5XYK&VI&Kngz+l|-zMSTu^BIENHs!?jyZ zt#=h*|Eh@-O;dXn#GO@jwN%y4#!9ErPxX^J6GtdR50eMWK`2E)!@e_g?DkpVaiNgI z+Xa#PutfEcSoIVZx zR6qLZzD(nn5q#$3^C&{cBt%v1Y=Y(G^c?B9(=@~Y@KBCf&F$=YVCs4SKc4ZW`Gg}8 z276AC>L0i);d8?;1DHYx6K%poG{2ujU*Cd97KFshAD!Eo9|GBgw?EhI6J0$R@x)~h zpFajns|T7A|f%eLw+FOn#k7c(c(@^byg$61n=E~I;Z)P z!RPb92mw6cbG>7{LxijG-?|b19WS9&R9_l+%SM2F_jiFePaeUDwqu^`7*#F`^`uW^c{U+A+HY#-Ub{0z@#3@9JjMxy@*Eo5!Ss(y#(wq#mQ~ zaY!e|9bP!)fYHL+9;XtdKW-(t{ih86W*MpXUPQ)wMlFJf)T6E3jF?tm=(*5${!TZl+K z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#AZDH zMP2Fwrq{&AGuzvotNvyKv1pY3?&CWZ2?ye_K0rZ=vMU~b!t_cMO(h=dL&54$R6!`>TI)$|(EfSw~AtJ2A2=EX^^3}KuFYw)sypD?|Win`pG z&%HQFi>jvA6f)aR^6XxnMOt9!NF#|f(?d73iXK!JJ!qj2`3H6QZuWdG|4?uZGP{yv z2cJE!1~vSZzAhs<8pp|UQ^Xg*)s1K{{xVo#8fvPPU`>w002ov JPDHLkV1m)$@_zsT diff --git a/res/drawable-hdpi/rss_bw.png b/res/drawable-hdpi/rss_bw.png deleted file mode 100644 index 1e698ec0894dbba3d0744da7952a9df51481e244..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2506 zcmV;*2{rbKP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5&!@T5&_cPe*6Fc02y>eSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+lb?0x$oCxE<8$wcc9XSaQEofmH{+Ra#`c&o z%9t==!rx=Zj_nwleM8fXkjb-lj2}P#9}Qpdbv`Vhr%ah*7A{<9y1Kf|wr$(Y-o1PO zlapuT8F^Noxn``s(nO3KH?EZrx3;#LwQJW}use6|G#fW=G^X3ZKq`5bfIx^-s#`t^45a2qyk$R^*nY11aNdGqFMZrQTMFt={qYRQ(l zefxI9+_7VaeHM4_+O^9tckkY9_Uze{8He8o16aVMdc%;r|26dHZa%Ph@!||P0O!x2 zZx$?AVA<{H=rD^GEwZz-v(vtJ$&w{z>C&ZU*|KE?f_&uoh!H|uQiKd4#3jNdLkNHb zrt76VU(Fl3!5Ab0@DnFav=-$HV6eTteZ+ys3tUeSEMObL*ySZa+#b*{2nnMFym$kc zyvv~$@G`f@jYkXkef#zqrjQ`Zp)N2I?Fkm6&Fx+AZh))>#y-0g#QL~Ck##g$9`FQ7 z@DUrp%2Gh%j6pDvGqJuF?N6LIVXj`iYUkm@ht2-|`%OMn2#SnRzl44=g+g+zH0FFDj=gk0BNv_dY*uG z@#01E^5x5>$oTy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&QvwQwtm3$3`XPCu^NapOCIhDtJT=JHC*>l<(nB(i~HCy-(W{>GPA5B{J## zLqHxp1js27A;2D$73o^_fuu(I_9-Q8EYF855BSNGCtHQ;9+k}wOG83RRaeCpbxQYE ztLkE@&S!bRi?OrA(zR=G*`a~qIFnPhZ?Dz!F_9B;d%#bcG|8&ny5sWP8E`L52mw`| z$$@|}ef#0CJm6(Rr0&9mduc-Y<*2ZdP%>!O~0NyJzkRX?)Wbb^m zfhX_ - + + + + + + + + + \ No newline at end of file diff --git a/res/layout/headlines_row_selected.xml b/res/layout/headlines_row_selected.xml index 92740519..fa7e7ad0 100644 --- a/res/layout/headlines_row_selected.xml +++ b/res/layout/headlines_row_selected.xml @@ -1,24 +1,95 @@ - - - - - - - - - - - + android:gravity="center_vertical" + android:orientation="horizontal" > + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/layout/headlines_row_unread.xml b/res/layout/headlines_row_unread.xml index 12d089eb..e0aa00cf 100644 --- a/res/layout/headlines_row_unread.xml +++ b/res/layout/headlines_row_unread.xml @@ -18,7 +18,30 @@ android:layout_width="wrap_content" android:gravity="center" android:padding="3dip" android:layout_height="wrap_content" android:orientation="vertical"> - + + + + + + + + + \ No newline at end of file diff --git a/res/menu/main_menu.xml b/res/menu/main_menu.xml index 6fc1ce6c..216b24c5 100644 --- a/res/menu/main_menu.xml +++ b/res/menu/main_menu.xml @@ -1,6 +1,11 @@ + + - - - diff --git a/src/org/fox/ttrss/HeadlinesFragment.java b/src/org/fox/ttrss/HeadlinesFragment.java index 1e7e9ef4..b31b7753 100644 --- a/src/org/fox/ttrss/HeadlinesFragment.java +++ b/src/org/fox/ttrss/HeadlinesFragment.java @@ -332,6 +332,23 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener { }); } + ImageView published = (ImageView)v.findViewById(R.id.published); + + if (published != null) { + published.setImageResource(article.published ? R.drawable.ic_rss : R.drawable.ic_rss_bw); + + published.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View v) { + article.published = !article.published; + m_adapter.notifyDataSetChanged(); + + m_articleOps.saveArticlePublished(article); + } + }); + } + TextView te = (TextView)v.findViewById(R.id.excerpt); if (te != null) {