├── .gitignore ├── README.md ├── appiraterAndroid ├── build.gradle └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── sbstrm │ │ └── appirater │ │ └── Appirater.java │ └── res │ ├── values-ar │ └── strings.xml │ ├── values-ca │ └── strings.xml │ ├── values-cs │ └── strings.xml │ ├── values-da │ └── strings.xml │ ├── values-de │ └── strings.xml │ ├── values-el │ └── strings.xml │ ├── values-es │ └── strings.xml │ ├── values-fi │ └── strings.xml │ ├── values-fr │ └── strings.xml │ ├── values-he │ └── strings.xml │ ├── values-hu │ └── strings.xml │ ├── values-id │ └── strings.xml │ ├── values-it │ └── strings.xml │ ├── values-ja │ └── strings.xml │ ├── values-ko │ └── strings.xml │ ├── values-ms │ └── strings.xml │ ├── values-nb │ └── strings.xml │ ├── values-nl │ └── strings.xml │ ├── values-pl │ └── strings.xml │ ├── values-pt │ └── strings.xml │ ├── values-ru │ └── strings.xml │ ├── values-sk │ └── strings.xml │ ├── values-sv │ └── strings.xml │ ├── values-th │ └── strings.xml │ ├── values-tr │ └── strings.xml │ ├── values-vi │ └── strings.xml │ ├── values-zh-rCN │ └── strings.xml │ ├── values-zh-rTW │ └── strings.xml │ └── values │ ├── appirater-settings.xml │ ├── strings.xml │ └── styles.xml ├── build.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── import-summary.txt ├── main ├── build.gradle ├── libs │ ├── android-plist-parser-app.jar │ └── cwac-wakeful-1.0.3.jar ├── lint.xml ├── proguard-rules.pro └── src │ ├── magazines │ └── java │ │ └── com │ │ └── librelio │ │ └── model │ │ └── dictitem │ │ └── ProductsItem.java │ ├── main │ ├── AndroidManifest.xml │ ├── assets │ │ ├── Magazines.plist │ │ └── Tabs.plist │ ├── java │ │ ├── com │ │ │ ├── artifex │ │ │ │ └── mupdfdemo │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── AsyncTask.java │ │ │ │ │ ├── BitmapHolder.java │ │ │ │ │ ├── LinkInfo.java │ │ │ │ │ ├── LinkInfoExternal.java │ │ │ │ │ ├── LinkInfoInternal.java │ │ │ │ │ ├── LinkInfoRemote.java │ │ │ │ │ ├── LinkInfoVisitor.java │ │ │ │ │ ├── MediaHolder.java │ │ │ │ │ ├── MuPDFAlert.java │ │ │ │ │ ├── MuPDFAlertInternal.java │ │ │ │ │ ├── MuPDFCore.java │ │ │ │ │ ├── MuPDFPageAdapter.java │ │ │ │ │ ├── MuPDFPageView.java │ │ │ │ │ ├── OutlineAdapter.java │ │ │ │ │ ├── OutlineItem.java │ │ │ │ │ ├── PageView.java │ │ │ │ │ ├── domain │ │ │ │ │ ├── OutlineActivityData.java │ │ │ │ │ └── SearchTaskResult.java │ │ │ │ │ └── view │ │ │ │ │ ├── DocumentReaderView.java │ │ │ │ │ └── ReaderView.java │ │ │ ├── librelio │ │ │ │ ├── LibrelioApplication.java │ │ │ │ ├── activity │ │ │ │ │ ├── AbstractLockRotationActivity.java │ │ │ │ │ ├── BillingActivity.java │ │ │ │ │ ├── DownloadMagazineActivity.java │ │ │ │ │ ├── GooglePlayActivity.java │ │ │ │ │ ├── MagazinesActivity.java │ │ │ │ │ ├── MainTabsActivity.java │ │ │ │ │ ├── MuPDFActivity.java │ │ │ │ │ ├── OutlineActivity.java │ │ │ │ │ ├── SlideShowActivity.java │ │ │ │ │ ├── StartupActivity.java │ │ │ │ │ ├── VideoActivity.java │ │ │ │ │ └── WebViewActivity.java │ │ │ │ ├── adapter │ │ │ │ │ ├── DictItemAdapter.java │ │ │ │ │ ├── DownloadedMagazinesAdapter.java │ │ │ │ │ └── PDFPreviewPagerAdapter.java │ │ │ │ ├── animation │ │ │ │ │ ├── ActivitySwitcher.java │ │ │ │ │ ├── DisplayNextView.java │ │ │ │ │ ├── Rotate3dAnimation.java │ │ │ │ │ └── SwapViews.java │ │ │ │ ├── base │ │ │ │ │ ├── BaseActivity.java │ │ │ │ │ ├── BaseManager.java │ │ │ │ │ ├── BaseService.java │ │ │ │ │ └── IBaseContext.java │ │ │ │ ├── event │ │ │ │ │ ├── DownloadStatusUpdateEvent.java │ │ │ │ │ ├── ReloadPlistEvent.java │ │ │ │ │ └── ShowProgressBarEvent.java │ │ │ │ ├── exception │ │ │ │ │ ├── DownloadException.java │ │ │ │ │ ├── FileAlreadyExistException.java │ │ │ │ │ ├── MagazineNotFoundInDatabaseException.java │ │ │ │ │ └── NoMemoryException.java │ │ │ │ ├── fragments │ │ │ │ │ ├── DownloadedMagazinesFragment.java │ │ │ │ │ ├── PlistGridFragment.java │ │ │ │ │ ├── RssFragment.java │ │ │ │ │ └── WebViewFragment.java │ │ │ │ ├── lib │ │ │ │ │ └── utils │ │ │ │ │ │ ├── Base64.java │ │ │ │ │ │ ├── Base64DecoderException.java │ │ │ │ │ │ ├── Consts.java │ │ │ │ │ │ ├── PDFParser.java │ │ │ │ │ │ └── Security.java │ │ │ │ ├── model │ │ │ │ │ ├── Asset.java │ │ │ │ │ ├── DownloadStatusCode.java │ │ │ │ │ ├── dictitem │ │ │ │ │ │ ├── DictItem.java │ │ │ │ │ │ ├── DownloadableDictItem.java │ │ │ │ │ │ ├── DownloadsItem.java │ │ │ │ │ │ ├── MagazineItem.java │ │ │ │ │ │ ├── PlistItem.java │ │ │ │ │ │ ├── RssFeedItem.java │ │ │ │ │ │ ├── UpdatesPlistItem.java │ │ │ │ │ │ └── WebViewItem.java │ │ │ │ │ └── interfaces │ │ │ │ │ │ ├── DisplayableAsGridItem.java │ │ │ │ │ │ ├── DisplayableAsTab.java │ │ │ │ │ │ └── Downloadable.java │ │ │ │ ├── notifications │ │ │ │ │ ├── GcmBroadcastReceiver.java │ │ │ │ │ └── GcmIntentService.java │ │ │ │ ├── receiver │ │ │ │ │ └── MagazineDownloadReceiver.java │ │ │ │ ├── service │ │ │ │ │ ├── AssetDownloadService.java │ │ │ │ │ └── MagazineDownloadService.java │ │ │ │ ├── storage │ │ │ │ │ ├── DataBaseHelper.java │ │ │ │ │ └── DownloadsManager.java │ │ │ │ ├── task │ │ │ │ │ ├── CreateTempVideoTask.java │ │ │ │ │ ├── SafeAsyncTask.java │ │ │ │ │ ├── TinyAsyncTask.java │ │ │ │ │ └── TinySafeAsyncTask.java │ │ │ │ ├── utils │ │ │ │ │ ├── CommonHelper.java │ │ │ │ │ ├── GooglePlayServicesUtils.java │ │ │ │ │ ├── PlistDownloader.java │ │ │ │ │ ├── PlistUtils.java │ │ │ │ │ ├── PurchaseUtils.java │ │ │ │ │ ├── StorageUtils.java │ │ │ │ │ ├── SubscriptionUtils.java │ │ │ │ │ └── SystemHelper.java │ │ │ │ └── view │ │ │ │ │ ├── AutofitRecyclerView.java │ │ │ │ │ ├── AutofitTextView.java │ │ │ │ │ ├── ImageLayout.java │ │ │ │ │ ├── MagazineGridItemView.java │ │ │ │ │ ├── RecyclerItemClickListener.java │ │ │ │ │ ├── SubscriberCodeDialog.java │ │ │ │ │ └── UsernamePasswordLoginDialog.java │ │ │ └── loopj │ │ │ │ └── android │ │ │ │ └── http │ │ │ │ ├── AsyncHttpClient.java │ │ │ │ ├── AsyncHttpRequest.java │ │ │ │ ├── AsyncHttpResponseHandler.java │ │ │ │ ├── BinaryHttpResponseHandler.java │ │ │ │ ├── JsonHttpResponseHandler.java │ │ │ │ ├── PersistentCookieStore.java │ │ │ │ ├── RequestParams.java │ │ │ │ ├── RetryHandler.java │ │ │ │ ├── SerializableCookie.java │ │ │ │ ├── SimpleMultipartEntity.java │ │ │ │ └── SyncHttpClient.java │ │ └── nl │ │ │ └── matshofman │ │ │ └── saxrssreader │ │ │ ├── RssFeed.java │ │ │ ├── RssHandler.java │ │ │ ├── RssItem.java │ │ │ └── RssReader.java │ ├── jniLibs │ │ ├── armeabi-v7a │ │ │ └── libmupdf.so │ │ └── armeabi │ │ │ └── libmupdf.so │ └── res │ │ ├── anim │ │ ├── flip_left_out.xml │ │ └── flip_right_in.xml │ │ ├── color │ │ └── magazine_view_button_text_color.xml │ │ ├── drawable-hdpi │ │ ├── ic_list_white_24dp.png │ │ ├── ic_more_vert_white_24dp.png │ │ ├── ic_open_in_browser_white_24dp.png │ │ └── ic_refresh_white_24dp.png │ │ ├── drawable-mdpi │ │ ├── ic_list_white_24dp.png │ │ ├── ic_more_vert_white_24dp.png │ │ ├── ic_open_in_browser_white_24dp.png │ │ └── ic_refresh_white_24dp.png │ │ ├── drawable-nodpi │ │ ├── generic.png │ │ ├── magazines_background.png │ │ └── startup_background.png │ │ ├── drawable-xhdpi │ │ ├── ic_list_white_24dp.png │ │ ├── ic_more_vert_white_24dp.png │ │ ├── ic_open_in_browser_white_24dp.png │ │ └── ic_refresh_white_24dp.png │ │ ├── drawable-xxhdpi │ │ ├── ic_list_white_24dp.png │ │ ├── ic_more_vert_white_24dp.png │ │ ├── ic_open_in_browser_white_24dp.png │ │ └── ic_refresh_white_24dp.png │ │ ├── drawable-xxxhdpi │ │ ├── ic_list_white_24dp.png │ │ ├── ic_more_vert_white_24dp.png │ │ ├── ic_open_in_browser_white_24dp.png │ │ └── ic_refresh_white_24dp.png │ │ ├── drawable │ │ ├── busy.xml │ │ ├── darkdenim3.png │ │ ├── downloaded_magazines_button_default.xml │ │ ├── downloaded_magazines_button_highlighted.xml │ │ ├── downloaded_magazines_delete_button_selector.xml │ │ ├── downloaded_magazines_item_selector.xml │ │ ├── ic_arrow_left.png │ │ ├── ic_arrow_right.png │ │ ├── ic_cancel.png │ │ ├── ic_magnifying_glass.png │ │ ├── item.jpg │ │ ├── magazines_view_button.xml │ │ ├── magazines_view_button_focused.xml │ │ ├── magazines_view_button_pressed.xml │ │ ├── magazines_view_button_selector.xml │ │ ├── page_num.xml │ │ ├── slider.xml │ │ └── tiled_background.xml │ │ ├── layout │ │ ├── activity_download_magazines.xml │ │ ├── activity_main_tabs.xml │ │ ├── activity_video.xml │ │ ├── activity_webview.xml │ │ ├── billing_activity.xml │ │ ├── billing_not_supported.xml │ │ ├── buttons.xml │ │ ├── edit_payload.xml │ │ ├── fragment_downloaded_magazines.xml │ │ ├── fragment_plist_grid.xml │ │ ├── fragment_web_view.xml │ │ ├── image_pager.xml │ │ ├── issue_item_unloaded.xml │ │ ├── item_dictitem_grid.xml │ │ ├── item_dictitem_grid_header.xml │ │ ├── item_dictitem_pop_up_dialog.xml │ │ ├── outline_entry.xml │ │ ├── page_layout.xml │ │ ├── pdf_page_layout.xml │ │ ├── picker_entry.xml │ │ ├── preview_pager_item_layout.xml │ │ ├── products_billing_activity.xml │ │ ├── progress_bar_layout.xml │ │ ├── row_downloaded_magazines.xml │ │ ├── row_rss_item.xml │ │ ├── sideshow_activity_layout.xml │ │ ├── slideshow_item_layout.xml │ │ ├── startup.xml │ │ ├── subscriber_code_dialog.xml │ │ ├── two_page_pdf_view.xml │ │ └── username_password_login_dialog.xml │ │ ├── menu │ │ ├── activity_main_tabs.xml │ │ ├── activity_web_view.xml │ │ └── fragment_web_view.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ ├── values-de │ │ └── strings.xml │ │ ├── values-es │ │ └── strings.xml │ │ ├── values-fr │ │ └── strings.xml │ │ ├── values-it │ │ └── strings.xml │ │ ├── values-large-land │ │ └── strings.xml │ │ ├── values-large-port │ │ └── strings.xml │ │ ├── values-normal-land │ │ └── strings.xml │ │ ├── values-normal-port │ │ └── strings.xml │ │ ├── values-pl │ │ └── strings.xml │ │ ├── values-port │ │ └── strings.xml │ │ ├── values-pt │ │ └── strings.xml │ │ ├── values-ru │ │ └── strings.xml │ │ ├── values-sw320dp │ │ └── dimens.xml │ │ ├── values-sw600dp │ │ └── dimens.xml │ │ ├── values-xlarge-land │ │ └── strings.xml │ │ ├── values-xlarge-port │ │ └── strings.xml │ │ ├── values-zh │ │ └── strings.xml │ │ └── values │ │ ├── appirater-settings.xml │ │ ├── application_.xml │ │ ├── attrs.xml │ │ ├── billing.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── ids.xml │ │ ├── settings.xml │ │ ├── strings.xml │ │ └── styles.xml │ ├── script │ ├── .gitignore │ └── custom.gradle │ └── wind │ └── res │ ├── drawable-land-nodpi │ ├── magazines_background.png │ └── startup_background.png │ ├── drawable-port-nodpi │ ├── magazines_background.png │ └── startup_background.png │ ├── drawable-xlarge-land-nodpi │ ├── magazines_background.png │ └── startup_background.png │ ├── drawable-xlarge-port-nodpi │ ├── magazines_background.png │ └── startup_background.png │ ├── mipmap-hdpi │ └── ic_launcher.png │ ├── mipmap-mdpi │ └── ic_launcher.png │ ├── mipmap-xhdpi │ └── ic_launcher.png │ ├── mipmap-xxhdpi │ └── ic_launcher.png │ └── mipmap-xxxhdpi │ └── ic_launcher.png ├── settings.gradle └── subscriptions_codes.plist /.gitignore: -------------------------------------------------------------------------------- 1 | # built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # files for the dex VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # generated files 12 | bin/ 13 | gen/ 14 | 15 | # Local configuration file (sdk path, etc) 16 | local.properties 17 | 18 | # Eclipse project files 19 | .classpath 20 | .project 21 | 22 | # Proguard folder generated by Eclipse 23 | proguard/ 24 | 25 | # Android Studio 26 | .idea/ 27 | *.iml 28 | target 29 | out/ 30 | 31 | # Gradle 32 | build/ 33 | .gradle 34 | 35 | # OSX 36 | .DS_Store 37 | 38 | # Windows 39 | Thumbs.db 40 | 41 | # Jimu Mirror 42 | mirror/ 43 | 44 | # Other 45 | signing.properties 46 | 47 | # Crashlytics 48 | main/src/main/assets/crashlytics-build.properties 49 | main/src/main/res/values/com_crashlytics_export_strings.xml 50 | main/crashlytics.properties 51 | 52 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## About this app 2 | 3 | This customizable app is intended mainly for publishers and marketers. It is also available on [iOS](https://github.com/libreliodev/iOS), [Windows 8](https://github.com/libreliodev/windows8) and in [HTML5](https://github.com/libreliodev/javascript). 4 | 5 | If you need to publish dynamic and/or paid contents, you need to set up your own server and develop your own code. You can also opt for Librelio's [paid plans](http://www.librelio.com/index.html#pricing). 6 | 7 | Examples of customized apps published on the app stores are available on www.librelio.com . A good example of iOS app is the [Wind magazine app](https://itunes.apple.com/fr/app/wind-magazine/id433594605?mt=8). 8 | 9 | 10 | ## License 11 | This project is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 12 | 13 | This project is Copyright 2012-2014 Librelio, except included libraries: 14 | - Copyright 2006-2015 Artifex Software, Inc for the MuPDF library 15 | - Copyright Free Beachler (http://www.freebeachler.com) for the Android P-List Parser library 16 | - Copyright (c) 2011 Mats Hofman for the Android RSS reader library 17 | - Copyright 2011-2013 sbstrm. Copyright 2014 drewjw81 for the Appirater Android library 18 | 19 | The use of the Google Analytics library is governed by the following terms: http://www.google.com/analytics/tos.html 20 | 21 | 22 | 23 | ## Source code of libraries used 24 | - MuPDF: http://www.mupdf.com 25 | - Android P-List Parser: https://github.com/tenaciousRas/android-plist-parser 26 | - Android RSS reader library: https://github.com/matshofman/Android-RSS-Reader-Library 27 | - Appiarater Android: https://github.com/drewjw81/appirater-android 28 | 29 | ## Documentation 30 | The documentation is available in the [Wiki](https://github.com/libreliodev/android/wiki) 31 | -------------------------------------------------------------------------------- /appiraterAndroid/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion "23.0.2" 6 | 7 | defaultConfig { 8 | minSdkVersion 14 9 | targetSdkVersion 23 10 | } 11 | 12 | buildTypes { 13 | release { 14 | minifyEnabled false 15 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 16 | } 17 | } 18 | } 19 | 20 | repositories { 21 | maven { url "https://jitpack.io" } 22 | } 23 | 24 | dependencies { 25 | compile('com.github.afollestad.material-dialogs:core:0.8.5.5@aar') { 26 | transitive = true 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-ar/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | قيم %s 4 | إذا كنت تستمع باستخدام %s، فهل تمانع بأن تأخذ دقيقة من وقتك لتقيمه؟ لن يستغرق الأمر أكثر من دقيقة. شكرا لدعمك! 5 | قيم %s 6 | ذكرني لاحقا 7 | لا شكرا 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-ca/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Valorar %s 4 | Si li agrada utilitzar %s, li importaria prendre’s un moment per a valorar-lo? No trigarà més d’un minut. Gràcies por la seva col·laboració! 5 | Valorar %s 6 | Recordar-m’ho més tard 7 | No, gràcies 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-cs/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Ohodnotit %s 4 | Pokud se Vám aplikace %s líbí, mohli byste ji prosím ohodnotit v App Store? Zabere to jen chvilku. Díky za Vaši podporu! 5 | Ohodnotit %s 6 | Možná později 7 | Ne, díky 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-da/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Bedøm %s 4 | Hvis du synes om at bruge %s, vil du have noget imod at bruge et kort øjeblik på at bedømme det? Det tager kun et minut. Tak for din støtte! 5 | Bedøm %s 6 | Påmind mig senere 7 | Nej tak 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-de/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Bewerte %s 4 | Sie nutzen %s gerne? Dann nehmen Sie sich bitte für eine Bewertung einen Moment Zeit! Es dauert nicht länger als eine Minute. Vielen Dank! 5 | Bewerte %s 6 | Später erinnern 7 | Nein, Danke 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-el/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Βαθμολόγηση του %s 4 | Αν σου αρέσει το %s, θα μπορούσες να αφιερώσεις μια στιγμή για να το βαθμολογήσεις; Η διαδικασία είναι πολύ σύντομη. Ευχαριστούμε για τη στήριξη! 5 | Βαθμολόγηση του %s 6 | Υπενθύμιση αργότερα 7 | Όχι, ευχαριστώ 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-es/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Valorar %s 4 | Si le gusta utilizar %s, ¿le importaría valorarlo? No le llevará más de un minuto. ¡Gracias por su colaboración! 5 | Valorar %s 6 | Recordar más tarde 7 | No, gracias 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-fi/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Arvioi %s 4 | Jos käytät mielelläsi %s, voisitko käyttää hetken ja arvostella sen? Se ei kestä minuuttia kauempaa. Kiitos tuestasi! 5 | Arvioi %s 6 | Muistuta minua myöhemmin 7 | Ei kiitos 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-fr/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Notez %s 4 | Si vous aimez %s, voulez-vous prendre un moment pour l\'évaluer? Cela ne vous prendra pas plus d\'une minute. Merci de votre soutien! 5 | Notez %s 6 | Rappelez-moi plus tard 7 | Non, Merci 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-he/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | דרג את %s 4 | אם נהנת להשתמש ב %s, האם תסכים לדרג אותה? זה לא יקח יותר מדקה. תודה על התמיכה! 5 | דרג את %s 6 | מאוחר יותר 7 | לא תודה 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-hu/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | %s értékelése 4 | Ha tetszik a %s, ne felejtsd el értékelni az App Store-ban! Csak egy perc az egész. Köszönet a támogatásért! 5 | %s értékelése 6 | Emlékeztess később 7 | Most inkább nem 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-id/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Rating %s 4 | Jika anda menyukai %s, maukah anda memberikan rating kepada aplikasi ini? Rating hanya memakan waktu kurang dari 1 menit. Terimakasih untuk dukungan anda! 5 | Rating %s 6 | Silakan ingatkan saya lagi 7 | Tidak, terimakasih 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-it/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Valuta %s 4 | Se trovi utile %s, perchè non spendere qualche momento per dare una valutazione? Non richiederà più di un minuto. Grazie per il supporto! 5 | Valuta %s 6 | Ricordamelo più tardi 7 | No, grazie 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-ja/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | %sの評価 4 | 楽しんでいただけたならば簡単なご意見をお願いします。%sを評価しますか? 5 | %sを評価する 6 | 後で見る 7 | いいえ 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-ko/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | %s 평가하기 4 | %s 사용이 맘에 드셨나요? 잠시만 시간을 내서 평가를 부탁드리겠습니다. 감사합니다! 5 | %s 평가하기 6 | 다음에 평가하겠습니다 7 | 평가하지 않겠습니다 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-ms/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Tarafkan %s 4 | Jika anda suka %s, bolehkah luangkan sedikit masa untuk beri penarafan? Tak sampai seminit pun. Terima kasih atas sokongan anda! 5 | Tarafkan %s 6 | Ingatkan saya lain kali 7 | Terima kasih saja 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-nb/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Vurder %s 4 | Hvis du liker å bruke %s, kan du ta deg et øyeblikk for å vurdere den? Det vil ikke ta mer enn ett minutt. Takk for din støtte! 5 | Vurder %s 6 | Påminn meg senere 7 | Nei, takk du 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-nl/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | %s beoordelen 4 | Als het gebruik van %s je bevalt, zou je dan een momentje de tijd willen nemen om het te beoordelen? Het duurt nog geen minuut. Bedankt voor je steun! 5 | %s beoordelen 6 | Herinner me er later aan 7 | Nee, bedankt 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-pl/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Oceń %s 4 | Jeżeli podoba Ci się korzystanie z %s, może zechciałbyś poświęcić chwilę czasu, aby ocenić aplikację? Nie zajmie Ci to więcej niż minutę. Dziękujemy za pomoc! 5 | Oceń %s 6 | Przypomnij później 7 | Nie, dziękuję 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-pt/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Avaliar o %s 4 | Se você gosta de usar o %s, que tal avaliá-lo? Não levará mais de um minuto. Agradecemos o seu apoio! 5 | Avaliar o %s 6 | Mais tarde 7 | Não, obrigado 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-ru/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Оценить %s 4 | Если Вам понравилась программа %s, пожалуйста поставьте свою оценку. Это займет у Вас не более одной минуты.\n Спасибо за поддержку! 5 | Оценить %s 6 | Напомнить позже 7 | Нет, спасибо 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-sk/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Ohodnotiť %s 4 | Pokiaľ sa Vám páči aplikácia %s, mohli by ste ju prosím ohodnotiť v App Store? Zaberie to len chvíľu. Vďaka za Vašu podporu! 5 | Ohodnotiť %s 6 | Pripomenúť neskôr 7 | Nie, ďakujem 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-sv/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Betygsätt %s 4 | Om du tycker att %s är ett praktiskt verktyg, kan du tänka dig att betygsätta det åt oss? Det tar bara en minut. Tack för hjälpen! 5 | Betygsätt %s 6 | Påminn mig senare 7 | Nej tack 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-th/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ให้อันดับ %s 4 | ถ้าคุณกำลังใช้ %s โปรดสละเวลาสักครู่ในการให้อันดับแก่เรา คุณจะเสียเวลาไม่เกินหนึ่งนาที ขอบคุณสำหรับการสนับสนุน! 5 | ให้อันดับ %s 6 | เตือนฉันภายหลัง 7 | ไม่ ขอบคุณ 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-tr/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | %s Oylayın 4 | Eğer %s uygulamasını beğendiyseniz, oy verip bize destek olmak ister misiniz? Desteğiniz için teşekkürler! 5 | Evet, %s oylamak istiyorum 6 | Daha sonra hatırlat 7 | Hayır, Teşekkürler 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-vi/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Đánh giá %s 4 | Cảm ơn bạn đã sử dụng ứng dụng %s trong thời gian qua, bạn có thể dành chút thời gian để đánh giá ứng dụng trong AppStore không? 5 | Đánh giá %s 6 | Hãy nhắc nhở tôi sau 7 | Không, xin cảm ơn 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-zh-rCN/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 給%s評分 4 | 如果你喜歡使用%s,你介意花一點時間給它評分嗎?不會超過一分鐘。感謝您的支持! 5 | 給%s評分 6 | 稍後提醒我 7 | 不,謝謝 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values-zh-rTW/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 给%s评分 4 | 如果你喜欢使用%s,你介意花一点时间给它评分吗?不会超过一分钟。感谢您的支持! 5 | 给%s评分 6 | 稍后提醒我 7 | 不,谢谢 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values/appirater-settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | Your App Name 8 | market://details?id=%s 9 | 30 10 | 15 11 | 15 12 | 13 | 3 14 | 15 | false 16 | 17 | #ff449def 18 | #ff2f6699 19 | #ffffffff 20 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Rate %s 4 | If you enjoy using %s, would you mind taking a moment to rate it? Thanks for your support! 5 | Yes, Rate %s 6 | Remind me later 7 | No, Thanks 8 | -------------------------------------------------------------------------------- /appiraterAndroid/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | buildscript { 3 | repositories { 4 | jcenter() 5 | } 6 | dependencies { 7 | classpath 'com.android.tools.build:gradle:2.2.3' 8 | } 9 | } 10 | 11 | allprojects { 12 | repositories { 13 | jcenter() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Apr 10 15:27:10 PDT 2013 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip 7 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /main/libs/android-plist-parser-app.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/libs/android-plist-parser-app.jar -------------------------------------------------------------------------------- /main/libs/cwac-wakeful-1.0.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/libs/cwac-wakeful-1.0.3.jar -------------------------------------------------------------------------------- /main/lint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /main/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/michael/Development/android-sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Use unique member names to make stack trace reading easier 20 | -useuniqueclassmembernames 21 | 22 | # Google Play Services 23 | 24 | -keep class * extends java.util.ListResourceBundle { 25 | protected Object[][] getContents(); 26 | } 27 | 28 | -keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable { 29 | public static final *** NULL; 30 | } 31 | 32 | -keepnames @com.google.android.gms.common.annotation.KeepName class * 33 | -keepclassmembernames class * { 34 | @com.google.android.gms.common.annotation.KeepName *; 35 | } 36 | 37 | -keepnames class * implements android.os.Parcelable { 38 | public static final ** CREATOR; 39 | } 40 | 41 | # EventBus 42 | 43 | -keepclassmembers class ** { 44 | public void onEvent*(**); 45 | } 46 | 47 | # Two way view 48 | 49 | -keep class org.lucasr.twowayview.** { *; } 50 | 51 | # OkHttp 52 | 53 | -dontwarn com.squareup.okhttp.internal.huc.** 54 | 55 | # Okio 56 | 57 | -dontwarn okio.** 58 | 59 | # Internal code 60 | 61 | -keep public interface com.librelio.view.SubscriberCodeDialog$OnSubscriberCodeListener {*;} 62 | 63 | -keep public interface com.librelio.view.UsernamePasswordLoginDialog$OnUsernamePasswordLoginListener {*;} 64 | 65 | -keep public class com.librelio.activity.BillingActivity { *; } 66 | -keepclassmembers public class com.librelio.activity.BillingActivity { *; } 67 | 68 | # RxJava 69 | 70 | -dontwarn rx.** 71 | 72 | # Remove logging calls 73 | -assumenosideeffects class android.util.Log { 74 | public static boolean isLoggable(java.lang.String, int); 75 | public static int v(...); 76 | public static int i(...); 77 | public static int w(...); 78 | public static int d(...); 79 | public static int e(...); 80 | } 81 | 82 | -dontwarn com.librelio.** -------------------------------------------------------------------------------- /main/src/magazines/java/com/librelio/model/dictitem/ProductsItem.java: -------------------------------------------------------------------------------- 1 | package com.librelio.model.dictitem; 2 | 3 | import android.content.Context; 4 | import android.database.Cursor; 5 | 6 | 7 | /////////////////////////////////////////////////////////////////////////// 8 | // ******************************************* 9 | // STUB! Overriden in Products flavorDimension 10 | // ******************************************* 11 | /////////////////////////////////////////////////////////////////////////// 12 | public class ProductsItem extends DownloadableDictItem { 13 | public ProductsItem(Context context, Cursor c) { 14 | 15 | } 16 | 17 | public ProductsItem(Context context, String title, String subtitle, String filePathFromPlist) { 18 | 19 | } 20 | 21 | @Override 22 | public String getItemUrl() { 23 | return null; 24 | } 25 | 26 | public boolean isDownloaded() { 27 | return false; 28 | } 29 | 30 | public void clearMagazineDir(Context context) { 31 | } 32 | 33 | public void onReadButtonClicked(Context context) { 34 | } 35 | 36 | public boolean isPaid() { 37 | return false; 38 | } 39 | 40 | @Override 41 | public String getDownloadDate() { 42 | return null; 43 | } 44 | 45 | @Override 46 | public void deleteItem() { 47 | 48 | } 49 | 50 | @Override 51 | public String getPngUri() { 52 | return null; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /main/src/main/assets/Magazines.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | FileName 7 | wind_358/wind_358_.pdf 8 | Subtitle 9 | Juillet 2011 10 | Title 11 | Wind 358 12 | 13 | 14 | FileName 15 | wind_357/wind_357_.pdf 16 | Subtitle 17 | Juin 2011 18 | Title 19 | Wind 357 20 | 21 | 22 | FileName 23 | wind_356/wind_356_.pdf 24 | Subtitle 25 | Mai 2011 26 | Title 27 | Wind 356 28 | 29 | 30 | FileName 31 | wind_355/wind_355.pdf 32 | Subtitle 33 | Avril 2011 34 | Title 35 | Wind 355 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /main/src/main/assets/Tabs.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | FileName 7 | Magazines.plist?waupdate=30 8 | Icon 9 | download.png 10 | Title 11 | Magazines 12 | 13 | 14 | FileName 15 | file://localhost/ 16 | Icon 17 | folder.png 18 | Title 19 | Downloads 20 | 21 | 22 | FileName 23 | news.rss?waurl=http%3A%2F%2Fwww.windmag.com%2Ffeed%2Fall&waupdate=30 24 | Icon 25 | rss.png 26 | Title 27 | News 28 | 29 | 30 | FileName 31 | http://www.windmag.com 32 | Icon 33 | globe.png 34 | Title 35 | Site 36 | 37 | 38 | FileName 39 | https://www.facebook.com/windmag 40 | Icon 41 | facebook.png 42 | Title 43 | Facebook 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /main/src/main/java/com/artifex/mupdfdemo/.gitignore: -------------------------------------------------------------------------------- 1 | /MuPDFCore_ORIG.java 2 | -------------------------------------------------------------------------------- /main/src/main/java/com/artifex/mupdfdemo/BitmapHolder.java: -------------------------------------------------------------------------------- 1 | package com.artifex.mupdfdemo; 2 | 3 | import android.graphics.Bitmap; 4 | 5 | public class BitmapHolder { 6 | private Bitmap bm; 7 | 8 | public BitmapHolder() { 9 | bm = null; 10 | } 11 | 12 | public synchronized void setBm(Bitmap abm) { 13 | if (bm != null && bm != abm && !bm.isRecycled()) { 14 | bm.recycle(); 15 | bm = null; 16 | } 17 | bm = abm; 18 | } 19 | 20 | public synchronized void drop() { 21 | bm = null; 22 | } 23 | 24 | public synchronized Bitmap getBm() { 25 | return bm; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /main/src/main/java/com/artifex/mupdfdemo/LinkInfo.java: -------------------------------------------------------------------------------- 1 | package com.artifex.mupdfdemo; 2 | 3 | import android.graphics.RectF; 4 | 5 | public class LinkInfo { 6 | final public RectF rect; 7 | 8 | public LinkInfo(float l, float t, float r, float b) { 9 | rect = new RectF(l, t, r, b); 10 | } 11 | 12 | public void acceptVisitor(LinkInfoVisitor visitor) { 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /main/src/main/java/com/artifex/mupdfdemo/LinkInfoExternal.java: -------------------------------------------------------------------------------- 1 | package com.artifex.mupdfdemo; 2 | 3 | import android.net.Uri; 4 | 5 | public class LinkInfoExternal extends LinkInfo { 6 | final public String url; 7 | 8 | public LinkInfoExternal(float l, float t, float r, float b, String u) { 9 | super(l, t, r, b); 10 | url = u; 11 | } 12 | 13 | public void acceptVisitor(LinkInfoVisitor visitor) { 14 | visitor.visitExternal(this); 15 | } 16 | 17 | public boolean isMediaURI() { 18 | return hasVideoData()||isImageFormat(); 19 | } 20 | 21 | public boolean isAutoPlay() { 22 | return Uri.parse(url).getQueryParameter("waplay") != null 23 | && Uri.parse(url).getQueryParameter("waplay").equals("auto"); 24 | } 25 | 26 | public boolean isToggleFullscreenAllowed() { 27 | if (Uri.parse(url).getQueryParameter("watoggle") == null) { 28 | // by default allow toggle 29 | return true; 30 | } 31 | return !Uri.parse(url).getQueryParameter("watoggle").equals("no"); 32 | } 33 | 34 | public boolean isFullScreen() { 35 | Uri uri = Uri.parse(url); 36 | if(uri.isHierarchical()) 37 | return uri.getQueryParameter("warect") != null 38 | && uri.getQueryParameter("warect").equals("full"); 39 | return false; 40 | } 41 | 42 | public boolean isLandscapeOnly() { 43 | Uri uri = Uri.parse(url); 44 | if(uri.isHierarchical()) 45 | return uri.getQueryParameter("waorientation") != null 46 | && uri.getQueryParameter("waorientation").equals("landscape"); 47 | return false; 48 | } 49 | 50 | public boolean isPortraitOnly() { 51 | Uri uri = Uri.parse(url); 52 | if(uri.isHierarchical()) 53 | return uri.getQueryParameter("waorientation") != null 54 | && uri.getQueryParameter("waorientation").equals("portrait"); 55 | return false; 56 | } 57 | 58 | public boolean isExternal() { 59 | return url.startsWith("http://localhost/"); 60 | } 61 | 62 | public boolean hasVideoData() { 63 | final String path = Uri.parse(url).getPath(); 64 | 65 | return path != null && path.endsWith("mp4"); 66 | } 67 | 68 | public boolean isImageFormat() { 69 | final String path = Uri.parse(url).getPath(); 70 | return (path != null)&& 71 | (path.endsWith("jpg") 72 | || path.endsWith("png") 73 | || path.endsWith("bmp")); 74 | } 75 | 76 | public boolean isVideoFormat() { 77 | final String path = Uri.parse(url).getPath(); 78 | return path != null && path.endsWith("mp4"); 79 | } 80 | 81 | public boolean isPdf() { 82 | final String path = Uri.parse(url).getPath(); 83 | return path != null && path.endsWith("pdf"); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /main/src/main/java/com/artifex/mupdfdemo/LinkInfoInternal.java: -------------------------------------------------------------------------------- 1 | package com.artifex.mupdfdemo; 2 | 3 | public class LinkInfoInternal extends LinkInfo { 4 | final public int pageNumber; 5 | 6 | public LinkInfoInternal(float l, float t, float r, float b, int p) { 7 | super(l, t, r, b); 8 | pageNumber = p; 9 | } 10 | 11 | public void acceptVisitor(LinkInfoVisitor visitor) { 12 | visitor.visitInternal(this); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /main/src/main/java/com/artifex/mupdfdemo/LinkInfoRemote.java: -------------------------------------------------------------------------------- 1 | package com.artifex.mupdfdemo; 2 | 3 | public class LinkInfoRemote extends LinkInfo { 4 | final public String fileSpec; 5 | final public int pageNumber; 6 | final public boolean newWindow; 7 | 8 | public LinkInfoRemote(float l, float t, float r, float b, String f, int p, boolean n) { 9 | super(l, t, r, b); 10 | fileSpec = f; 11 | pageNumber = p; 12 | newWindow = n; 13 | } 14 | 15 | public void acceptVisitor(LinkInfoVisitor visitor) { 16 | visitor.visitRemote(this); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /main/src/main/java/com/artifex/mupdfdemo/LinkInfoVisitor.java: -------------------------------------------------------------------------------- 1 | package com.artifex.mupdfdemo; 2 | 3 | abstract public class LinkInfoVisitor { 4 | public abstract void visitInternal(LinkInfoInternal li); 5 | public abstract void visitExternal(LinkInfoExternal li); 6 | public abstract void visitRemote(LinkInfoRemote li); 7 | } 8 | -------------------------------------------------------------------------------- /main/src/main/java/com/artifex/mupdfdemo/MuPDFAlert.java: -------------------------------------------------------------------------------- 1 | package com.artifex.mupdfdemo; 2 | 3 | public class MuPDFAlert { 4 | public enum IconType {Error,Warning,Question,Status}; 5 | public enum ButtonPressed {None,Ok,Cancel,No,Yes}; 6 | public enum ButtonGroupType {Ok,OkCancel,YesNo,YesNoCancel}; 7 | 8 | public final String message; 9 | public final IconType iconType; 10 | public final ButtonGroupType buttonGroupType; 11 | public final String title; 12 | public ButtonPressed buttonPressed; 13 | 14 | MuPDFAlert(String aMessage, IconType aIconType, ButtonGroupType aButtonGroupType, String aTitle, ButtonPressed aButtonPressed) { 15 | message = aMessage; 16 | iconType = aIconType; 17 | buttonGroupType = aButtonGroupType; 18 | title = aTitle; 19 | buttonPressed = aButtonPressed; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /main/src/main/java/com/artifex/mupdfdemo/MuPDFAlertInternal.java: -------------------------------------------------------------------------------- 1 | package com.artifex.mupdfdemo; 2 | 3 | // Version of MuPDFAlert without enums to simplify JNI 4 | public class MuPDFAlertInternal { 5 | public final String message; 6 | public final int iconType; 7 | public final int buttonGroupType; 8 | public final String title; 9 | public int buttonPressed; 10 | 11 | MuPDFAlertInternal(String aMessage, int aIconType, int aButtonGroupType, String aTitle, int aButtonPressed) { 12 | message = aMessage; 13 | iconType = aIconType; 14 | buttonGroupType = aButtonGroupType; 15 | title = aTitle; 16 | buttonPressed = aButtonPressed; 17 | } 18 | 19 | MuPDFAlertInternal(MuPDFAlert alert) { 20 | message = alert.message; 21 | iconType = alert.iconType.ordinal(); 22 | buttonGroupType = alert.buttonGroupType.ordinal(); 23 | title = alert.message; 24 | buttonPressed = alert.buttonPressed.ordinal(); 25 | } 26 | 27 | MuPDFAlert toAlert() { 28 | return new MuPDFAlert(message, MuPDFAlert.IconType.values()[iconType], MuPDFAlert.ButtonGroupType.values()[buttonGroupType], title, MuPDFAlert.ButtonPressed.values()[buttonPressed]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /main/src/main/java/com/artifex/mupdfdemo/MuPDFPageAdapter.java: -------------------------------------------------------------------------------- 1 | package com.artifex.mupdfdemo; 2 | 3 | import com.librelio.task.SafeAsyncTask; 4 | 5 | import android.content.Context; 6 | import android.graphics.Point; 7 | import android.graphics.PointF; 8 | import android.util.Log; 9 | import android.util.SparseArray; 10 | import android.view.View; 11 | import android.view.ViewGroup; 12 | import android.widget.BaseAdapter; 13 | 14 | public class MuPDFPageAdapter extends BaseAdapter { 15 | private static final String TAG = "MuPDFPageAdapter"; 16 | 17 | private final Context context; 18 | private final MuPDFCore core; 19 | private final SparseArray mPageSizes = new SparseArray(); 20 | 21 | public MuPDFPageAdapter(Context context, MuPDFCore core) { 22 | this.context = context; 23 | this.core = core; 24 | } 25 | 26 | public int getCount() { 27 | return core.countPages(); 28 | } 29 | 30 | public Object getItem(int position) { 31 | return null; 32 | } 33 | 34 | public long getItemId(int position) { 35 | return position; 36 | } 37 | 38 | public View getView(final int position, View convertView, ViewGroup parent) { 39 | Log.d(TAG,"getView"); 40 | final MuPDFPageView pageView; 41 | if (convertView == null) { 42 | pageView = new MuPDFPageView(context, core, new Point(parent.getWidth(), parent.getHeight())); 43 | } else { 44 | pageView = (MuPDFPageView)convertView; 45 | } 46 | 47 | PointF pageSize = mPageSizes.get(position); 48 | if (pageSize != null) { 49 | // We already know the page size. Set it up 50 | // immediately 51 | pageView.setPage(position, pageSize); 52 | } else { 53 | // Page size as yet unknown. Blank it for now, and 54 | // start a background task to find the size 55 | pageView.blank(position); 56 | SafeAsyncTask sizingTask = new SafeAsyncTask() { 57 | @Override 58 | protected PointF doInBackground(Void... arg0) { 59 | return core.getPageSize(position); 60 | } 61 | 62 | @Override 63 | protected void onPostExecute(PointF result) { 64 | if (isCancelled()) { 65 | return; 66 | } 67 | // We now know the page size 68 | mPageSizes.put(position, result); 69 | // Check that this view hasn't been reused for 70 | // another page since we started 71 | if (pageView.getPage() == position) 72 | pageView.setPage(position, result); 73 | } 74 | }; 75 | 76 | sizingTask.safeExecute(); 77 | } 78 | return pageView; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /main/src/main/java/com/artifex/mupdfdemo/OutlineAdapter.java: -------------------------------------------------------------------------------- 1 | package com.artifex.mupdfdemo; 2 | 3 | 4 | import com.niveales.wind.R; 5 | 6 | import android.view.LayoutInflater; 7 | import android.view.View; 8 | import android.view.ViewGroup; 9 | import android.widget.BaseAdapter; 10 | import android.widget.TextView; 11 | 12 | public class OutlineAdapter extends BaseAdapter { 13 | private final OutlineItem mItems[]; 14 | private final LayoutInflater mInflater; 15 | public OutlineAdapter(LayoutInflater inflater, OutlineItem items[]) { 16 | mInflater = inflater; 17 | mItems = items; 18 | } 19 | 20 | public int getCount() { 21 | return mItems.length; 22 | } 23 | 24 | public Object getItem(int arg0) { 25 | return null; 26 | } 27 | 28 | public long getItemId(int arg0) { 29 | return 0; 30 | } 31 | 32 | public View getView(int position, View convertView, ViewGroup parent) { 33 | View v; 34 | if (convertView == null) { 35 | v = mInflater.inflate(R.layout.outline_entry, null); 36 | } else { 37 | v = convertView; 38 | } 39 | int level = mItems[position].level; 40 | if (level > 8) level = 8; 41 | String space = ""; 42 | for (int i=0; i parent, View view, 38 | // int position, long id) { 39 | // 40 | // MagazineItem downloadedMagazine = magazinesAdapter 41 | // .getItem(position); 42 | // LibrelioApplication.startPDFActivity( 43 | // context, 44 | // downloadedMagazine.isSample() ? downloadedMagazine 45 | // .getSamplePdfPath() : downloadedMagazine 46 | // .getItemFilePath(), downloadedMagazine 47 | // .getTitle(), true); 48 | // } 49 | // }); 50 | return view; 51 | } 52 | 53 | @Override 54 | public void onCreate(Bundle savedInstanceState) { 55 | super.onCreate(savedInstanceState); 56 | } 57 | 58 | @Override 59 | public void onActivityCreated(Bundle savedInstanceState) { 60 | super.onActivityCreated(savedInstanceState); 61 | 62 | 63 | downloadsManager = new DownloadsManager(getActivity()); 64 | 65 | listMagazines(); 66 | } 67 | 68 | private void listMagazines() { 69 | List downloads = downloadsManager.getDownloadedMagazines(); 70 | magazinesAdapter.setDownloads(getActivity(), downloads); 71 | } 72 | 73 | @Override 74 | public void onResume() { 75 | super.onResume(); 76 | listMagazines(); 77 | EventBus.getDefault().register(this); 78 | } 79 | 80 | @Override 81 | public void onPause() { 82 | super.onPause(); 83 | EventBus.getDefault().unregister(this); 84 | } 85 | 86 | public void onEvent(ReloadPlistEvent event) { 87 | listMagazines(); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /main/src/main/java/com/librelio/lib/utils/Base64DecoderException.java: -------------------------------------------------------------------------------- 1 | // Copyright 2002, Google, Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package com.librelio.lib.utils; 16 | 17 | /** 18 | * Exception thrown when encountering an invalid Base64 input character. 19 | * 20 | * @author nelson 21 | */ 22 | public class Base64DecoderException extends Exception { 23 | public Base64DecoderException() { 24 | super(); 25 | } 26 | 27 | public Base64DecoderException(String s) { 28 | super(s); 29 | } 30 | 31 | private static final long serialVersionUID = 1L; 32 | } 33 | -------------------------------------------------------------------------------- /main/src/main/java/com/librelio/lib/utils/PDFParser.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.librelio.lib.utils; 5 | 6 | import android.content.Context; 7 | import android.net.Uri; 8 | import android.util.SparseArray; 9 | 10 | import com.artifex.mupdfdemo.LinkInfo; 11 | import com.artifex.mupdfdemo.LinkInfoExternal; 12 | import com.artifex.mupdfdemo.MuPDFCore; 13 | import com.librelio.utils.PlistUtils; 14 | 15 | import java.util.ArrayList; 16 | 17 | /** 18 | * @author Dmitry Valetin 19 | * 20 | */ 21 | public class PDFParser { 22 | private MuPDFCore mCore; 23 | private SparseArray mLinkInfo = new SparseArray(); 24 | private SparseArray> mLinkUrls = new SparseArray>(); 25 | private Context context; 26 | private String pathToPDF; 27 | 28 | /** 29 | * 30 | * @param pathToPDF - path within filesystem to PDF file 31 | * @throws IllegalStateException - if some error occurs 32 | */ 33 | public PDFParser(Context context, String pathToPDF) throws IllegalStateException { 34 | this.context = context; 35 | this.pathToPDF = pathToPDF; 36 | try { 37 | mCore = new MuPDFCore(pathToPDF); 38 | parseLinkInfo(); 39 | } catch (Exception e) { 40 | e.printStackTrace(); 41 | throw new IllegalStateException(e); 42 | } 43 | } 44 | 45 | private void parseLinkInfo() { 46 | int nPages = mCore.countPages(); 47 | for(int page = 0; page < nPages; page++) { 48 | LinkInfo [] mPageLinkInfo = mCore.getPageLinks(page); 49 | if(mPageLinkInfo != null && mPageLinkInfo.length > 0) { 50 | ArrayList fixedLinkInfo = new ArrayList(); 51 | LinkInfoExternal current; 52 | for(int i = 0; i < mPageLinkInfo.length; i++) { 53 | try { 54 | if( !(mPageLinkInfo[i] instanceof LinkInfoExternal)) 55 | continue; 56 | current = (LinkInfoExternal)mPageLinkInfo[i]; 57 | if(current.url != null && current.url.startsWith("http://localhost")) { 58 | String path = Uri.parse(current.url).getPath(); 59 | if(path.contains("_") && ( path.contains("jpg") || path.contains("png"))) { 60 | // ops... we have a slideshow here 61 | int mSlideshowCount = Integer 62 | .valueOf(path.split("_")[1].split("\\.")[0]); 63 | String mSlideshowPreffix = path.split("_")[0]; 64 | String mSlideshowSuffix = path.split("_")[1].split("\\.")[1]; 65 | for (int j = 1; j <= mSlideshowCount; j++) { 66 | LinkInfoExternal newLink = new LinkInfoExternal(current.rect.left, current.rect.top, 67 | current.rect.right, current.rect.bottom, "http://localhost" + 68 | mSlideshowPreffix + "_" + String.valueOf(j) + "." + mSlideshowSuffix); 69 | fixedLinkInfo.add(newLink); 70 | } 71 | } else { 72 | fixedLinkInfo.add(current); 73 | } 74 | }else { 75 | fixedLinkInfo.add(current); 76 | } 77 | } catch (Exception e) { 78 | // TODO Auto-generated catch block 79 | e.printStackTrace(); 80 | } 81 | } 82 | 83 | mLinkInfo.put(page, fixedLinkInfo.toArray(new LinkInfoExternal[fixedLinkInfo.size()])); 84 | } 85 | } 86 | } 87 | 88 | /** 89 | * get all URI links from PDF document 90 | * @return SparseArray with all URLs by page. Each item in the array has LinkInfo[] array with links or null 91 | * @see LinkInfo 92 | */ 93 | public SparseArray getLinkInfo() { 94 | return mLinkInfo; 95 | } 96 | 97 | } 98 | -------------------------------------------------------------------------------- /main/src/main/java/com/librelio/model/Asset.java: -------------------------------------------------------------------------------- 1 | package com.librelio.model; 2 | 3 | public class Asset { 4 | 5 | public long id; 6 | public String filename; 7 | public String assetfilename; 8 | public String assetUrl; 9 | public int retryCount; 10 | 11 | public Asset(long id, String filename, String assetfilename, String assetUrl, int retryCount) { 12 | super(); 13 | this.id = id; 14 | this.filename = filename; 15 | this.assetfilename = assetfilename; 16 | this.assetUrl = assetUrl; 17 | this.retryCount = retryCount; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /main/src/main/java/com/librelio/model/DownloadStatusCode.java: -------------------------------------------------------------------------------- 1 | package com.librelio.model; 2 | 3 | public class DownloadStatusCode { 4 | 5 | public static final int NOT_DOWNLOADED = -2; 6 | public static final int FAILED = 999; 7 | public static final int QUEUED = -1; 8 | public static final int DOWNLOADED = 101; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /main/src/main/java/com/librelio/model/dictitem/DownloadableDictItem.java: -------------------------------------------------------------------------------- 1 | package com.librelio.model.dictitem; 2 | 3 | import android.support.v4.util.Pair; 4 | 5 | import com.librelio.model.interfaces.DisplayableAsGridItem; 6 | import com.librelio.storage.DownloadsManager; 7 | 8 | public abstract class DownloadableDictItem extends DictItem implements DisplayableAsGridItem { 9 | 10 | // protected int downloadStatus = DownloadStatusCode.NOT_DOWNLOADED; 11 | 12 | public Pair getDownloadStatus() { 13 | return new DownloadsManager(context).getDownloadStatus(getFilePath()); 14 | } 15 | 16 | // public void setDownloadStatus(int downloadStatus) { 17 | // this.downloadStatus = downloadStatus; 18 | // } 19 | 20 | public abstract String getDownloadDate(); 21 | 22 | public abstract void deleteItem(); 23 | } 24 | -------------------------------------------------------------------------------- /main/src/main/java/com/librelio/model/dictitem/DownloadsItem.java: -------------------------------------------------------------------------------- 1 | package com.librelio.model.dictitem; 2 | 3 | import android.support.v4.app.Fragment; 4 | 5 | import com.librelio.fragments.DownloadedMagazinesFragment; 6 | import com.librelio.model.interfaces.DisplayableAsTab; 7 | 8 | 9 | public class DownloadsItem extends DictItem implements DisplayableAsTab { 10 | 11 | public DownloadsItem(String title) { 12 | this.title = title; 13 | } 14 | 15 | @Override 16 | public String getTitle() { 17 | return title; 18 | } 19 | 20 | @Override 21 | public Fragment getFragment() { 22 | return new DownloadedMagazinesFragment(); 23 | } 24 | 25 | @Override 26 | public String getItemUrl() { 27 | return null; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /main/src/main/java/com/librelio/model/dictitem/PlistItem.java: -------------------------------------------------------------------------------- 1 | package com.librelio.model.dictitem; 2 | 3 | import android.content.Context; 4 | import android.support.v4.app.Fragment; 5 | 6 | import com.librelio.LibrelioApplication; 7 | import com.librelio.fragments.PlistGridFragment; 8 | import com.librelio.model.interfaces.DisplayableAsGridItem; 9 | import com.librelio.model.interfaces.DisplayableAsTab; 10 | 11 | import java.util.regex.Matcher; 12 | import java.util.regex.Pattern; 13 | 14 | public class PlistItem extends DictItem implements DisplayableAsTab, DisplayableAsGridItem { 15 | 16 | private final Context context; 17 | private int updateFrequency = -1; 18 | private String itemUrl; 19 | 20 | public PlistItem(Context context, String title, String filePath) { 21 | this.title = title; 22 | this.context = context; 23 | this.filePath = filePath; 24 | 25 | valuesInit(); 26 | } 27 | 28 | void valuesInit() { 29 | 30 | String actualFileName; 31 | Pattern actualFileNamePattern = Pattern.compile("(?=.*\\?)[^\\?]+"); 32 | Matcher actualFileNameMatcher = actualFileNamePattern.matcher(filePath); 33 | if (actualFileNameMatcher.find()) { 34 | actualFileName = actualFileNameMatcher.group(); 35 | } else { 36 | actualFileName = filePath; 37 | } 38 | 39 | Pattern updateFrequencyPattern = Pattern.compile("waupdate=([0-9]+)"); 40 | Matcher updateFrequencyMatcher = updateFrequencyPattern.matcher(filePath); 41 | if (updateFrequencyMatcher.find()) { 42 | updateFrequency = Integer.parseInt(updateFrequencyMatcher.group(1)); 43 | } 44 | 45 | itemUrl = LibrelioApplication.getAmazonServerUrl() + actualFileName; 46 | itemFilename = actualFileName; 47 | pngUrl = itemUrl.replace(".plist", ".png"); 48 | // pngPath = (StorageUtils.getStoragePath(context) + actualFileName).replace(".plist", ".png"); 49 | } 50 | 51 | public int getUpdateFrequency() { 52 | return updateFrequency; 53 | } 54 | 55 | @Override 56 | public Fragment getFragment() { 57 | // TODO send full PlistItem 58 | return PlistGridFragment.newInstance(getFilePath()); 59 | } 60 | 61 | @Override 62 | public String getSubtitle() { 63 | return ""; 64 | } 65 | 66 | @Override 67 | public String getPngUri() { 68 | return null; 69 | } 70 | 71 | @Override 72 | public String getItemUrl() { 73 | return itemUrl; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /main/src/main/java/com/librelio/model/dictitem/RssFeedItem.java: -------------------------------------------------------------------------------- 1 | package com.librelio.model.dictitem; 2 | 3 | import java.io.UnsupportedEncodingException; 4 | import java.net.URLDecoder; 5 | import java.util.regex.Matcher; 6 | import java.util.regex.Pattern; 7 | 8 | import android.support.v4.app.Fragment; 9 | 10 | import com.librelio.fragments.RssFragment; 11 | import com.librelio.model.interfaces.DisplayableAsTab; 12 | 13 | public class RssFeedItem extends DictItem implements DisplayableAsTab { 14 | 15 | String rssUrl; 16 | private String itemUrl; 17 | 18 | public RssFeedItem(String title, String rssFeedAddress) { 19 | this.title = title; 20 | this.filePath = rssFeedAddress; 21 | } 22 | 23 | @Override 24 | protected void initOtherValues() { 25 | super.initOtherValues(); 26 | Pattern actualFileNamePattern = Pattern.compile("waurl=([^\\?]+)&"); 27 | Matcher actualFileNameMatcher = actualFileNamePattern.matcher(filePath); 28 | if (actualFileNameMatcher.find()) { 29 | try { 30 | this.itemUrl = URLDecoder.decode(actualFileNameMatcher.group(1), "utf-8"); 31 | } catch (UnsupportedEncodingException e) { 32 | e.printStackTrace(); 33 | } 34 | } 35 | } 36 | 37 | @Override 38 | public Fragment getFragment() { 39 | return RssFragment.newInstance(getItemUrl()); 40 | } 41 | 42 | @Override 43 | public String getItemUrl() { 44 | return itemUrl; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /main/src/main/java/com/librelio/model/dictitem/UpdatesPlistItem.java: -------------------------------------------------------------------------------- 1 | package com.librelio.model.dictitem; 2 | 3 | import android.content.Context; 4 | 5 | public class UpdatesPlistItem extends PlistItem { 6 | public UpdatesPlistItem(Context context, String title, String filePath) { 7 | super(context, title, filePath); 8 | 9 | // FIXME valuesInit being run twice 10 | this.filePath = filePath.replace(".pdf", "_updates.plist"); 11 | valuesInit(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /main/src/main/java/com/librelio/model/dictitem/WebViewItem.java: -------------------------------------------------------------------------------- 1 | package com.librelio.model.dictitem; 2 | 3 | import android.support.v4.app.Fragment; 4 | 5 | import com.librelio.fragments.WebViewFragment; 6 | import com.librelio.model.interfaces.DisplayableAsTab; 7 | 8 | 9 | public class WebViewItem extends DictItem implements DisplayableAsTab { 10 | 11 | private String itemUrl; 12 | 13 | public WebViewItem(String title, String webAddress) { 14 | this.title = title; 15 | this.itemUrl = webAddress; 16 | } 17 | 18 | @Override 19 | public Fragment getFragment() { 20 | return WebViewFragment.newInstance(getItemUrl()); 21 | } 22 | 23 | @Override 24 | public String getItemUrl() { 25 | return itemUrl; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /main/src/main/java/com/librelio/model/interfaces/DisplayableAsGridItem.java: -------------------------------------------------------------------------------- 1 | package com.librelio.model.interfaces; 2 | 3 | public interface DisplayableAsGridItem { 4 | 5 | public String getTitle(); 6 | 7 | public String getSubtitle(); 8 | 9 | public String getPngUri(); 10 | } 11 | -------------------------------------------------------------------------------- /main/src/main/java/com/librelio/model/interfaces/DisplayableAsTab.java: -------------------------------------------------------------------------------- 1 | package com.librelio.model.interfaces; 2 | 3 | import android.support.v4.app.Fragment; 4 | 5 | public interface DisplayableAsTab { 6 | 7 | public String getTitle(); 8 | 9 | public Fragment getFragment(); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /main/src/main/java/com/librelio/model/interfaces/Downloadable.java: -------------------------------------------------------------------------------- 1 | package com.librelio.model.interfaces; 2 | 3 | import android.content.Context; 4 | 5 | import com.librelio.model.DownloadStatusCode; 6 | 7 | public interface Downloadable { 8 | 9 | DownloadStatusCode statusCode = null; 10 | 11 | public String getItemUrl(); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /main/src/main/java/com/librelio/notifications/GcmBroadcastReceiver.java: -------------------------------------------------------------------------------- 1 | package com.librelio.notifications; 2 | 3 | import android.app.Activity; 4 | import android.content.ComponentName; 5 | import android.content.Context; 6 | import android.content.Intent; 7 | import android.support.v4.content.WakefulBroadcastReceiver; 8 | 9 | public class GcmBroadcastReceiver extends WakefulBroadcastReceiver { 10 | @Override 11 | public void onReceive(Context context, Intent intent) { 12 | // Explicitly specify that GcmIntentService will handle the intent. 13 | ComponentName comp = new ComponentName(context.getPackageName(), 14 | GcmIntentService.class.getName()); 15 | // Start the service, keeping the device awake while it is launching. 16 | startWakefulService(context, (intent.setComponent(comp))); 17 | setResultCode(Activity.RESULT_OK); 18 | } 19 | } -------------------------------------------------------------------------------- /main/src/main/java/com/librelio/receiver/MagazineDownloadReceiver.java: -------------------------------------------------------------------------------- 1 | package com.librelio.receiver; 2 | 3 | import android.app.DownloadManager; 4 | import android.content.BroadcastReceiver; 5 | import android.content.Context; 6 | import android.content.Intent; 7 | 8 | import com.librelio.activity.MainTabsActivity; 9 | import com.librelio.service.MagazineDownloadService; 10 | 11 | public class MagazineDownloadReceiver extends BroadcastReceiver { 12 | private static final String TAG = "MagazineDownloadReceiver"; 13 | private DownloadManager mDManager; 14 | 15 | @Override 16 | public void onReceive(Context context, Intent intent) { 17 | if (DownloadManager.ACTION_NOTIFICATION_CLICKED.equals(intent.getAction())) { 18 | Intent startMainMagazineActivityIntent = new Intent(context, MainTabsActivity.class); 19 | startMainMagazineActivityIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 20 | context.startActivity(startMainMagazineActivityIntent); 21 | } else if (DownloadManager.ACTION_DOWNLOAD_COMPLETE.equals(intent.getAction())) { 22 | Intent downloadCompleteIntent = new Intent(context, MagazineDownloadService.class); 23 | downloadCompleteIntent.putExtras(intent.getExtras()); 24 | context.startService(downloadCompleteIntent); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /main/src/main/java/com/librelio/task/CreateTempVideoTask.java: -------------------------------------------------------------------------------- 1 | package com.librelio.task; 2 | 3 | import java.io.File; 4 | import java.io.FileInputStream; 5 | import java.io.FileNotFoundException; 6 | import java.io.FileOutputStream; 7 | import java.io.IOException; 8 | import java.io.InputStream; 9 | import java.io.OutputStream; 10 | 11 | import android.os.AsyncTask; 12 | import android.util.Log; 13 | 14 | public class CreateTempVideoTask extends AsyncTask { 15 | private static final String TAG = "CreateTempVideoTask"; 16 | 17 | public static final String IOEXEPTION_CODE = "io_exeption_code"; 18 | 19 | private final String videoTempPath; 20 | private final String basePath; 21 | 22 | 23 | 24 | public CreateTempVideoTask(String videoTempPath, String basePath) { 25 | this.videoTempPath = videoTempPath; 26 | this.basePath = basePath; 27 | } 28 | 29 | // public CreateTempVideoTask(String videoTempPath) { 30 | // this(videoTempPath, null); 31 | // } 32 | 33 | @Override 34 | protected String doInBackground(String... videoPaths) { 35 | if (null == basePath) { 36 | return createTempVideoFile(videoPaths[0]); 37 | } else { 38 | return createTempVideoFile(getUrlFromLocalhost(basePath, videoPaths[0])); 39 | } 40 | } 41 | 42 | @Override 43 | protected void onPostExecute(String path) { 44 | super.onPostExecute(path); 45 | File tmp = new File(path); 46 | tmp.delete(); 47 | Log.d(TAG, "Deleted temp video file " + path); 48 | } 49 | 50 | /** 51 | * Creates temp video file from internal path 52 | * 53 | * @param videoPath 54 | * the internal path 55 | * @return video temp url 56 | */ 57 | protected String createTempVideoFile(String videoPath){ 58 | final String temPath = videoTempPath; 59 | File video = new File(videoPath); 60 | File tmp = new File(temPath); 61 | // 62 | try { 63 | InputStream in = new FileInputStream(video); 64 | OutputStream out = new FileOutputStream(tmp); 65 | byte[] buf = new byte[1024]; 66 | int len; 67 | while ((len = in.read(buf)) > 0) { 68 | out.write(buf, 0, len); 69 | } 70 | in.close(); 71 | out.close(); 72 | Log.d(TAG, "Created temp video file " + temPath + " => " + tmp.length()); 73 | return temPath; 74 | } catch (FileNotFoundException e) { 75 | Log.e(TAG, "Create temp video file failed", e); 76 | return IOEXEPTION_CODE; 77 | } catch (IOException e) { 78 | Log.e(TAG, "Create temp video file failed", e); 79 | return IOEXEPTION_CODE; 80 | } 81 | } 82 | 83 | 84 | private String getUrlFromLocalhost(String basePath, String uriString) { 85 | String local = "http://localhost/"; 86 | int startIdx = local.length(); 87 | int finIdx = uriString.length(); 88 | if(uriString.contains("?")){ 89 | finIdx = uriString.indexOf("?"); 90 | } 91 | String assetsFile = uriString.substring(startIdx, finIdx); 92 | return basePath + "/" + assetsFile; 93 | } 94 | 95 | } -------------------------------------------------------------------------------- /main/src/main/java/com/librelio/task/SafeAsyncTask.java: -------------------------------------------------------------------------------- 1 | package com.librelio.task; 2 | 3 | import android.os.AsyncTask; 4 | import java.util.concurrent.RejectedExecutionException; 5 | 6 | 7 | public abstract class SafeAsyncTask extends AsyncTask { 8 | public void safeExecute(Params... params) { 9 | try { 10 | execute(params); 11 | } catch(RejectedExecutionException e) { 12 | // Failed to start in the background, so do it in the foreground 13 | onPreExecute(); 14 | if (isCancelled()) { 15 | onCancelled(); 16 | } else { 17 | onPostExecute(doInBackground(params)); 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /main/src/main/java/com/librelio/task/TinySafeAsyncTask.java: -------------------------------------------------------------------------------- 1 | package com.librelio.task; 2 | 3 | import java.util.concurrent.RejectedExecutionException; 4 | 5 | 6 | public abstract class TinySafeAsyncTask extends TinyAsyncTask { 7 | public void safeExecute(Params... params) { 8 | try { 9 | execute(params); 10 | } catch(RejectedExecutionException e) { 11 | // Failed to start in the background, so do it in the foreground 12 | onPreExecute(); 13 | if (isCancelled()) { 14 | onCancelled(); 15 | } else { 16 | onPostExecute(doInBackground(params)); 17 | } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /main/src/main/java/com/librelio/utils/PlistUtils.java: -------------------------------------------------------------------------------- 1 | package com.librelio.utils; 2 | 3 | import android.content.Context; 4 | import android.util.Log; 5 | 6 | import com.librelio.model.dictitem.DictItem; 7 | import com.librelio.model.dictitem.PlistItem; 8 | import com.longevitysoft.android.xml.plist.PListXMLHandler; 9 | import com.longevitysoft.android.xml.plist.PListXMLParser; 10 | import com.longevitysoft.android.xml.plist.domain.Array; 11 | import com.longevitysoft.android.xml.plist.domain.Dict; 12 | import com.longevitysoft.android.xml.plist.domain.PList; 13 | 14 | import org.apache.commons.io.FilenameUtils; 15 | 16 | import java.util.ArrayList; 17 | 18 | public class PlistUtils { 19 | 20 | private static final String TAG = "PlistParserLoader"; 21 | 22 | public static ArrayList parsePlist(Context context, String plistName) { 23 | 24 | PlistItem plistItem = new PlistItem(context, "", plistName); 25 | 26 | ArrayList magazines = new ArrayList(); 27 | 28 | //Convert plist to String for parsing 29 | String pList = StorageUtils.getFilePathFromAssetsOrLocalStorage(context, plistItem 30 | .getItemFileName()); 31 | 32 | if (pList == null) { 33 | return null; 34 | } 35 | 36 | try { 37 | //Parse plist 38 | PListXMLHandler handler = new PListXMLHandler(); 39 | PListXMLParser parser = new PListXMLParser(); 40 | parser.setHandler(handler); 41 | parser.parse(pList); 42 | PList list = ((PListXMLHandler) parser.getHandler()).getPlist(); 43 | Array arr = (Array) list.getRootElement(); 44 | for (int i = 0; i < arr.size(); i++) { 45 | Dict dict = (Dict) arr.get(i); 46 | String pathBit = FilenameUtils.getPath(plistName); 47 | DictItem item = DictItem.parse(context, dict, pathBit); 48 | magazines.add(item); 49 | } 50 | } catch (Exception e) { 51 | Log.d(TAG, "plist = " + pList); 52 | e.printStackTrace(); 53 | } 54 | 55 | // if (BuildConfig.DEBUG) { 56 | // Log.d(getClass().getSimpleName(), "finished parsing plist: " + plistName); 57 | // } 58 | return magazines; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /main/src/main/java/com/librelio/utils/PurchaseUtils.java: -------------------------------------------------------------------------------- 1 | package com.librelio.utils; 2 | 3 | import android.content.Context; 4 | import android.text.SpannableString; 5 | import android.text.Spanned; 6 | import android.text.style.RelativeSizeSpan; 7 | 8 | import com.librelio.activity.BillingActivity; 9 | 10 | public class PurchaseUtils { 11 | 12 | public static SpannableString getFormattedPriceForButton(String title, String 13 | price) { 14 | SpannableString priceText = new SpannableString(price + "\n" + title); 15 | priceText.setSpan(new RelativeSizeSpan(0.7f), price.length() + 1, priceText.length(), 16 | Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); 17 | return priceText; 18 | } 19 | 20 | public static String getSavedSubscriberCode(Context context) { 21 | return context.getSharedPreferences(BillingActivity.SUBSCRIPTION_PREF, Context.MODE_PRIVATE) 22 | .getString(BillingActivity.PARAM_SUBSCRIPTION_CODE, null); 23 | } 24 | 25 | public static String getSavedUsername(Context context) { 26 | return context.getSharedPreferences(BillingActivity.SUBSCRIPTION_PREF, Context.MODE_PRIVATE) 27 | .getString(BillingActivity.PARAM_USERNAME, null); 28 | } 29 | 30 | public static String getSavedPassword(Context context) { 31 | return context.getSharedPreferences(BillingActivity.SUBSCRIPTION_PREF, Context.MODE_PRIVATE) 32 | .getString(BillingActivity.PARAM_PASSWORD, null); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /main/src/main/java/com/librelio/utils/SubscriptionUtils.java: -------------------------------------------------------------------------------- 1 | package com.librelio.utils; 2 | 3 | import android.content.Context; 4 | import java.io.*; 5 | import javax.xml.parsers.DocumentBuilderFactory; 6 | import javax.xml.parsers.DocumentBuilder; 7 | import org.w3c.dom.*; 8 | 9 | /** 10 | * Created by odin on 19/06/2017. 11 | */ 12 | 13 | public class SubscriptionUtils { 14 | 15 | public static String getSubscriptionsCode(Context context, String wantedCode) { 16 | String subscriptionSCodesPlistURL = "subscriptions_codes.plist?waupdate=30"; 17 | PlistDownloader.updateFromServer(context, subscriptionSCodesPlistURL, true, false); 18 | String pList = StorageUtils.getFilePathFromAssetsOrLocalStorage(context, "subscriptions_codes.plist"); 19 | 20 | if (pList == null) { 21 | return null; 22 | } 23 | 24 | DocumentBuilderFactory factory; 25 | DocumentBuilder builder; 26 | InputStream is; 27 | Document dom; 28 | String code = ""; 29 | try { 30 | factory = DocumentBuilderFactory.newInstance(); 31 | builder = factory.newDocumentBuilder(); 32 | 33 | is = new ByteArrayInputStream(pList.getBytes("UTF-8")); 34 | 35 | dom = builder.parse(is); 36 | NodeList dictContent = dom.getElementsByTagName("dict").item(0).getChildNodes(); 37 | int length = dictContent.getLength(); 38 | String previousKey = ""; 39 | for (int i = 0; i < length; i++) { 40 | if (dictContent.item(i).getNodeType() == Node.ELEMENT_NODE) { 41 | Element el = (Element) dictContent.item(i); 42 | if (el.getNodeName().contains("key")) { 43 | previousKey = el.getTextContent(); 44 | } 45 | if(previousKey.startsWith(wantedCode)) { 46 | if (el.getNodeName().contains("string")) { 47 | code = el.getTextContent(); 48 | } 49 | } 50 | } 51 | } 52 | } 53 | catch(Exception e){ 54 | 55 | } 56 | 57 | return code; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /main/src/main/java/com/librelio/view/AutofitRecyclerView.java: -------------------------------------------------------------------------------- 1 | package com.librelio.view; 2 | 3 | import android.content.Context; 4 | import android.content.res.TypedArray; 5 | import android.support.v7.widget.GridLayoutManager; 6 | import android.support.v7.widget.RecyclerView; 7 | import android.util.AttributeSet; 8 | 9 | public class AutofitRecyclerView extends RecyclerView { 10 | private GridLayoutManager manager; 11 | private int columnWidth = -1; 12 | 13 | public AutofitRecyclerView(Context context) { 14 | super(context); 15 | init(context, null); 16 | } 17 | 18 | public AutofitRecyclerView(Context context, AttributeSet attrs) { 19 | super(context, attrs); 20 | init(context, attrs); 21 | } 22 | 23 | public AutofitRecyclerView(Context context, AttributeSet attrs, int defStyle) { 24 | super(context, attrs, defStyle); 25 | init(context, attrs); 26 | } 27 | 28 | private void init(Context context, AttributeSet attrs) { 29 | if (attrs != null) { 30 | int[] attrsArray = { 31 | android.R.attr.columnWidth 32 | }; 33 | TypedArray array = context.obtainStyledAttributes(attrs, attrsArray); 34 | columnWidth = array.getDimensionPixelSize(0, -1); 35 | array.recycle(); 36 | } 37 | 38 | manager = new GridLayoutManager(getContext(), 1); 39 | setLayoutManager(manager); 40 | } 41 | 42 | @Override 43 | protected void onMeasure(int widthSpec, int heightSpec) { 44 | super.onMeasure(widthSpec, heightSpec); 45 | if (columnWidth > 0) { 46 | int spanCount = Math.max(1, getMeasuredWidth() / columnWidth); 47 | manager.setSpanCount(spanCount); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /main/src/main/java/com/librelio/view/RecyclerItemClickListener.java: -------------------------------------------------------------------------------- 1 | package com.librelio.view; 2 | 3 | import android.content.Context; 4 | import android.support.v7.widget.RecyclerView; 5 | import android.view.GestureDetector; 6 | import android.view.MotionEvent; 7 | import android.view.View; 8 | 9 | public class RecyclerItemClickListener implements RecyclerView.OnItemTouchListener { 10 | private OnItemClickListener mListener; 11 | 12 | public interface OnItemClickListener { 13 | public void onItemClick(View view, int position); 14 | } 15 | 16 | GestureDetector mGestureDetector; 17 | 18 | public RecyclerItemClickListener(Context context, OnItemClickListener listener) { 19 | mListener = listener; 20 | mGestureDetector = new GestureDetector(context, new GestureDetector.SimpleOnGestureListener() { 21 | @Override public boolean onSingleTapUp(MotionEvent e) { 22 | return true; 23 | } 24 | }); 25 | } 26 | 27 | @Override public boolean onInterceptTouchEvent(RecyclerView view, MotionEvent e) { 28 | View childView = view.findChildViewUnder(e.getX(), e.getY()); 29 | if (childView != null && mListener != null && mGestureDetector.onTouchEvent(e)) { 30 | mListener.onItemClick(childView, view.getChildPosition(childView)); 31 | return true; 32 | } 33 | return false; 34 | } 35 | 36 | @Override public void onTouchEvent(RecyclerView view, MotionEvent motionEvent) { } 37 | 38 | @Override 39 | public void onRequestDisallowInterceptTouchEvent(boolean b) { 40 | 41 | } 42 | } -------------------------------------------------------------------------------- /main/src/main/java/com/librelio/view/SubscriberCodeDialog.java: -------------------------------------------------------------------------------- 1 | package com.librelio.view; 2 | 3 | import android.content.Context; 4 | import android.text.TextUtils; 5 | import android.widget.EditText; 6 | 7 | import com.afollestad.materialdialogs.MaterialDialog; 8 | import com.niveales.wind.R; 9 | 10 | public class SubscriberCodeDialog { 11 | 12 | private final boolean error; 13 | private Context context; 14 | private String title; 15 | 16 | private OnSubscriberCodeListener onSubscriberCodeListener; 17 | private EditText subscriberCode; 18 | private MaterialDialog dialog; 19 | 20 | public interface OnSubscriberCodeListener { 21 | void onEnterValue(String value); 22 | void onCancel(); 23 | } 24 | 25 | public SubscriberCodeDialog(Context context, String title, boolean error) { 26 | this.context = context; 27 | this.title = title; 28 | this.error = error; 29 | configureDialog(); 30 | } 31 | 32 | private void configureDialog(){ 33 | dialog = new MaterialDialog.Builder(context) 34 | .title(title) 35 | .customView(R.layout.subscriber_code_dialog, false) 36 | .cancelable(false) 37 | .autoDismiss(false) 38 | .positiveText(R.string.login) 39 | .negativeText(R.string.cancel) 40 | .callback(new MaterialDialog.ButtonCallback() { 41 | @Override 42 | public void onPositive(MaterialDialog dialog) { 43 | super.onPositive(dialog); 44 | EditText code = (EditText) dialog.findViewById(R.id.subscriber_code); 45 | if (TextUtils.isEmpty(code.getText().toString())) { 46 | code.setError(context.getString(R.string 47 | .subscriber_code_cannot_be_empty)); 48 | return; 49 | } 50 | onSubscriberCodeListener.onEnterValue(code.getText().toString().trim()); 51 | dialog.dismiss(); 52 | } 53 | 54 | @Override 55 | public void onNegative(MaterialDialog dialog) { 56 | super.onNegative(dialog); 57 | onSubscriberCodeListener.onCancel(); 58 | dialog.dismiss(); 59 | } 60 | }) 61 | .build(); 62 | 63 | if (error) { 64 | EditText subscriberCode = (EditText) dialog.findViewById(R.id.subscriber_code); 65 | subscriberCode.setError(context.getString(R.string.incorrect_code)); 66 | } 67 | } 68 | 69 | public void setSubscriberCodeListener(OnSubscriberCodeListener onSubscriberCodeListener){ 70 | this.onSubscriberCodeListener = onSubscriberCodeListener; 71 | } 72 | 73 | public void show(){ 74 | if (null != dialog){ 75 | dialog.show(); 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /main/src/main/java/com/librelio/view/UsernamePasswordLoginDialog.java: -------------------------------------------------------------------------------- 1 | package com.librelio.view; 2 | 3 | import android.content.Context; 4 | import android.text.TextUtils; 5 | import android.widget.EditText; 6 | 7 | import com.afollestad.materialdialogs.MaterialDialog; 8 | import com.niveales.wind.R; 9 | 10 | public class UsernamePasswordLoginDialog { 11 | 12 | private Context context; 13 | private String title; 14 | private boolean error; 15 | 16 | private OnUsernamePasswordLoginListener onUsernamePasswordLoginListener; 17 | private MaterialDialog dialog; 18 | 19 | public interface OnUsernamePasswordLoginListener { 20 | void onEnterUsernamePasswordLogin(String username, String password); 21 | void onCancel(); 22 | } 23 | 24 | public UsernamePasswordLoginDialog(Context context, String title, boolean error) { 25 | this.context = context; 26 | this.title = title; 27 | this.error = error; 28 | configureDialog(); 29 | } 30 | 31 | private void configureDialog(){ 32 | dialog = new MaterialDialog.Builder(context) 33 | .title(title) 34 | .customView(R.layout.username_password_login_dialog, false) 35 | .cancelable(false) 36 | .autoDismiss(false) 37 | .positiveText(R.string.login) 38 | .negativeText(R.string.cancel) 39 | .callback(new MaterialDialog.ButtonCallback() { 40 | @Override 41 | public void onPositive(MaterialDialog dialog) { 42 | super.onPositive(dialog); 43 | EditText username = (EditText) dialog.findViewById(R.id.username); 44 | if (TextUtils.isEmpty(username.getText().toString())) { 45 | username.setError(context.getString(R.string.username_cannot_be_empty)); 46 | return; 47 | } 48 | EditText password = (EditText) dialog.findViewById(R.id.password); 49 | if (TextUtils.isEmpty(password.getText().toString())) { 50 | password.setError(context.getString(R.string.password_cannot_be_empty)); 51 | return; 52 | } 53 | onUsernamePasswordLoginListener.onEnterUsernamePasswordLogin( 54 | username.getText().toString().trim(), 55 | password.getText().toString().trim()); 56 | dialog.dismiss(); 57 | } 58 | 59 | @Override 60 | public void onNegative(MaterialDialog dialog) { 61 | super.onNegative(dialog); 62 | onUsernamePasswordLoginListener.onCancel(); 63 | dialog.dismiss(); 64 | } 65 | }) 66 | .build(); 67 | 68 | if (error) { 69 | EditText password = (EditText) dialog.findViewById(R.id.password); 70 | password.setError(context.getString(R.string.incorrect_username_or_password)); 71 | } 72 | } 73 | 74 | public void setOnUsernamePasswordLoginListener(OnUsernamePasswordLoginListener onUsernamePasswordLoginListener){ 75 | this.onUsernamePasswordLoginListener = onUsernamePasswordLoginListener; 76 | } 77 | 78 | public void show(){ 79 | if (null != dialog){ 80 | dialog.show(); 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /main/src/main/java/com/loopj/android/http/SerializableCookie.java: -------------------------------------------------------------------------------- 1 | /* 2 | Android Asynchronous Http Client 3 | Copyright (c) 2011 James Smith 4 | http://loopj.com 5 | 6 | Licensed under the Apache License, Version 2.0 (the "License"); 7 | you may not use this file except in compliance with the License. 8 | You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, software 13 | distributed under the License is distributed on an "AS IS" BASIS, 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | See the License for the specific language governing permissions and 16 | limitations under the License. 17 | */ 18 | 19 | package com.loopj.android.http; 20 | 21 | import java.io.Serializable; 22 | import java.io.ObjectInputStream; 23 | import java.io.ObjectOutputStream; 24 | import java.io.IOException; 25 | import java.util.Date; 26 | 27 | import org.apache.http.cookie.Cookie; 28 | import org.apache.http.impl.cookie.BasicClientCookie; 29 | 30 | /** 31 | * A wrapper class around {@link Cookie} and/or {@link BasicClientCookie} 32 | * designed for use in {@link PersistentCookieStore}. 33 | */ 34 | public class SerializableCookie implements Serializable { 35 | private static final long serialVersionUID = 6374381828722046732L; 36 | 37 | private transient final Cookie cookie; 38 | private transient BasicClientCookie clientCookie; 39 | 40 | public SerializableCookie(Cookie cookie) { 41 | this.cookie = cookie; 42 | } 43 | 44 | public Cookie getCookie() { 45 | Cookie bestCookie = cookie; 46 | if(clientCookie != null) { 47 | bestCookie = clientCookie; 48 | } 49 | return bestCookie; 50 | } 51 | 52 | private void writeObject(ObjectOutputStream out) throws IOException { 53 | out.writeObject(cookie.getName()); 54 | out.writeObject(cookie.getValue()); 55 | out.writeObject(cookie.getComment()); 56 | out.writeObject(cookie.getDomain()); 57 | out.writeObject(cookie.getExpiryDate()); 58 | out.writeObject(cookie.getPath()); 59 | out.writeInt(cookie.getVersion()); 60 | out.writeBoolean(cookie.isSecure()); 61 | } 62 | 63 | private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { 64 | String name = (String)in.readObject(); 65 | String value = (String)in.readObject(); 66 | clientCookie = new BasicClientCookie(name, value); 67 | clientCookie.setComment((String)in.readObject()); 68 | clientCookie.setDomain((String)in.readObject()); 69 | clientCookie.setExpiryDate((Date)in.readObject()); 70 | clientCookie.setPath((String)in.readObject()); 71 | clientCookie.setVersion(in.readInt()); 72 | clientCookie.setSecure(in.readBoolean()); 73 | } 74 | } -------------------------------------------------------------------------------- /main/src/main/java/com/loopj/android/http/SyncHttpClient.java: -------------------------------------------------------------------------------- 1 | package com.loopj.android.http; 2 | 3 | import org.apache.http.client.methods.HttpUriRequest; 4 | import org.apache.http.impl.client.DefaultHttpClient; 5 | import org.apache.http.protocol.HttpContext; 6 | 7 | import android.content.Context; 8 | import android.os.Message; 9 | 10 | public abstract class SyncHttpClient extends AsyncHttpClient { 11 | private int responseCode; 12 | /* 13 | * as this is a synchronous request this is just a helping mechanism to pass 14 | * the result back to this method. Therefore the result object has to be a 15 | * field to be accessible 16 | */ 17 | protected String result; 18 | protected AsyncHttpResponseHandler responseHandler = new AsyncHttpResponseHandler() { 19 | 20 | @Override 21 | void sendResponseMessage(org.apache.http.HttpResponse response) { 22 | responseCode = response.getStatusLine().getStatusCode(); 23 | super.sendResponseMessage(response); 24 | }; 25 | 26 | @Override 27 | protected void sendMessage(Message msg) { 28 | /* 29 | * Dont use the handler and send it directly to the analysis 30 | * (because its all the same thread) 31 | */ 32 | handleMessage(msg); 33 | } 34 | 35 | @Override 36 | public void onSuccess(String content) { 37 | result = content; 38 | } 39 | 40 | @Override 41 | public void onFailure(Throwable error, String content) { 42 | result = onRequestFailed(error, content); 43 | } 44 | }; 45 | 46 | /** 47 | * @return the response code for the last request, might be usefull 48 | * sometimes 49 | */ 50 | public int getResponseCode() { 51 | return responseCode; 52 | } 53 | 54 | // Private stuff 55 | @Override 56 | protected void sendRequest(DefaultHttpClient client, 57 | HttpContext httpContext, HttpUriRequest uriRequest, 58 | String contentType, AsyncHttpResponseHandler responseHandler, 59 | Context context) { 60 | if (contentType != null) { 61 | uriRequest.addHeader("Content-Type", contentType); 62 | } 63 | 64 | /* 65 | * will execute the request directly 66 | */ 67 | new AsyncHttpRequest(client, httpContext, uriRequest, responseHandler) 68 | .run(); 69 | } 70 | 71 | public abstract String onRequestFailed(Throwable error, String content); 72 | 73 | public void delete(String url, RequestParams queryParams, 74 | AsyncHttpResponseHandler responseHandler) { 75 | // TODO what about query params?? 76 | delete(url, responseHandler); 77 | } 78 | 79 | public String get(String url, RequestParams params) { 80 | this.get(url, params, responseHandler); 81 | /* 82 | * the response handler will have set the result when this line is 83 | * reached 84 | */ 85 | return result; 86 | } 87 | 88 | public String get(String url) { 89 | this.get(url, null, responseHandler); 90 | return result; 91 | } 92 | 93 | public String put(String url, RequestParams params) { 94 | this.put(url, params, responseHandler); 95 | return result; 96 | } 97 | 98 | public String put(String url) { 99 | this.put(url, null, responseHandler); 100 | return result; 101 | } 102 | 103 | public String post(String url, RequestParams params) { 104 | this.post(url, params, responseHandler); 105 | return result; 106 | } 107 | 108 | public String post(String url) { 109 | this.post(url, null, responseHandler); 110 | return result; 111 | } 112 | 113 | public String delete(String url, RequestParams params) { 114 | this.delete(url, params, responseHandler); 115 | return result; 116 | } 117 | 118 | public String delete(String url) { 119 | this.delete(url, null, responseHandler); 120 | return result; 121 | } 122 | 123 | } 124 | -------------------------------------------------------------------------------- /main/src/main/java/nl/matshofman/saxrssreader/RssFeed.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 Mats Hofman 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package nl.matshofman.saxrssreader; 18 | 19 | import java.util.ArrayList; 20 | 21 | import android.os.Bundle; 22 | import android.os.Parcel; 23 | import android.os.Parcelable; 24 | 25 | public class RssFeed implements Parcelable { 26 | 27 | private String title; 28 | private String link; 29 | private String description; 30 | private String language; 31 | private ArrayList rssItems; 32 | 33 | public RssFeed() { 34 | rssItems = new ArrayList(); 35 | } 36 | 37 | public RssFeed(Parcel source) { 38 | 39 | Bundle data = source.readBundle(); 40 | title = data.getString("title"); 41 | link = data.getString("link"); 42 | description = data.getString("description"); 43 | language = data.getString("language"); 44 | rssItems = data.getParcelableArrayList("rssItems"); 45 | 46 | } 47 | 48 | @Override 49 | public void writeToParcel(Parcel dest, int flags) { 50 | 51 | Bundle data = new Bundle(); 52 | data.putString("title", title); 53 | data.putString("link", link); 54 | data.putString("description", description); 55 | data.putString("language", language); 56 | data.putParcelableArrayList("rssItems", rssItems); 57 | dest.writeBundle(data); 58 | } 59 | 60 | public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { 61 | public RssFeed createFromParcel(Parcel data) { 62 | return new RssFeed(data); 63 | } 64 | public RssFeed[] newArray(int size) { 65 | return new RssFeed[size]; 66 | } 67 | }; 68 | 69 | @Override 70 | public int describeContents() { 71 | return 0; 72 | } 73 | 74 | void addRssItem(RssItem rssItem) { 75 | rssItems.add(rssItem); 76 | } 77 | 78 | public String getTitle() { 79 | return title; 80 | } 81 | 82 | public void setTitle(String title) { 83 | this.title = title; 84 | } 85 | 86 | public String getLink() { 87 | return link; 88 | } 89 | 90 | public void setLink(String link) { 91 | this.link = link; 92 | } 93 | 94 | public String getDescription() { 95 | return description; 96 | } 97 | 98 | public void setDescription(String description) { 99 | this.description = description; 100 | } 101 | 102 | public String getLanguage() { 103 | return language; 104 | } 105 | 106 | public void setLanguage(String language) { 107 | this.language = language; 108 | } 109 | 110 | public ArrayList getRssItems() { 111 | return rssItems; 112 | } 113 | 114 | public void setRssItems(ArrayList rssItems) { 115 | this.rssItems = rssItems; 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /main/src/main/java/nl/matshofman/saxrssreader/RssHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 Mats Hofman 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package nl.matshofman.saxrssreader; 18 | 19 | import java.lang.reflect.InvocationTargetException; 20 | import java.lang.reflect.Method; 21 | 22 | import org.xml.sax.Attributes; 23 | import org.xml.sax.helpers.DefaultHandler; 24 | 25 | public class RssHandler extends DefaultHandler { 26 | 27 | private RssFeed rssFeed; 28 | private RssItem rssItem; 29 | private StringBuilder stringBuilder; 30 | 31 | @Override 32 | public void startDocument() { 33 | rssFeed = new RssFeed(); 34 | } 35 | 36 | /** 37 | * Return the parsed RssFeed with it's RssItems 38 | * @return 39 | */ 40 | public RssFeed getResult() { 41 | return rssFeed; 42 | } 43 | 44 | @Override 45 | public void startElement(String uri, String localName, String qName, Attributes attributes) { 46 | stringBuilder = new StringBuilder(); 47 | 48 | if(qName.equals("item") && rssFeed != null) { 49 | rssItem = new RssItem(); 50 | rssItem.setFeed(rssFeed); 51 | rssFeed.addRssItem(rssItem); 52 | } 53 | } 54 | 55 | @Override 56 | public void characters(char[] ch, int start, int length) { 57 | stringBuilder.append(ch, start, length); 58 | } 59 | 60 | @Override 61 | public void endElement(String uri, String localName, String qName) { 62 | 63 | if(rssFeed != null && rssItem == null) { 64 | // Parse feed properties 65 | 66 | try { 67 | if (qName != null && qName.length() > 0) { 68 | String methodName = "set" + qName.substring(0, 1).toUpperCase() + qName.substring(1); 69 | Method method = rssFeed.getClass().getMethod(methodName, String.class); 70 | method.invoke(rssFeed, stringBuilder.toString()); 71 | } 72 | } catch (SecurityException e) { 73 | } catch (NoSuchMethodException e) { 74 | } catch (IllegalArgumentException e) { 75 | } catch (IllegalAccessException e) { 76 | } catch (InvocationTargetException e) { 77 | } 78 | 79 | } else if (rssItem != null) { 80 | // Parse item properties 81 | 82 | try { 83 | if(qName.equals("content:encoded")) 84 | qName = "content"; 85 | String methodName = "set" + qName.substring(0, 1).toUpperCase() + qName.substring(1); 86 | Method method = rssItem.getClass().getMethod(methodName, String.class); 87 | method.invoke(rssItem, stringBuilder.toString()); 88 | } catch (SecurityException e) { 89 | } catch (NoSuchMethodException e) { 90 | } catch (IllegalArgumentException e) { 91 | } catch (IllegalAccessException e) { 92 | } catch (InvocationTargetException e) { 93 | } 94 | } 95 | 96 | } 97 | 98 | } 99 | -------------------------------------------------------------------------------- /main/src/main/java/nl/matshofman/saxrssreader/RssReader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 Mats Hofman 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package nl.matshofman.saxrssreader; 18 | 19 | import java.io.IOException; 20 | import java.io.InputStream; 21 | import java.net.URL; 22 | 23 | import javax.xml.parsers.ParserConfigurationException; 24 | import javax.xml.parsers.SAXParser; 25 | import javax.xml.parsers.SAXParserFactory; 26 | 27 | import org.xml.sax.InputSource; 28 | import org.xml.sax.SAXException; 29 | import org.xml.sax.XMLReader; 30 | 31 | public class RssReader { 32 | 33 | public static RssFeed read(URL url) throws SAXException, IOException { 34 | 35 | return read(url.openStream()); 36 | 37 | } 38 | 39 | public static RssFeed read(InputStream stream) throws SAXException, IOException { 40 | 41 | try { 42 | 43 | SAXParserFactory factory = SAXParserFactory.newInstance(); 44 | SAXParser parser = factory.newSAXParser(); 45 | XMLReader reader = parser.getXMLReader(); 46 | RssHandler handler = new RssHandler(); 47 | InputSource input = new InputSource(stream); 48 | 49 | reader.setContentHandler(handler); 50 | reader.parse(input); 51 | 52 | return handler.getResult(); 53 | 54 | } catch (ParserConfigurationException e) { 55 | throw new SAXException(); 56 | } 57 | 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /main/src/main/jniLibs/armeabi-v7a/libmupdf.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/jniLibs/armeabi-v7a/libmupdf.so -------------------------------------------------------------------------------- /main/src/main/jniLibs/armeabi/libmupdf.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/jniLibs/armeabi/libmupdf.so -------------------------------------------------------------------------------- /main/src/main/res/anim/flip_left_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /main/src/main/res/anim/flip_right_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /main/src/main/res/color/magazine_view_button_text_color.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /main/src/main/res/drawable-hdpi/ic_list_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable-hdpi/ic_list_white_24dp.png -------------------------------------------------------------------------------- /main/src/main/res/drawable-hdpi/ic_more_vert_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable-hdpi/ic_more_vert_white_24dp.png -------------------------------------------------------------------------------- /main/src/main/res/drawable-hdpi/ic_open_in_browser_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable-hdpi/ic_open_in_browser_white_24dp.png -------------------------------------------------------------------------------- /main/src/main/res/drawable-hdpi/ic_refresh_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable-hdpi/ic_refresh_white_24dp.png -------------------------------------------------------------------------------- /main/src/main/res/drawable-mdpi/ic_list_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable-mdpi/ic_list_white_24dp.png -------------------------------------------------------------------------------- /main/src/main/res/drawable-mdpi/ic_more_vert_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable-mdpi/ic_more_vert_white_24dp.png -------------------------------------------------------------------------------- /main/src/main/res/drawable-mdpi/ic_open_in_browser_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable-mdpi/ic_open_in_browser_white_24dp.png -------------------------------------------------------------------------------- /main/src/main/res/drawable-mdpi/ic_refresh_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable-mdpi/ic_refresh_white_24dp.png -------------------------------------------------------------------------------- /main/src/main/res/drawable-nodpi/generic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable-nodpi/generic.png -------------------------------------------------------------------------------- /main/src/main/res/drawable-nodpi/magazines_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable-nodpi/magazines_background.png -------------------------------------------------------------------------------- /main/src/main/res/drawable-nodpi/startup_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable-nodpi/startup_background.png -------------------------------------------------------------------------------- /main/src/main/res/drawable-xhdpi/ic_list_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable-xhdpi/ic_list_white_24dp.png -------------------------------------------------------------------------------- /main/src/main/res/drawable-xhdpi/ic_more_vert_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable-xhdpi/ic_more_vert_white_24dp.png -------------------------------------------------------------------------------- /main/src/main/res/drawable-xhdpi/ic_open_in_browser_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable-xhdpi/ic_open_in_browser_white_24dp.png -------------------------------------------------------------------------------- /main/src/main/res/drawable-xhdpi/ic_refresh_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable-xhdpi/ic_refresh_white_24dp.png -------------------------------------------------------------------------------- /main/src/main/res/drawable-xxhdpi/ic_list_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable-xxhdpi/ic_list_white_24dp.png -------------------------------------------------------------------------------- /main/src/main/res/drawable-xxhdpi/ic_more_vert_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable-xxhdpi/ic_more_vert_white_24dp.png -------------------------------------------------------------------------------- /main/src/main/res/drawable-xxhdpi/ic_open_in_browser_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable-xxhdpi/ic_open_in_browser_white_24dp.png -------------------------------------------------------------------------------- /main/src/main/res/drawable-xxhdpi/ic_refresh_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable-xxhdpi/ic_refresh_white_24dp.png -------------------------------------------------------------------------------- /main/src/main/res/drawable-xxxhdpi/ic_list_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable-xxxhdpi/ic_list_white_24dp.png -------------------------------------------------------------------------------- /main/src/main/res/drawable-xxxhdpi/ic_more_vert_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable-xxxhdpi/ic_more_vert_white_24dp.png -------------------------------------------------------------------------------- /main/src/main/res/drawable-xxxhdpi/ic_open_in_browser_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable-xxxhdpi/ic_open_in_browser_white_24dp.png -------------------------------------------------------------------------------- /main/src/main/res/drawable-xxxhdpi/ic_refresh_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable-xxxhdpi/ic_refresh_white_24dp.png -------------------------------------------------------------------------------- /main/src/main/res/drawable/busy.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /main/src/main/res/drawable/darkdenim3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable/darkdenim3.png -------------------------------------------------------------------------------- /main/src/main/res/drawable/downloaded_magazines_button_default.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 13 | 14 | -------------------------------------------------------------------------------- /main/src/main/res/drawable/downloaded_magazines_button_highlighted.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 13 | 14 | -------------------------------------------------------------------------------- /main/src/main/res/drawable/downloaded_magazines_delete_button_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /main/src/main/res/drawable/downloaded_magazines_item_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /main/src/main/res/drawable/ic_arrow_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable/ic_arrow_left.png -------------------------------------------------------------------------------- /main/src/main/res/drawable/ic_arrow_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable/ic_arrow_right.png -------------------------------------------------------------------------------- /main/src/main/res/drawable/ic_cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable/ic_cancel.png -------------------------------------------------------------------------------- /main/src/main/res/drawable/ic_magnifying_glass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable/ic_magnifying_glass.png -------------------------------------------------------------------------------- /main/src/main/res/drawable/item.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libreliodev/android/a1f20eb44fe694c1ae8624b01ce5dc57ac8d9307/main/src/main/res/drawable/item.jpg -------------------------------------------------------------------------------- /main/src/main/res/drawable/magazines_view_button.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 18 | 19 | -------------------------------------------------------------------------------- /main/src/main/res/drawable/magazines_view_button_focused.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 18 | 19 | -------------------------------------------------------------------------------- /main/src/main/res/drawable/magazines_view_button_pressed.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 18 | 19 | -------------------------------------------------------------------------------- /main/src/main/res/drawable/magazines_view_button_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /main/src/main/res/drawable/page_num.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /main/src/main/res/drawable/slider.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /main/src/main/res/drawable/tiled_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /main/src/main/res/layout/activity_download_magazines.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | 21 | 22 | 29 | 30 | 37 | 38 | 39 | 45 | 46 | 54 | 55 | 65 | 66 |