From f6452789b62857c1e0a08a6321d0db4d4ad7bc84 Mon Sep 17 00:00:00 2001 From: Apostolof Date: Sun, 22 Jan 2017 00:57:47 +0200 Subject: [PATCH] Receiver and other fixes --- VERSION | 2 +- app/build.gradle | 4 ++-- .../downloads/DownloadsActivity.java | 2 +- .../gr/thmmy/mthmmy/receiver/Receiver.java | 22 ++++++++---------- .../res/drawable-hdpi/ic_remove_circle.png | Bin 584 -> 392 bytes .../res/drawable-mdpi/ic_remove_circle.png | Bin 392 -> 270 bytes .../res/drawable-xhdpi/ic_remove_circle.png | Bin 746 -> 509 bytes .../res/drawable-xxhdpi/ic_remove_circle.png | Bin 1219 -> 746 bytes .../res/drawable-xxxhdpi/ic_remove_circle.png | Bin 1608 -> 1060 bytes .../main/res/layout/activity_bookmark_row.xml | 7 +++--- 10 files changed, 18 insertions(+), 19 deletions(-) diff --git a/VERSION b/VERSION index 7dea76ed..9084fa2f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.1 +1.1.0 diff --git a/app/build.gradle b/app/build.gradle index f09859fb..05e1d905 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { applicationId "gr.thmmy.mthmmy" minSdkVersion 19 targetSdkVersion 25 - versionCode 2 - versionName "1.0.1" + versionCode 3 + versionName "1.1.0" archivesBaseName = "mTHMMY-v$versionName" } diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/downloads/DownloadsActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/downloads/DownloadsActivity.java index c81c98ec..8d844e67 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/downloads/DownloadsActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/downloads/DownloadsActivity.java @@ -272,7 +272,7 @@ public class DownloadsActivity extends BaseActivity implements DownloadsAdapter. rows.select("div.smalltext:not(:has(a))").text(), rows.select("span:not(:has(a))").first().text(), false, - rows.select("span:has(a)").first().html())); + rows.select("span:has(a)").first().text())); } } } diff --git a/app/src/main/java/gr/thmmy/mthmmy/receiver/Receiver.java b/app/src/main/java/gr/thmmy/mthmmy/receiver/Receiver.java index 42a867ea..3f76766e 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/receiver/Receiver.java +++ b/app/src/main/java/gr/thmmy/mthmmy/receiver/Receiver.java @@ -16,6 +16,7 @@ import java.io.File; import gr.thmmy.mthmmy.R; import mthmmy.utils.Report; +import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK; import static gr.thmmy.mthmmy.services.DownloadService.ACTION_DOWNLOAD; import static gr.thmmy.mthmmy.services.DownloadService.COMPLETED; import static gr.thmmy.mthmmy.services.DownloadService.EXTRA_DOWNLOAD_ID; @@ -61,22 +62,19 @@ public class Receiver extends BroadcastReceiver { File file = new File(SAVE_DIR, fileName); if (file.exists()) { -// String type = "application/" + extension; - String type = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension); + String type = MimeTypeMap.getSingleton().getMimeTypeFromExtension( + MimeTypeMap.getFileExtensionFromUrl(file.getAbsolutePath())); - Uri pathUri = Uri.fromFile(file); - Intent chooserIntent = new Intent(Intent.ACTION_VIEW); - intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - Intent chooser = Intent.createChooser(chooserIntent, "Open With..."); - intent.setDataAndType(pathUri, type); + Intent chooser = new Intent(); + chooser.setAction(android.content.Intent.ACTION_VIEW); + chooser.setDataAndType(Uri.fromFile(file), type); + chooser.setFlags(FLAG_ACTIVITY_NEW_TASK); + chooser.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, chooser, PendingIntent.FLAG_CANCEL_CURRENT); builder.setContentIntent(pendingIntent); - } - else - Report.w(TAG,"File doesn't exist."); - - + } else + Report.w(TAG, "File doesn't exist."); } Notification notification = builder.build(); notificationManager.notify(id, notification); diff --git a/app/src/main/res/drawable-hdpi/ic_remove_circle.png b/app/src/main/res/drawable-hdpi/ic_remove_circle.png index 10ab64f69243598d946ab6f49feeff4cc06e4603..e4cc857927bebe83c3fec9039d5d1b68d161cd6e 100644 GIT binary patch literal 392 zcmV;30eAk1P)#1v^GAyoABZr+ zr@oor8?DiHW3>tEFQh@J4@`gJtaj6tu@Fn5>cURfWV39(1c!WX&GK@u) zP+xGLktHi{o@JqlK^exF5{erTiYTE|142hih+17K=29I}V%{qy^dtrb5^Y65%=`E% zq1Jt}))n=t0ih)&8Lm;`jUly{!}wEM`;Ip;7o9znZH|2Dt|WE*mg#kLsv}f m2VNgB4&3sl_y0filR_`p6Q>$Fohupu00001bhMC8*uKq1ulV%YGPsF9GFmuY+?-5fRJpl67a%7Xq{)EC_^j(^aTj5(*xpu zi5&p%K1dPXfP!eTBVgg96yXD~MTt35O9@hhPZl|r;kS?|wfg1qyu=bd|ED%Fr70*h zVts|AR;%S!VkHHo2*+N6xmeoLtkYW+*Xe4&Q zA~w=UY)C5>queB_g0swv(1_(Uk|LyO#3~FAoB;zt%oyIIOe5A{c;G-_Gibo@9(5YA zmWE=@e=TP0P&Br97+db6rcTfnww-kmyD@bU+-4EWXe74By3u^lKpF literal 392 zcmV;30eAk1P)#1v^GAyoABZr+ zr@oor8?DiHW3>tEFQh@J4@`gJtaj6tu@Fn5>cURfWV39(1c!WX&GK@u) zP+xGLktHi{o@JqlK^exF5{erTiYTE|142hih+17K=29I}V%{qy^dtrb5^Y65%=`E% zq1Jt}))n=t0ih)&8Lm;`jUly{!}wEM`;Ip;7o9znZH|2Dt|WE*mg#kLsv}f m2VNgB4&3sl_y0filR_`p6Q>$Fohupu0000aa@BpB+5JN;;8xk5r;&TvQK!S~U+IloNo6IGI zL^Hd$f9B#9UqZM5zwd6@-I?_+p6C)ES14sZs$p%{4_}!&o5t7XqmtLaF}~r+yl3GZtu31Zs>0E~%Tj6~pka)XkjWmZ3mbrXDCW zD`>ufQ`wSo#7JPEQWKXX7B!Q+1IMaum4JajBWYvHx=*;=p=Cd9C8930{+?`nt zf2g~??pqp8L&}{`a=;N_yU)aI)39~KRK#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<>6DEm(}h zniBykH~@6b3ltVyU^k^VsEY?^(g7USI1f?BQZ^YlUSyDhrZ_`gLSpb3Y7#(03bX}P2M zg4wMDKzWfB#d!ySWie8$h@I0qsiwauhqA5 zmA7Qpmq+#kynNUZx%ElqO}%NHLsog=nUe8bWN+l9aMV`DqFWW$bCNQjgQ^|RUYsVq z#(i*+1@=5Hlg3mWdl1{hT{sh%#mTOF-1>b+yb69@!k=y7zSStysrq>7AD9pj0TB=Z c5sq9juej#M1VUW1PB8V1|ST= z0E7VugD?PL$;c$ii6)|p7$;_l7_mm|5PO;({jr$-oN@g%jruh*A&j4NqLSz&X0(KT zCe&+96CFf_{$3E~fpbJHF{J-P_6_lq7$j=+&j4Xb$S2x~MT3%#V}WQRE<)H*t`U7i z+yYUD*(Q34D-bp|kVo_|zb{Gghv+79!zfI>KeQ054v0F;5286t!itC~2Spubk|+$i zF!h(Y6#!WYHi?EH3dpUs`4#!P1t>6BZRUNtV>Cgkab(H$?b=nRf)@^M1k=Yvi^HdyKJkltdLZLUaH6Q zHVPYooD=WUtP<7?DM_ifMOab5mYbybP2BWbm|Asz4;iOs!f#SS7+00=Lj!?xZQ5^Rwn4=LjE)84vj8?uu3CXDva}Kh*KY1)Ld6v@(|zWAo<39#Xfs z^Ofp9S8Z|YA(r)vxF?aVuLAg>&?S9I7XdCV&h4Fo4R49z=o`Bo6uJ+bn1AE&z3ZK zwt8tr3zM*e9mdtVTsGM^vZ8z4t1QjMT44uKlO1YbcePdc6mxrBTo2Pl^~g_}?RmJi zsYyhSmX_)vZdC+~>gmvVy>_W2>}ulrWAplRM)kCQot`PqaP9YZQCO%!2oMG!3_uu! h0SE&S24TP~e*rfh>J5d_m<9j<002ovPDHLkV1foaC13ym diff --git a/app/src/main/res/drawable-xxxhdpi/ic_remove_circle.png b/app/src/main/res/drawable-xxxhdpi/ic_remove_circle.png index 2f59367ec80dec360846e7af188671772f2009c7..5bfad8b3106e5992d774be3dc407d663a529e55c 100644 GIT binary patch literal 1060 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X~=OUTbyTAq3^#y#=q-U&VFyS@Q0*nK~y8uyI)uMPP>bI$*rL;icX zX?J}Q+p?$v0RjO60RjO60U!_{5FijB5C8%J0s#Vnef|LkMS~zxVD9Sx0000ft diff --git a/app/src/main/res/layout/activity_bookmark_row.xml b/app/src/main/res/layout/activity_bookmark_row.xml index 6b02728b..a5245a79 100644 --- a/app/src/main/res/layout/activity_bookmark_row.xml +++ b/app/src/main/res/layout/activity_bookmark_row.xml @@ -4,14 +4,15 @@ android:id="@+id/bookmark_row" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginBottom="4dp" - android:layout_marginTop="4dp" android:background="?attr/selectableItemBackground" android:clickable="true" android:focusable="true" + android:gravity="center_vertical" android:orientation="horizontal" + android:paddingBottom="6dp" android:paddingEnd="16dp" - android:paddingStart="16dp"> + android:paddingStart="16dp" + android:paddingTop="6dp">