From 0f7c20d01586615a3b8a3315978b6b2d31126791 Mon Sep 17 00:00:00 2001 From: Yuri Revich Date: Tue, 1 Dec 2015 20:16:55 +0300 Subject: [PATCH] UI improvements --- .../data/source/base/BaseSource.java | 9 +++ .../ui/catalogue/CatalogueAdapter.java | 7 ++ .../drawable-hdpi/ic_action_favorite_blue.png | Bin 0 -> 651 bytes .../ic_play_arrow_white_36dp.png | Bin 0 -> 242 bytes .../drawable-mdpi/ic_action_favorite_blue.png | Bin 0 -> 449 bytes .../ic_play_arrow_white_36dp.png | Bin 0 -> 195 bytes .../ic_action_favorite_blue.png | Bin 0 -> 807 bytes .../ic_play_arrow_white_36dp.png | Bin 0 -> 283 bytes .../ic_action_favorite_blue.png | Bin 0 -> 1186 bytes .../ic_play_arrow_white_36dp.png | Bin 0 -> 390 bytes .../ic_action_favorite_blue.png | Bin 0 -> 1542 bytes .../ic_play_arrow_white_36dp.png | Bin 0 -> 461 bytes .../res/layout/fragment_manga_chapters.xml | 67 ++++++++++++++++-- app/src/main/res/layout/item_catalogue.xml | 38 ++++++---- app/src/main/res/layout/item_chapter.xml | 9 +-- app/src/main/res/menu/chapter_filter.xml | 27 ------- app/src/main/res/values/strings.xml | 6 +- 17 files changed, 113 insertions(+), 50 deletions(-) create mode 100644 app/src/main/res/drawable-hdpi/ic_action_favorite_blue.png create mode 100644 app/src/main/res/drawable-hdpi/ic_play_arrow_white_36dp.png create mode 100644 app/src/main/res/drawable-mdpi/ic_action_favorite_blue.png create mode 100644 app/src/main/res/drawable-mdpi/ic_play_arrow_white_36dp.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_action_favorite_blue.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_play_arrow_white_36dp.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_action_favorite_blue.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_play_arrow_white_36dp.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_action_favorite_blue.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_play_arrow_white_36dp.png delete mode 100644 app/src/main/res/menu/chapter_filter.xml diff --git a/app/src/main/java/eu/kanade/mangafeed/data/source/base/BaseSource.java b/app/src/main/java/eu/kanade/mangafeed/data/source/base/BaseSource.java index 4d65b037f1..5af86ef77a 100644 --- a/app/src/main/java/eu/kanade/mangafeed/data/source/base/BaseSource.java +++ b/app/src/main/java/eu/kanade/mangafeed/data/source/base/BaseSource.java @@ -5,6 +5,7 @@ import com.squareup.okhttp.Response; import org.jsoup.nodes.Document; +import java.net.URI; import java.util.List; import eu.kanade.mangafeed.data.database.models.Chapter; @@ -80,6 +81,14 @@ public abstract class BaseSource { // Get the URL of the first page that contains a source image and the page list protected String overrideChapterUrl(String defaultPageUrl) { + if(defaultPageUrl.startsWith("http")){ + try { + URI uri = new URI(defaultPageUrl); + defaultPageUrl = uri.getPath() + "?" + uri.getQuery(); + }catch (Exception ignored){ + return defaultPageUrl; + } + } return defaultPageUrl; } diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/catalogue/CatalogueAdapter.java b/app/src/main/java/eu/kanade/mangafeed/ui/catalogue/CatalogueAdapter.java index d8380ce2b8..3ba48206d3 100644 --- a/app/src/main/java/eu/kanade/mangafeed/ui/catalogue/CatalogueAdapter.java +++ b/app/src/main/java/eu/kanade/mangafeed/ui/catalogue/CatalogueAdapter.java @@ -49,6 +49,7 @@ public class CatalogueAdapter extends ArrayAdapter { @Bind(R.id.title) TextView title; @Bind(R.id.author) TextView author; @Bind(R.id.thumbnail) ImageView thumbnail; + @Bind(R.id.favorite_sticker) ImageView favorite_sticker; CatalogueFragment fragment; @@ -73,6 +74,12 @@ public class CatalogueAdapter extends ArrayAdapter { } else { thumbnail.setImageResource(android.R.color.transparent); } + + if(manga.favorite){ + favorite_sticker.setVisibility(View.VISIBLE); + }else{ + favorite_sticker.setVisibility(View.INVISIBLE); + } } } } diff --git a/app/src/main/res/drawable-hdpi/ic_action_favorite_blue.png b/app/src/main/res/drawable-hdpi/ic_action_favorite_blue.png new file mode 100644 index 0000000000000000000000000000000000000000..657c4874ed3ea04d6d647b78f140e68ce0f07861 GIT binary patch literal 651 zcmV;60(AX}P)PBR#~x799R_pb<1$!J9r>2HIW$Xh#{S zzXH(eGSIgQKwry1&nf^tEdxzf0GccVjaL8~F9Y2yzS2FLofN}#Q&92uK7qUkn4cJH z9BiB+DTZ6P&;!u<6vOS7pdwD=#y`YN;Y_Fdp*5Js`bEY($IcYP+(H+d&5#ts8yqP1 zE{hfOIM57J3MxoNwrpYDH?C&FH!HYuW>Wh6{tYXVi<3`z|3K9 zis8n& l#a0?wJr7wu50>J8j9-sAmSKRIotyvw002ovPDHLkV1h$t6J!7Y literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-hdpi/ic_play_arrow_white_36dp.png b/app/src/main/res/drawable-hdpi/ic_play_arrow_white_36dp.png new file mode 100644 index 0000000000000000000000000000000000000000..29adeed052eca537465f7919165ad9c04651a07d GIT binary patch literal 242 zcmVJ(02M_98mgdsH#&SQH!_eAzTxG6Z*B5Rn!Cd5DwRs5 zp>SqJ_xt(oF?h1|Fj%xK`-w@(4Q#Of7Nq0?mXZrt sO8$Q=C2#6tAzzt3pTY_&tT6Gs0j^tn*T5_tfdBvi07*qoM6N<$g0Q$?p8x;= literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-mdpi/ic_action_favorite_blue.png b/app/src/main/res/drawable-mdpi/ic_action_favorite_blue.png new file mode 100644 index 0000000000000000000000000000000000000000..60b063257eb3f373d73e98af64229b033029feb1 GIT binary patch literal 449 zcmV;y0Y3hTP)8LCmx*;Cy}RF$@6X>w`|9BJ2UzJW_PkP@NeIk6dh5LjR6fH2C6^`90F@b<-+Dn z0IR@sE@vN5qjFgah>~mp*aG?-#k>J4KrgTk^f+?bz@kyv=>XWu&r8I8tPPACl`9HW zGy;eN^aIJqArFWH_O|8%R09HrT!8z4fYb$O1_YeA02=`Tn;ih7at!PS5Z^W`P1g+o zmVnz|h_`^{yyFwVsN4Z{;Q0sQPe9$Mq@@50IR)l{R}b+QD}GiCxaJ8)|k0wldT1B8K8m#2$kh{y4_Q_k`_IEb*R=ADxY zV6uJDq_v_+Z-tYfR|K!cZcn#wZ_1w*Zwfx3^1JLFH&cH)|4gqfmxMH3rgg?BZ~AgX zO7P4Ssfnoy7dsLbs)cmuJnq)8IA+UruCTi)d!Bot@+%Rg#TB=_7E65dSjDj^h($AU t;!LNFTjoCMkvN)I{QpIN|NiIvIZ;mvueQI+xBzq&gQu&X%Q~loCIB@QN?HH_ literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xhdpi/ic_action_favorite_blue.png b/app/src/main/res/drawable-xhdpi/ic_action_favorite_blue.png new file mode 100644 index 0000000000000000000000000000000000000000..8254e7482b10b6cfa82924ece30c38c491e09b73 GIT binary patch literal 807 zcmV+?1K9kDP)M%b-OBZA63?5fPQOJ#G3Cnr)j3+Y|-4 zC?Sj%A(j2?S`>v2LO+^HS%z7Q5R%iv5#n-x=A1LvJHdIE_s)FZ`^z!1={l}uNNvkB+~_5e*l1F#5uGjSdQx3!WPCjem- z*8#o2QDAk2=8M2h;EY!Cr6A4*;3Cj%z{_a?xC)%rN`9sW2&1?O7zDN?oY^_xkXCZv z#5n-m0O}IP`2g(KN=6a`81v77wJFOp295v$a4kcb&jHP)Af!y$yiPIl#UK)`wGw&{ zY%f+$L5U8%4$Lnb7YA{+0_Ut|!0a~T77KQzwE%1`+?|TeK$nN+0oIu9w_*u(c>KGy z*9M@`V}K?bfO?Ms8f*Y!j{#yEfbSjy%-R5Gj{!z)0ERsV7`6cz@EBmAB7jyh3Ox65 z^tF<)BxfPtbfMUXMFF&uA>e^W=I?1GPpkoqP5{3=Fh39Ul=`wHfL1aN9QOd=m{u~G z7{EZ>0{Uub{)$%8U#>x55u^urS_AWsfYVN%Rl+D=GtphYYB;RL`yYy@67 zx@uOs|L!P!mdR2=%j;npXalCIXnq1{vo)Uxz(9NiT7k(bm>&mPwUSRsIt59yXeIA} z7L(9r+3Yd{L{$O)nTcj#%z^n4mL9Gq(sT~eX4OijfStgr4CY^&k^h`FK#*nVw34r8 zO{6)!J_g#glG!XCf~@nemCT#xj===o?gIO?lFVnVz{LvGN`3fM61bK%=q7O8Xj0w7EPdhfr5^#S_IEwe==vgFzHZ{arrqiL9p^2}oCQR8HlO`a zfBt>_q&-EaGMH-9&z)oSy0%IOibq!5=i7xQ8?znl*Ho#q?l1C zmLwh%pdb>pKr}hv!ldkF|5nzo_`k zc}eR_hl%VF4-<)DT=alRfHl0KMErSu6_?hE1x;YW&OCE+==ML_XMw(D@O1TaS?83{ F1OO`naDo5; literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxhdpi/ic_action_favorite_blue.png b/app/src/main/res/drawable-xxhdpi/ic_action_favorite_blue.png new file mode 100644 index 0000000000000000000000000000000000000000..e4645e9e65b5ffcf8e2eb6c6712f42d0b2e04b59 GIT binary patch literal 1186 zcmV;T1YP@yP)*kcTEG8% z=fBood+qN|h>As#K|CC^XwaUw?HBreh|iVlpOT0*3H2zQ(6`A3M?{9LeZ) zB4$Ldi=)>hjKu)Rc{urf`;fwlnZ>#qjff&`~F@#hTU5j>nG;qWkC<8cq}#JDEBe#PBbl_sIuGC(nF zUdEgphk1(Y(j@HqpVviL9fwg~T93tP5)S4LD5m*)xUdCt;Xs76A$rZlYZ%`GuP<>` zy~8^+kU2YWK?`pfN3jSMypAy~^!frb(j@%eG@v-=yp{8?8cu)4n8vojYaJGjG$&Q+ z=;-D)!GV+71P2yiaZ?!-ht_vZ-mONn_T#+c4YiRnXju=#5f`*eGi6X*A^*_eBCs2^ z7v~JO;yzvmO)mf(I2)H{8DcXF^h`Q43!te50(40hK$8muXmS=n6AJ`rQWikt3j}CF z7C-|90(2+~paTU0^jj7{y9)$pcNRdq3Iu3Z7C>7I1ZZm(K-<*zXL?BXAl96d`@AR{qj$T9PJVXQPcOS)9@& zyo86k2+oQ$39n>nSZTuaeyr*OIL~55*2YcMDE9SNPrw??8>Mj8s?{AG?FgUxxKQg{`6t0XQ3D<_zZ9X(jI{V`|UG8*PNM8Vm9oRxJe- zAr0Yryx0afFW`pgsVe|QNJp>)kF^laqwx{qXsZk=t^8|aS=;TnuLa%Ti@O>q_h9?aX4~CvOnkr7BGKLM**R9_-!?ZBo)o`}H7J@peP`jp6K3h^ITDPLJ%Sew zN-)ay2nrmMU{r+gFes25R0%2tRA~T|lZNXnICQUf!}^^PrypO9kh^Uo!Tu}K=)ynk zt9JdHybX@7YYKd$Bmt)MB#z!=zq~Y2WH*P~#?=XMira1DcbTM2iKBWzwOVlM9gt^R z7ANJlu^XtC3!;Tv?ceOH@%|eU4mPoJi|IrlG4{9p6;8^ES$iB9z6_qOelF{r5}E+~ CQIz8V literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxxhdpi/ic_action_favorite_blue.png b/app/src/main/res/drawable-xxxhdpi/ic_action_favorite_blue.png new file mode 100644 index 0000000000000000000000000000000000000000..76b491e6e1cec974ef2e639fc895df64c8a80ed3 GIT binary patch literal 1542 zcmV+h2Ko7kP);*Nm4}n-p10jBiBwfiMwU8*0>;;!f&;Se} zBS%w;X81-=Ki1KX^T-%4XZPziejlYvIy2B1gGCfb2d zffc|SYvk`LC(%v6%5( z2+Vf>`gw}y0I(QXZjJm?7z2VzcrEZMa8*hp^$_qVu+ka{yNE@AyPZ%MrxedFV1_la zBUb~0O4tLK3p|}*XeVI+ub@*4YmX z>&~`CcSpcv6+ae(fk{56phnd+HdDP!L2gU=u&#U(t%wF#BY#vo0>-HLiRkIHt9lA* zP%RVV#ehI{Ow5%&3>d09CT5rq1Ny0siRtgdfWE3@V$SzrK&UzRZ>X?|FJ`DI+bxh1BRU2T9{6v(fs>GartPwBI z0DyN?&)BT>@}l5)P4$e;N^b^OBR>FJRMT#=#Twb;a|8f9ue$ozDvkjgfiG3tF8SJN z<<|h0m%l*u?UG7YXBd)>0IZRX!27Ckr+i?IY>M*-Nj|pE22QEgXK~VLL#hT?Bm01- zRPVD`=vIrQJpurh0H3So|Fa|MDzTa)N>>nN0-sms;vWY_B)R*m839-$dx05x^D{lE z_*EI;OjrfHT*u-swMO2krU4%*hY!{1^WZb!!D<`vbx`{f_aGWvC*to1uIcQ&a@HdN zYvd5oiN$)zplAUm`Viln0nUWoL!7?t`L}NjcoPV zsQ0{oYvfH}Rt*|(zcsSPccZBsys$==0*}{__;ak0SJG%WwUaN_$RgmG8W8_UYh+1U zji-I|=n0~Iqq6cWDQ`SV+C6Xul$wBtOD6tvz+-Vft`uUiA~DMv$$V#5^6G6+ z38w+e^NhjK4%};vtjOcyxpqFNgj0x8`0}cF)e78UjjYQ{gS_uPf=W1nsM=xH1^4~} zZm~u-=h^?<4R9umBFZUM zaCu6X*yF@MP?SCwstk=w`Wj7??&6!Bz~~~0UpNDt2?v4eh)US|Vl!~PHFBhA{Vil6 zCTpaHs4TLN<>6aI-*Ar=v9E=#gk_DK1a1SCRng2#z@64eVUvjqU5d;aX#?&f*`EA- z;DKsN%h%m1sEZZSOrk8ju3~NnW?Cc5%FwUU7~o8pOjM=3cPIbll-pWZUzR?V$^d7= zSfX>w7j*bl3vjbFvaL-0DV+h%gb~1pXS_8Z1jbtO@5{D_jd s2?K*lI8c>P6h%=KMNt$*QIxXqFCpfFK%_N!{r~^~07*qoM6N<$g5%MyiO9^|{TyY%sUrH;mw9Rd=LHutq1ECuvCCvX3G-WUyRuAF)L z=AXNp|MkzPod4UBc}q#z?Q^CJ9zU;^|7`KRf$#jkxaVvagf8UG|7;`P@a_D=d(Xr! zoVVQ9VZWfqenB501XPBM2&zX@Ao_^^g!h}1-e=@r3LF1d_$-XXz6+p4;3$0!>08tq4uJx_E zBNzhMWhb2Wg^F?Q^1c@%%<zopr02sN!rT_o{ literal 0 HcmV?d00001 diff --git a/app/src/main/res/layout/fragment_manga_chapters.xml b/app/src/main/res/layout/fragment_manga_chapters.xml index ae5666a547..35569d797c 100644 --- a/app/src/main/res/layout/fragment_manga_chapters.xml +++ b/app/src/main/res/layout/fragment_manga_chapters.xml @@ -19,6 +19,7 @@ android:layout_height="fill_parent" android:layout_marginLeft="16dp" android:layout_marginRight="16dp" + android:descendantFocusability="blocksDescendants" tools:listitem="@layout/item_chapter"> @@ -37,10 +38,68 @@ android:theme="@style/ThemeOverlay.AppTheme.Dark" app:popupTheme="@style/AppTheme.Popup"> - + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/item_catalogue.xml b/app/src/main/res/layout/item_catalogue.xml index 6e34fa3b64..7273d1048d 100644 --- a/app/src/main/res/layout/item_catalogue.xml +++ b/app/src/main/res/layout/item_catalogue.xml @@ -1,10 +1,10 @@ + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@drawable/card_background" + android:orientation="vertical"> + android:visibility="gone"/> + + + android:layout_alignStart="@+id/unreadText" + android:background="@color/white" + android:orientation="vertical"> + android:textStyle="bold" + tools:text="Sample name"/> + android:textSize="13sp" + tools:text="Sample name"/> diff --git a/app/src/main/res/layout/item_chapter.xml b/app/src/main/res/layout/item_chapter.xml index 9ea7672838..5f02487ed9 100644 --- a/app/src/main/res/layout/item_chapter.xml +++ b/app/src/main/res/layout/item_chapter.xml @@ -64,7 +64,8 @@ android:layout_above="@+id/relativeLayout" android:layout_alignParentRight="true" android:layout_alignParentEnd="true" - android:layout_alignParentTop="true"/> + android:layout_alignParentTop="true" + android:layout_marginRight="30dp"/> + android:paddingBottom="18dp" + android:layout_alignParentRight="true" + android:layout_alignParentEnd="true"> - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 19994301ce..0787c78d25 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -21,10 +21,12 @@ Edit Sort up Sort down - Show unread + Unread + Downloaded + Next unread - Ok + OK Cancel