├── settings.gradle ├── app ├── build │ ├── intermediates │ │ ├── incremental │ │ │ ├── aidl │ │ │ │ ├── debug │ │ │ │ │ └── dependency.store │ │ │ │ └── test │ │ │ │ │ └── debug │ │ │ │ │ └── dependency.store │ │ │ ├── mergeAssets │ │ │ │ ├── test │ │ │ │ │ └── debug │ │ │ │ │ │ └── merger.xml │ │ │ │ └── debug │ │ │ │ │ └── merger.xml │ │ │ └── mergeResources │ │ │ │ └── test │ │ │ │ └── debug │ │ │ │ └── merger.xml │ │ ├── res │ │ │ ├── resources-debug.ap_ │ │ │ ├── resources-debug-test.ap_ │ │ │ └── debug │ │ │ │ ├── drawable-hdpi-v4 │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── button_find.xml │ │ │ │ ├── button_search.xml │ │ │ │ ├── edit_text_find.xml │ │ │ │ └── edit_text_home.xml │ │ │ │ ├── drawable-mdpi-v4 │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable-xhdpi-v4 │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable-xxhdpi-v4 │ │ │ │ └── ic_launcher.png │ │ │ │ ├── values-sw720dp-land-v13 │ │ │ │ └── values.xml │ │ │ │ ├── values-v11 │ │ │ │ └── values.xml │ │ │ │ ├── values-v14 │ │ │ │ └── values.xml │ │ │ │ ├── menu │ │ │ │ ├── main.xml │ │ │ │ ├── test.xml │ │ │ │ └── type_url.xml │ │ │ │ ├── values-ja │ │ │ │ └── values.xml │ │ │ │ ├── values-zh-rCN │ │ │ │ └── values.xml │ │ │ │ ├── values-zh-rTW │ │ │ │ └── values.xml │ │ │ │ ├── values-ko │ │ │ │ └── values.xml │ │ │ │ ├── values-he │ │ │ │ └── values.xml │ │ │ │ ├── color │ │ │ │ └── splash.xml │ │ │ │ ├── values-ar │ │ │ │ └── values.xml │ │ │ │ ├── layout │ │ │ │ ├── fragment_html_resource.xml │ │ │ │ ├── fragment_preview.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── activity_type_url.xml │ │ │ │ ├── fragment_enter_url.xml │ │ │ │ ├── appirater.xml │ │ │ │ ├── row_html_resources.xml │ │ │ │ └── fragment_source_code.xml │ │ │ │ ├── values-pt │ │ │ │ └── values.xml │ │ │ │ ├── values-th │ │ │ │ └── values.xml │ │ │ │ ├── values-cs │ │ │ │ └── values.xml │ │ │ │ ├── values-es │ │ │ │ └── values.xml │ │ │ │ ├── values-fi │ │ │ │ └── values.xml │ │ │ │ ├── values-hu │ │ │ │ └── values.xml │ │ │ │ ├── values-nb │ │ │ │ └── values.xml │ │ │ │ ├── values-da │ │ │ │ └── values.xml │ │ │ │ ├── values-ru │ │ │ │ └── values.xml │ │ │ │ ├── values-sk │ │ │ │ └── values.xml │ │ │ │ ├── values-sv │ │ │ │ └── values.xml │ │ │ │ ├── values-tr │ │ │ │ └── values.xml │ │ │ │ ├── values-de │ │ │ │ └── values.xml │ │ │ │ ├── values-fr │ │ │ │ └── values.xml │ │ │ │ ├── values-it │ │ │ │ └── values.xml │ │ │ │ ├── values-ms │ │ │ │ └── values.xml │ │ │ │ ├── values-vi │ │ │ │ └── values.xml │ │ │ │ ├── values-ca │ │ │ │ └── values.xml │ │ │ │ ├── values-pl │ │ │ │ └── values.xml │ │ │ │ ├── values-el │ │ │ │ └── values.xml │ │ │ │ ├── values-nl │ │ │ │ └── values.xml │ │ │ │ ├── values-id │ │ │ │ └── values.xml │ │ │ │ ├── drawable │ │ │ │ └── button_appirator.xml │ │ │ │ └── values │ │ │ │ └── values.xml │ │ ├── assets │ │ │ └── debug │ │ │ │ ├── img │ │ │ │ ├── error.png │ │ │ │ └── spinner.gif │ │ │ │ ├── html_source.html │ │ │ │ ├── doc │ │ │ │ └── docs.css │ │ │ │ └── lib │ │ │ │ └── codemirror.css │ │ ├── manifests │ │ │ ├── test │ │ │ │ └── debug │ │ │ │ │ └── AndroidManifest.xml │ │ │ └── full │ │ │ │ └── debug │ │ │ │ └── AndroidManifest.xml │ │ └── symbols │ │ │ └── debug │ │ │ └── R.txt │ ├── generated │ │ └── source │ │ │ ├── buildConfig │ │ │ ├── debug │ │ │ │ └── com │ │ │ │ │ └── zupilupi │ │ │ │ │ └── sourcecodeviewer │ │ │ │ │ └── BuildConfig.java │ │ │ └── test │ │ │ │ └── debug │ │ │ │ └── com │ │ │ │ └── zupilupi │ │ │ │ └── sourcecodeviewer │ │ │ │ └── test │ │ │ │ └── BuildConfig.java │ │ │ └── r │ │ │ └── debug │ │ │ └── com │ │ │ ├── sbstrm │ │ │ └── appirater │ │ │ │ └── R.java │ │ │ └── zupilupi │ │ │ └── sourcecodeviewer │ │ │ └── R.java │ └── outputs │ │ └── apk │ │ └── manifest-merger-debug-report.txt ├── lint.xml ├── libs │ └── jsoup-1.7.2.jar ├── src │ └── main │ │ ├── assets │ │ ├── img │ │ │ ├── error.png │ │ │ └── spinner.gif │ │ ├── html_source.html │ │ ├── doc │ │ │ └── docs.css │ │ └── lib │ │ │ └── codemirror.css │ │ ├── res │ │ ├── drawable-hdpi │ │ │ ├── ic_launcher.png │ │ │ ├── button_find.xml │ │ │ ├── button_search.xml │ │ │ ├── edit_text_find.xml │ │ │ └── edit_text_home.xml │ │ ├── drawable-mdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-xxhdpi │ │ │ └── ic_launcher.png │ │ ├── values-sw600dp │ │ │ └── dimens.xml │ │ ├── values │ │ │ ├── dimens.xml │ │ │ ├── styles.xml │ │ │ └── strings.xml │ │ ├── menu │ │ │ └── main.xml │ │ ├── values-sw720dp-land │ │ │ └── dimens.xml │ │ ├── values-v11 │ │ │ └── styles.xml │ │ ├── values-v14 │ │ │ └── styles.xml │ │ ├── color │ │ │ └── splash.xml │ │ └── layout │ │ │ ├── fragment_html_resource.xml │ │ │ ├── fragment_preview.xml │ │ │ ├── activity_main.xml │ │ │ ├── activity_type_url.xml │ │ │ ├── fragment_enter_url.xml │ │ │ ├── row_html_resources.xml │ │ │ └── fragment_source_code.xml │ │ ├── java │ │ └── com │ │ │ └── zupilupi │ │ │ └── sourcecodeviewer │ │ │ ├── fragments │ │ │ ├── WebViewFragment.java │ │ │ ├── utils │ │ │ │ ├── ChromeClient.java │ │ │ │ ├── ListRow.java │ │ │ │ ├── JsInterface.java │ │ │ │ ├── WebClient.java │ │ │ │ ├── ResourcesArrayAdapter.java │ │ │ │ ├── SourceCodeLoader.java │ │ │ │ └── WebUtils.java │ │ │ ├── PreviewFragment.java │ │ │ ├── EnterUrlFragment.java │ │ │ ├── HtmlResourcesFragment.java │ │ │ └── SourceCodeFragment.java │ │ │ ├── MyApp.java │ │ │ ├── SectionsPagerAdapter.java │ │ │ ├── MainActivity.java │ │ │ └── TypeUrlActivity.java │ │ └── AndroidManifest.xml ├── build.gradle └── app.iml ├── local.properties ├── appirater ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ ├── res │ │ ├── values-ja │ │ │ └── strings.xml │ │ ├── values-zh-rCN │ │ │ └── strings.xml │ │ ├── values-zh-rTW │ │ │ └── strings.xml │ │ ├── values-ko │ │ │ └── strings.xml │ │ ├── values │ │ │ ├── styles.xml │ │ │ ├── strings.xml │ │ │ └── appirater-settings.xml │ │ ├── values-he │ │ │ └── strings.xml │ │ ├── values-ar │ │ │ └── strings.xml │ │ ├── values-pt │ │ │ └── strings.xml │ │ ├── values-es │ │ │ └── strings.xml │ │ ├── values-th │ │ │ └── strings.xml │ │ ├── values-cs │ │ │ └── strings.xml │ │ ├── values-fi │ │ │ └── strings.xml │ │ ├── values-hu │ │ │ └── strings.xml │ │ ├── values-nb │ │ │ └── strings.xml │ │ ├── values-da │ │ │ └── strings.xml │ │ ├── values-fr │ │ │ └── strings.xml │ │ ├── values-ru │ │ │ └── strings.xml │ │ ├── values-sk │ │ │ └── strings.xml │ │ ├── values-sv │ │ │ └── strings.xml │ │ ├── values-tr │ │ │ └── strings.xml │ │ ├── values-de │ │ │ └── strings.xml │ │ ├── values-it │ │ │ └── strings.xml │ │ ├── values-ms │ │ │ └── strings.xml │ │ ├── values-vi │ │ │ └── strings.xml │ │ ├── values-ca │ │ │ └── strings.xml │ │ ├── values-pl │ │ │ └── strings.xml │ │ ├── values-el │ │ │ └── strings.xml │ │ ├── values-id │ │ │ └── strings.xml │ │ ├── values-nl │ │ │ └── strings.xml │ │ ├── drawable │ │ │ └── button_appirator.xml │ │ └── layout │ │ │ └── appirater.xml │ │ └── java │ │ └── com │ │ └── sbstrm │ │ └── appirater │ │ └── Appirater.java ├── build.gradle ├── README.md ├── app.iml └── appirater.iml ├── .gitignore ├── README.md ├── sourcecodeviewer.iml ├── gradlew.bat └── gradlew /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':appirater' 2 | -------------------------------------------------------------------------------- /app/build/intermediates/incremental/aidl/debug/dependency.store: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /app/build/intermediates/incremental/aidl/test/debug/dependency.store: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /app/lint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/libs/jsoup-1.7.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antonio83franco/HTMLSourceCodeViewer/HEAD/app/libs/jsoup-1.7.2.jar -------------------------------------------------------------------------------- /app/src/main/assets/img/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antonio83franco/HTMLSourceCodeViewer/HEAD/app/src/main/assets/img/error.png -------------------------------------------------------------------------------- /app/src/main/assets/img/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antonio83franco/HTMLSourceCodeViewer/HEAD/app/src/main/assets/img/spinner.gif -------------------------------------------------------------------------------- /app/build/intermediates/res/resources-debug.ap_: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antonio83franco/HTMLSourceCodeViewer/HEAD/app/build/intermediates/res/resources-debug.ap_ -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antonio83franco/HTMLSourceCodeViewer/HEAD/app/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antonio83franco/HTMLSourceCodeViewer/HEAD/app/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antonio83franco/HTMLSourceCodeViewer/HEAD/app/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antonio83franco/HTMLSourceCodeViewer/HEAD/app/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/build/intermediates/assets/debug/img/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antonio83franco/HTMLSourceCodeViewer/HEAD/app/build/intermediates/assets/debug/img/error.png -------------------------------------------------------------------------------- /app/build/intermediates/assets/debug/img/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antonio83franco/HTMLSourceCodeViewer/HEAD/app/build/intermediates/assets/debug/img/spinner.gif -------------------------------------------------------------------------------- /app/build/intermediates/res/resources-debug-test.ap_: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antonio83franco/HTMLSourceCodeViewer/HEAD/app/build/intermediates/res/resources-debug-test.ap_ -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/drawable-hdpi-v4/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antonio83franco/HTMLSourceCodeViewer/HEAD/app/build/intermediates/res/debug/drawable-hdpi-v4/ic_launcher.png -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/drawable-mdpi-v4/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antonio83franco/HTMLSourceCodeViewer/HEAD/app/build/intermediates/res/debug/drawable-mdpi-v4/ic_launcher.png -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/drawable-xhdpi-v4/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antonio83franco/HTMLSourceCodeViewer/HEAD/app/build/intermediates/res/debug/drawable-xhdpi-v4/ic_launcher.png -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/drawable-xxhdpi-v4/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antonio83franco/HTMLSourceCodeViewer/HEAD/app/build/intermediates/res/debug/drawable-xxhdpi-v4/ic_launcher.png -------------------------------------------------------------------------------- /app/build/intermediates/incremental/mergeAssets/test/debug/merger.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/values-sw600dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16dp 5 | 16dp 6 | 7 | 8 | -------------------------------------------------------------------------------- /local.properties: -------------------------------------------------------------------------------- 1 | ## This file must *NOT* be checked into Version Control Systems, 2 | # as it contains information specific to your local configuration. 3 | # 4 | # Location of the SDK. This is only used by Gradle. 5 | # 6 | #Thu Feb 05 17:55:55 CET 2015 7 | sdk.dir=/Users/antonio/SDKs/android 8 | -------------------------------------------------------------------------------- /app/src/main/res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-sw720dp-land-v13/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 128dp 6 | -------------------------------------------------------------------------------- /app/src/main/res/values-sw720dp-land/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 128dp 8 | 9 | 10 | -------------------------------------------------------------------------------- /appirater/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /appirater/src/main/res/values-ja/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | %sの評価 4 | 楽しんでいただけたならば簡単なご意見をお願いします。%sを評価しますか? 5 | %sを評価する 6 | 後で見る 7 | いいえ 8 | -------------------------------------------------------------------------------- /appirater/src/main/res/values-zh-rCN/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 給%s評分 4 | 如果你喜歡使用%s,你介意花一點時間給它評分嗎?不會超過一分鐘。感謝您的支持! 5 | 給%s評分 6 | 稍後提醒我 7 | 不,謝謝 8 | -------------------------------------------------------------------------------- /appirater/src/main/res/values-zh-rTW/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 给%s评分 4 | 如果你喜欢使用%s,你介意花一点时间给它评分吗?不会超过一分钟。感谢您的支持! 5 | 给%s评分 6 | 稍后提醒我 7 | 不,谢谢 8 | -------------------------------------------------------------------------------- /app/src/main/res/values-v11/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /appirater/src/main/res/values-ko/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | %s 평가하기 4 | %s 사용이 맘에 드셨나요? 잠시만 시간을 내서 평가를 부탁드리겠습니다. 감사합니다! 5 | %s 평가하기 6 | 다음에 평가하겠습니다 7 | 평가하지 않겠습니다 8 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-v11/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/button_find.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | -------------------------------------------------------------------------------- /appirater/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-v14/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /app/src/main/java/com/zupilupi/sourcecodeviewer/fragments/WebViewFragment.java: -------------------------------------------------------------------------------- 1 | package com.zupilupi.sourcecodeviewer.fragments; 2 | 3 | import android.support.v4.app.Fragment; 4 | import android.view.View; 5 | import android.webkit.WebView; 6 | 7 | public class WebViewFragment extends Fragment{ 8 | 9 | protected View rootView; 10 | protected WebView webView; 11 | public boolean webWiewReady = false; 12 | } 13 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/menu/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /appirater/src/main/res/values-he/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | דרג את %s 4 | אם נהנת להשתמש ב %s, האם תסכים לדרג אותה? זה לא יקח יותר מדקה. תודה על התמיכה! 5 | דרג את %s 6 | מאוחר יותר 7 | לא תודה 8 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/menu/test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/menu/type_url.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /appirater/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 | -------------------------------------------------------------------------------- /appirater/src/main/res/values-ar/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | قيم %s 4 | إذا كنت تستمع باستخدام %s، فهل تمانع بأن تأخذ دقيقة من وقتك لتقيمه؟ لن يستغرق الأمر أكثر من دقيقة. شكرا لدعمك! 5 | قيم %s 6 | ذكرني لاحقا 7 | لا شكرا 8 | -------------------------------------------------------------------------------- /app/src/main/res/values-v14/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /appirater/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 | -------------------------------------------------------------------------------- /appirater/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 | -------------------------------------------------------------------------------- /appirater/src/main/res/values-th/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ให้อันดับ %s 4 | ถ้าคุณกำลังใช้ %s โปรดสละเวลาสักครู่ในการให้อันดับแก่เรา คุณจะเสียเวลาไม่เกินหนึ่งนาที ขอบคุณสำหรับการสนับสนุน! 5 | ให้อันดับ %s 6 | เตือนฉันภายหลัง 7 | ไม่ ขอบคุณ 8 | -------------------------------------------------------------------------------- /appirater/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 | -------------------------------------------------------------------------------- /appirater/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 | -------------------------------------------------------------------------------- /appirater/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 | -------------------------------------------------------------------------------- /app/build/intermediates/incremental/mergeResources/test/debug/merger.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /appirater/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 | -------------------------------------------------------------------------------- /appirater/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 | -------------------------------------------------------------------------------- /appirater/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 | -------------------------------------------------------------------------------- /appirater/src/main/res/values-ru/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Оценить %s 4 | Если Вам понравилась программа %s, пожалуйста поставьте свою оценку. Это займет у Вас не более одной минуты.\n Спасибо за поддержку! 5 | Оценить %s 6 | Напомнить позже 7 | Нет, спасибо 8 | -------------------------------------------------------------------------------- /appirater/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 | -------------------------------------------------------------------------------- /appirater/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 | -------------------------------------------------------------------------------- /appirater/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 | -------------------------------------------------------------------------------- /appirater/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 | -------------------------------------------------------------------------------- /appirater/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 | -------------------------------------------------------------------------------- /appirater/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 | -------------------------------------------------------------------------------- /appirater/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 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/button_search.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /appirater/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 | -------------------------------------------------------------------------------- /appirater/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 17 5 | buildToolsVersion "21.1.2" 6 | 7 | defaultConfig { 8 | minSdkVersion 8 9 | targetSdkVersion 18 10 | versionCode 1 11 | versionName "1.0" 12 | } 13 | 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /appirater/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 | -------------------------------------------------------------------------------- /appirater/src/main/res/values-el/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Βαθμολόγηση του %s 4 | Αν σου αρέσει το %s, θα μπορούσες να αφιερώσεις μια στιγμή για να το βαθμολογήσεις; Η διαδικασία είναι πολύ σύντομη. Ευχαριστούμε για τη στήριξη! 5 | Βαθμολόγηση του %s 6 | Υπενθύμιση αργότερα 7 | Όχι, ευχαριστώ 8 | -------------------------------------------------------------------------------- /appirater/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 | -------------------------------------------------------------------------------- /appirater/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 | -------------------------------------------------------------------------------- /app/src/main/res/color/splash.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_html_resource.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/drawable-hdpi-v4/button_find.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | -------------------------------------------------------------------------------- /app/src/main/java/com/zupilupi/sourcecodeviewer/fragments/utils/ChromeClient.java: -------------------------------------------------------------------------------- 1 | package com.zupilupi.sourcecodeviewer.fragments.utils; 2 | 3 | import android.webkit.WebChromeClient; 4 | 5 | import com.zupilupi.sourcecodeviewer.MainActivity; 6 | 7 | public class ChromeClient extends WebChromeClient{ 8 | 9 | private final String TAG = "EvChromeClient"; 10 | private MainActivity currentActivity; 11 | 12 | public ChromeClient(MainActivity webViewActivity) { 13 | this.currentActivity = webViewActivity; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.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 | # Windows thumbnail db 19 | Thumbs.db 20 | 21 | # OSX files 22 | .DS_Store 23 | 24 | # Eclipse project files 25 | .classpath 26 | .project 27 | 28 | # Android Studio 29 | .idea/ 30 | #.idea/workspace.xml - remove # and delete .idea if it better suit your needs. 31 | build/ 32 | .gradle/ 33 | gradle -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/edit_text_find.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 13 | 14 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_preview.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-ja/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | %sを評価する 6 | いいえ 7 | 後で見る 8 | 楽しんでいただけたならば簡単なご意見をお願いします。%sを評価しますか? 9 | %sの評価 10 | -------------------------------------------------------------------------------- /app/build/generated/source/buildConfig/debug/com/zupilupi/sourcecodeviewer/BuildConfig.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Automatically generated file. DO NOT MODIFY 3 | */ 4 | package com.zupilupi.sourcecodeviewer; 5 | 6 | public final class BuildConfig { 7 | public static final boolean DEBUG = Boolean.parseBoolean("true"); 8 | public static final String APPLICATION_ID = "com.zupilupi.sourcecodeviewer"; 9 | public static final String BUILD_TYPE = "debug"; 10 | public static final String FLAVOR = ""; 11 | public static final int VERSION_CODE = 5; 12 | public static final String VERSION_NAME = "3.2"; 13 | } 14 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-zh-rCN/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 給%s評分 6 | 不,謝謝 7 | 稍後提醒我 8 | 如果你喜歡使用%s,你介意花一點時間給它評分嗎?不會超過一分鐘。感謝您的支持! 9 | 給%s評分 10 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-zh-rTW/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 给%s评分 6 | 不,谢谢 7 | 稍后提醒我 8 | 如果你喜欢使用%s,你介意花一点时间给它评分吗?不会超过一分钟。感谢您的支持! 9 | 给%s评分 10 | -------------------------------------------------------------------------------- /app/build/generated/source/buildConfig/test/debug/com/zupilupi/sourcecodeviewer/test/BuildConfig.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Automatically generated file. DO NOT MODIFY 3 | */ 4 | package com.zupilupi.sourcecodeviewer.test; 5 | 6 | public final class BuildConfig { 7 | public static final boolean DEBUG = Boolean.parseBoolean("true"); 8 | public static final String APPLICATION_ID = "com.zupilupi.sourcecodeviewer.test"; 9 | public static final String BUILD_TYPE = "debug"; 10 | public static final String FLAVOR = ""; 11 | public static final int VERSION_CODE = 5; 12 | public static final String VERSION_NAME = "3.2"; 13 | } 14 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-ko/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | %s 평가하기 6 | 평가하지 않겠습니다 7 | 다음에 평가하겠습니다 8 | %s 사용이 맘에 드셨나요? 잠시만 시간을 내서 평가를 부탁드리겠습니다. 감사합니다! 9 | %s 평가하기 10 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/drawable-hdpi-v4/button_search.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-he/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | דרג את %s 6 | לא תודה 7 | מאוחר יותר 8 | אם נהנת להשתמש ב %s, האם תסכים לדרג אותה? זה לא יקח יותר מדקה. תודה על התמיכה! 9 | דרג את %s 10 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/color/splash.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/edit_text_home.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 13 | 14 | 19 | 20 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-ar/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | قيم %s 6 | لا شكرا 7 | ذكرني لاحقا 8 | إذا كنت تستمع باستخدام %s، فهل تمانع بأن تأخذ دقيقة من وقتك لتقيمه؟ لن يستغرق الأمر أكثر من دقيقة. شكرا لدعمك! 9 | قيم %s 10 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/layout/fragment_html_resource.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-pt/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Avaliar o %s 6 | Não, obrigado 7 | Mais tarde 8 | Se você gosta de usar o %s, que tal avaliá-lo? Não levará mais de um minuto. Agradecemos o seu apoio! 9 | Avaliar o %s 10 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-th/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ให้อันดับ %s 6 | ไม่ ขอบคุณ 7 | เตือนฉันภายหลัง 8 | ถ้าคุณกำลังใช้ %s โปรดสละเวลาสักครู่ในการให้อันดับแก่เรา คุณจะเสียเวลาไม่เกินหนึ่งนาที ขอบคุณสำหรับการสนับสนุน! 9 | ให้อันดับ %s 10 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-cs/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Ohodnotit %s 6 | Ne, díky 7 | Možná později 8 | 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! 9 | Ohodnotit %s 10 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-es/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Valorar %s 6 | No, gracias 7 | Recordar más tarde 8 | Si le gusta utilizar %s, ¿le importaría valorarlo? No le llevará más de un minuto. ¡Gracias por su colaboración! 9 | Valorar %s 10 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-fi/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Arvioi %s 6 | Ei kiitos 7 | Muistuta minua myöhemmin 8 | Jos käytät mielelläsi %s, voisitko käyttää hetken ja arvostella sen? Se ei kestä minuuttia kauempaa. Kiitos tuestasi! 9 | Arvioi %s 10 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-hu/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | %s értékelése 6 | Most inkább nem 7 | Emlékeztess később 8 | 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! 9 | %s értékelése 10 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/drawable-hdpi-v4/edit_text_find.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 13 | 14 | 17 | 18 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-nb/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Vurder %s 6 | Nei, takk du 7 | Påminn meg senere 8 | 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! 9 | Vurder %s 10 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-da/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Bedøm %s 6 | Nej tak 7 | Påmind mig senere 8 | 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! 9 | Bedøm %s 10 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-ru/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Оценить %s 6 | Нет, спасибо 7 | Напомнить позже 8 | Если Вам понравилась программа %s, пожалуйста поставьте свою оценку. Это займет у Вас не более одной минуты.\n Спасибо за поддержку! 9 | Оценить %s 10 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-sk/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Ohodnotiť %s 6 | Nie, ďakujem 7 | Pripomenúť neskôr 8 | 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! 9 | Ohodnotiť %s 10 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-sv/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Betygsätt %s 6 | Nej tack 7 | Påminn mig senare 8 | 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! 9 | Betygsätt %s 10 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-tr/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Evet, %s oylamak istiyorum 6 | Hayır, Teşekkürler 7 | Daha sonra hatırlat 8 | Eğer %s uygulamasını beğendiyseniz, oy verip bize destek olmak ister misiniz? Desteğiniz için teşekkürler! 9 | %s Oylayın 10 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/layout/fragment_preview.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-de/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Bewerte %s 6 | Nein, Danke 7 | Später erinnern 8 | 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! 9 | Bewerte %s 10 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-fr/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Notez %s 6 | Non, Merci 7 | Rappelez-moi plus tard 8 | 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! 9 | Notez %s 10 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-it/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Valuta %s 6 | No, grazie 7 | Ricordamelo più tardi 8 | Se trovi utile %s, perchè non spendere qualche momento per dare una valutazione? Non richiederà più di un minuto. Grazie per il supporto! 9 | Valuta %s 10 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-ms/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Tarafkan %s 6 | Terima kasih saja 7 | Ingatkan saya lain kali 8 | Jika anda suka %s, bolehkah luangkan sedikit masa untuk beri penarafan? Tak sampai seminit pun. Terima kasih atas sokongan anda! 9 | Tarafkan %s 10 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-vi/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Đánh giá %s 6 | Không, xin cảm ơn 7 | Hãy nhắc nhở tôi sau 8 | 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? 9 | Đánh giá %s 10 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-ca/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Valorar %s 6 | No, gràcies 7 | Recordar-m’ho més tard 8 | 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ó! 9 | Valorar %s 10 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-pl/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Oceń %s 6 | Nie, dziękuję 7 | Przypomnij później 8 | 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! 9 | Oceń %s 10 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 18 5 | buildToolsVersion "21.1.2" 6 | 7 | defaultConfig { 8 | applicationId "com.zupilupi.sourcecodeviewer" 9 | minSdkVersion 8 10 | targetSdkVersion 18 11 | versionCode 5 12 | versionName "3.2" 13 | } 14 | 15 | buildTypes { 16 | release { 17 | minifyEnabled false 18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 19 | } 20 | } 21 | } 22 | 23 | dependencies { 24 | compile 'com.android.support:support-v4:18.0.0' 25 | compile files('libs/jsoup-1.7.2.jar') 26 | compile project(':appirater') 27 | } 28 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-el/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Βαθμολόγηση του %s 6 | Όχι, ευχαριστώ 7 | Υπενθύμιση αργότερα 8 | Αν σου αρέσει το %s, θα μπορούσες να αφιερώσεις μια στιγμή για να το βαθμολογήσεις; Η διαδικασία είναι πολύ σύντομη. Ευχαριστούμε για τη στήριξη! 9 | Βαθμολόγηση του %s 10 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-nl/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | %s beoordelen 6 | Nee, bedankt 7 | Herinner me er later aan 8 | 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! 9 | %s beoordelen 10 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values-id/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Rating %s 6 | Tidak, terimakasih 7 | Silakan ingatkan saya lagi 8 | Jika anda menyukai %s, maukah anda memberikan rating kepada aplikasi ini? Rating hanya memakan waktu kurang dari 1 menit. Terimakasih untuk dukungan anda! 9 | Rating %s 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 14 | 15 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/build/intermediates/manifests/test/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 16 | 17 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/drawable-hdpi-v4/edit_text_home.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 13 | 14 | 19 | 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HTMLSourceCodeViewer 2 | HTML Source Code viewer app for Android 3 | 4 | HTMLSourceCodeViewer is a simple Android app, he can fetch the source code of any website and show 5 | it with its resources (JS and CSS). 6 | 7 | This soruce code of the app is contained in the 'app' folder in the root of the repository 8 | 9 | ## Dependencies 10 | -[Appirater] v1.3.1 11 | 12 | ## Leave your feedback/bug report 13 | Track improvements proposals or bug reports using github issues, you will make my day! 14 | 15 | ## Want to contribute? 16 | Fork the repo and send your pull request, we are open to ideas! 17 | 18 | ## License 19 | 20 | Copyright (c) 2011-2014 GitHub, Inc. See the LICENSE file for license rights and 21 | limitations (MIT). 22 | 23 | 24 | [Appirater]:https://github.com/drewjw81/appirater-android 25 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | HTML Source Viewer 5 | Settings 6 | Show source 7 | E.g. yoursite.com 8 | Find... 9 | Go 10 | OHH NO! The URL provided is not valid, try with something like: www.yoursite.com 11 | TypeUrlActivity 12 | Hello world! 13 | Section 1 14 | Section 2 15 | Section 3 16 | Rate App 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/zupilupi/sourcecodeviewer/MyApp.java: -------------------------------------------------------------------------------- 1 | package com.zupilupi.sourcecodeviewer; 2 | 3 | import android.app.Application; 4 | import android.util.Log; 5 | 6 | import com.sbstrm.appirater.Appirater; 7 | 8 | public class MyApp extends Application { 9 | 10 | public static String CACHE = "MYCACHE"; 11 | public static String LAST_URL = "LAST_URL"; 12 | public String HTML_CODE = "HTML_CODE"; 13 | public String HTML_CODE_ESCAPED = "HTML_CODE_ESCAPED"; 14 | public static String RETRY = "RETRY"; 15 | public static String URL = "URL"; 16 | public static String JS = "JS"; 17 | public static String CSS = "CSS"; 18 | public static String UKHOST = "UKHOST"; 19 | 20 | @Override 21 | public void onCreate() { 22 | super.onCreate(); 23 | Log.d("MyApp", "onCreate"); 24 | } 25 | 26 | public void appLaunched(MainActivity activity) { 27 | //init App Rater 28 | Appirater.appLaunched(activity); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/zupilupi/sourcecodeviewer/fragments/utils/ListRow.java: -------------------------------------------------------------------------------- 1 | package com.zupilupi.sourcecodeviewer.fragments.utils; 2 | 3 | public class ListRow { 4 | 5 | private String resType; 6 | private String resName; 7 | private String resUrl; 8 | 9 | public ListRow (String type, String name, String url) { 10 | this.resType = type; 11 | this.resName = name; 12 | this.resUrl = url; 13 | } 14 | 15 | public String getResType() { 16 | return resType; 17 | } 18 | public void setResType(String resType) { 19 | this.resType = resType; 20 | } 21 | public String getResName() { 22 | return resName; 23 | } 24 | public void setResName(String resName) { 25 | this.resName = resName; 26 | } 27 | public String getResUrl() { 28 | return resUrl; 29 | } 30 | public void setResUrl(String resUrl) { 31 | this.resUrl = resUrl; 32 | } 33 | 34 | public String toString() { 35 | return this.resUrl; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 12 | 13 | 22 | 23 | -------------------------------------------------------------------------------- /sourcecodeviewer.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 12 | 13 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/java/com/zupilupi/sourcecodeviewer/fragments/utils/JsInterface.java: -------------------------------------------------------------------------------- 1 | package com.zupilupi.sourcecodeviewer.fragments.utils; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.webkit.JavascriptInterface; 6 | 7 | import com.zupilupi.sourcecodeviewer.MyApp; 8 | import com.zupilupi.sourcecodeviewer.TypeUrlActivity; 9 | import com.zupilupi.sourcecodeviewer.fragments.SourceCodeFragment; 10 | 11 | public class JsInterface { 12 | SourceCodeFragment frgCaller; 13 | 14 | /** Instantiate the interface and set the context */ 15 | public JsInterface(SourceCodeFragment f) { 16 | frgCaller = f; 17 | } 18 | 19 | @JavascriptInterface 20 | public void showFindBar() { 21 | frgCaller.showFindBar(); 22 | } 23 | 24 | @JavascriptInterface 25 | public void tryAgain() { 26 | Intent intent = new Intent(frgCaller.getActivity(), TypeUrlActivity.class); 27 | frgCaller.webWiewReady = false; 28 | Bundle b = new Bundle(); 29 | b.putBoolean(MyApp.RETRY, true); 30 | intent.putExtras(b); 31 | frgCaller.getActivity().startActivity(intent); 32 | frgCaller.getActivity().finish(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /appirater/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 | 40 13 | 14 | 3 15 | 16 | false 17 | 18 | #ff449def 19 | #ff2f6699 20 | #ffffffff 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/zupilupi/sourcecodeviewer/fragments/PreviewFragment.java: -------------------------------------------------------------------------------- 1 | package com.zupilupi.sourcecodeviewer.fragments; 2 | 3 | import android.os.Bundle; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | import android.webkit.WebView; 8 | 9 | import com.zupilupi.sourcecodeviewer.MainActivity; 10 | import com.zupilupi.sourcecodeviewer.R; 11 | import com.zupilupi.sourcecodeviewer.fragments.utils.WebClient; 12 | import com.zupilupi.sourcecodeviewer.fragments.utils.WebUtils; 13 | 14 | 15 | public class PreviewFragment extends WebViewFragment { 16 | 17 | public PreviewFragment() { 18 | 19 | } 20 | 21 | @Override 22 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 23 | Bundle savedInstanceState) { 24 | rootView = inflater.inflate(R.layout.fragment_preview, 25 | container, false); 26 | 27 | MainActivity mainActivity = (MainActivity)this.getActivity(); 28 | 29 | webView = (WebView) rootView.findViewById(R.id.site_preview); 30 | webView.loadUrl(WebUtils.checkHttpPrefix(mainActivity.enteredUrl)); 31 | webView.getSettings().setJavaScriptEnabled(true); 32 | webView.setWebViewClient(new WebClient(this)); 33 | 34 | return rootView; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /app/build/intermediates/incremental/mergeAssets/debug/merger.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 12 | 13 | 19 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /appirater/src/main/res/drawable/button_appirator.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 10 | 12 | 17 | 18 | 19 | 20 | 21 | 25 | 28 | 30 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /app/src/main/java/com/zupilupi/sourcecodeviewer/fragments/utils/WebClient.java: -------------------------------------------------------------------------------- 1 | package com.zupilupi.sourcecodeviewer.fragments.utils; 2 | 3 | import android.webkit.WebView; 4 | import android.webkit.WebViewClient; 5 | 6 | import com.zupilupi.sourcecodeviewer.MyApp; 7 | import com.zupilupi.sourcecodeviewer.fragments.SourceCodeFragment; 8 | import com.zupilupi.sourcecodeviewer.fragments.WebViewFragment; 9 | 10 | public class WebClient extends WebViewClient{ 11 | 12 | private WebViewFragment fragment; 13 | 14 | public WebClient (WebViewFragment myFragment) { 15 | this.fragment = myFragment; 16 | } 17 | 18 | @Override 19 | public boolean shouldOverrideUrlLoading(WebView view, String url) { 20 | view.loadUrl(url); 21 | return true; 22 | } 23 | 24 | @Override 25 | public void onReceivedError(WebView webView, int errorCode, String description, String failingUrl) { 26 | super.onReceivedError(webView, errorCode, description, failingUrl); 27 | } 28 | 29 | @Override 30 | public void onPageFinished(WebView view, String url) { 31 | this.fragment.webWiewReady = true; 32 | super.onPageFinished(view, url); 33 | 34 | if(fragment instanceof SourceCodeFragment) { 35 | SourceCodeFragment f = (SourceCodeFragment) fragment; 36 | if (f.escapedHtmlResult.equals(MyApp.UKHOST)) { 37 | f.showEmptySourceOnView(); 38 | } else { 39 | f.showSourceOnView(); 40 | } 41 | } 42 | } 43 | 44 | 45 | } 46 | -------------------------------------------------------------------------------- /app/build/intermediates/manifests/full/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 12 | 13 | 19 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /appirater/src/main/res/layout/appirater.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 13 | 14 | 69 | 70 | 139 | 140 | 141 | -------------------------------------------------------------------------------- /app/build/intermediates/assets/debug/html_source.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 53 | 54 | 55 |
56 |
57 | 58 |
59 |
60 |
61 | spinner 62 |

Hold on...

63 |

I am making the HTML code nice and colored

64 |
65 |
66 | error 67 |
Unable to get the source code from

68 | 69 |
70 | 139 | 140 | 141 | -------------------------------------------------------------------------------- /app/src/main/java/com/zupilupi/sourcecodeviewer/fragments/SourceCodeFragment.java: -------------------------------------------------------------------------------- 1 | package com.zupilupi.sourcecodeviewer.fragments; 2 | 3 | import android.os.Bundle; 4 | import android.util.Log; 5 | import android.view.LayoutInflater; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | import android.webkit.WebView; 9 | import android.widget.Button; 10 | import android.widget.EditText; 11 | 12 | import com.zupilupi.sourcecodeviewer.MainActivity; 13 | import com.zupilupi.sourcecodeviewer.R; 14 | import com.zupilupi.sourcecodeviewer.fragments.utils.ChromeClient; 15 | import com.zupilupi.sourcecodeviewer.fragments.utils.JsInterface; 16 | import com.zupilupi.sourcecodeviewer.fragments.utils.WebClient; 17 | import com.zupilupi.sourcecodeviewer.fragments.utils.WebUtils; 18 | 19 | public class SourceCodeFragment extends WebViewFragment{ 20 | 21 | public Button find; 22 | public EditText text; 23 | public String htmlResult = ""; 24 | public String escapedHtmlResult = ""; 25 | public String enteredUrl = ""; 26 | 27 | public SourceCodeFragment() { 28 | } 29 | 30 | @Override 31 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 32 | Bundle savedInstanceState) { 33 | this.rootView = inflater.inflate(R.layout.fragment_source_code, 34 | container, false); 35 | 36 | initView(); 37 | return rootView; 38 | } 39 | 40 | public void initView() { 41 | MainActivity mainActivity = (MainActivity)this.getActivity(); 42 | 43 | this.enteredUrl = mainActivity.enteredUrl; 44 | this.htmlResult = mainActivity.htmlResult; 45 | 46 | this.find = (Button) rootView.findViewById(R.id.button_find); 47 | this.find.setOnClickListener(buttonSearchOnClickListener); 48 | this.text = (EditText) rootView.findViewById(R.id.field_find); 49 | 50 | webView = (WebView) rootView.findViewById(R.id.source_code); 51 | webView.loadUrl("file:///android_asset/html_source.html"); 52 | webView.getSettings().setJavaScriptEnabled(true); 53 | webView.setWebViewClient(new WebClient(this)); 54 | webView.setWebChromeClient(new ChromeClient(mainActivity)); 55 | webView.addJavascriptInterface(new JsInterface(this), "Android"); 56 | 57 | this.escapedHtmlResult = mainActivity.escapedHtmlResult; 58 | } 59 | 60 | @Override 61 | public void onResume() { 62 | super.onResume(); 63 | Log.d("SourceCodeFragment", "onResume"); 64 | this.webWiewReady = false; 65 | initView(); 66 | } 67 | 68 | @Override 69 | public void onDestroyView() { 70 | super.onDestroyView(); 71 | Log.d("SourceCodeFragment", "onDestroy"); 72 | this.webWiewReady = false; 73 | } 74 | 75 | @Override 76 | public void onPause() { 77 | super.onPause(); 78 | Log.d("SourceCodeFragment", "onPause"); 79 | this.webWiewReady = false; 80 | } 81 | 82 | @Override 83 | public void onStop() { 84 | super.onStop(); 85 | Log.d("SourceCodeFragment", "onStop"); 86 | this.webWiewReady = false; 87 | } 88 | 89 | public void showEmptySourceOnView() { 90 | webView.loadUrl("javascript:setTimeout(function(){ showEmptySource('"+WebUtils.escapeForJs(this.enteredUrl)+"'); }, 500)"); 91 | } 92 | 93 | public void showSourceOnView() { 94 | Log.d("ESCAPED HTML ******************************************", this.escapedHtmlResult); 95 | webView.loadUrl("javascript:setTimeout(function(){ setHtmlSource('"+this.escapedHtmlResult+"'); }, 500)"); 96 | } 97 | 98 | public void showFindBar() { 99 | this.text.setVisibility(View.VISIBLE); 100 | this.find.setVisibility(View.VISIBLE); 101 | } 102 | 103 | Button.OnClickListener buttonSearchOnClickListener = new Button.OnClickListener() { 104 | @Override 105 | public void onClick(View v) { 106 | String findMe = text.getText().toString(); 107 | if (!"".equalsIgnoreCase(findMe)) { 108 | find.setOnClickListener(buttonSearchOnClickListener); 109 | webView.loadUrl("javascript:findString('" + WebUtils.escapeForJs(findMe) + "')"); 110 | } 111 | } 112 | }; 113 | } 114 | -------------------------------------------------------------------------------- /app/src/main/java/com/zupilupi/sourcecodeviewer/TypeUrlActivity.java: -------------------------------------------------------------------------------- 1 | package com.zupilupi.sourcecodeviewer; 2 | 3 | import android.app.Activity; 4 | import android.app.AlertDialog; 5 | import android.app.ProgressDialog; 6 | import android.app.Service; 7 | import android.content.DialogInterface; 8 | import android.content.Intent; 9 | import android.content.SharedPreferences; 10 | import android.os.Bundle; 11 | import android.util.Log; 12 | import android.util.Patterns; 13 | import android.view.View; 14 | import android.view.View.OnClickListener; 15 | import android.view.inputmethod.InputMethodManager; 16 | import android.widget.Button; 17 | import android.widget.EditText; 18 | 19 | import com.zupilupi.sourcecodeviewer.fragments.utils.SourceCodeLoader; 20 | import com.zupilupi.sourcecodeviewer.fragments.utils.WebUtils; 21 | 22 | public class TypeUrlActivity extends Activity { 23 | 24 | ProgressDialog progress; 25 | String enteredUrl; 26 | 27 | @Override 28 | protected void onCreate(Bundle savedInstanceState) { 29 | super.onCreate(savedInstanceState); 30 | setContentView(R.layout.activity_type_url); 31 | 32 | EditText textField = (EditText) findViewById(R.id.field_url); 33 | setLastUrl(textField); 34 | 35 | Button buttonSendRequest = (Button) findViewById(R.id.button_show_source); 36 | buttonSendRequest.setOnClickListener(sendRequestAct); 37 | } 38 | 39 | @Override 40 | protected void onResume() { 41 | super.onResume(); 42 | 43 | EditText textField = (EditText) findViewById(R.id.field_url); 44 | setLastUrl(textField); 45 | InputMethodManager imm = (InputMethodManager)this.getSystemService(Service.INPUT_METHOD_SERVICE); 46 | imm.showSoftInput(textField, 0); 47 | } 48 | 49 | private String setLastUrl(EditText textField) { 50 | //Get the last entered URL from cache if any 51 | SharedPreferences prefs = getSharedPreferences(MyApp.CACHE, Activity.MODE_PRIVATE); 52 | String lastUrl = prefs.getString(MyApp.LAST_URL, ""); 53 | 54 | if(!"".equalsIgnoreCase(lastUrl)) { 55 | textField.setText(lastUrl); 56 | } 57 | 58 | return lastUrl; 59 | } 60 | 61 | public void showSourceCode(String contentFromNetwork) { 62 | Log.d("ZUPILUPI", contentFromNetwork); 63 | 64 | Intent intent = new Intent(TypeUrlActivity.this, MainActivity.class); 65 | ((MyApp)this.getApplication()).HTML_CODE = contentFromNetwork; 66 | ((MyApp)this.getApplication()).HTML_CODE_ESCAPED = WebUtils.escapeForJs(contentFromNetwork); 67 | 68 | Bundle b = new Bundle(); 69 | b.putString(MyApp.URL, this.enteredUrl); 70 | intent.putExtras(b); 71 | startActivity(intent); 72 | 73 | if(progress != null) { 74 | progress.dismiss(); 75 | } 76 | } 77 | 78 | public void triggerSourceCodeLoader() { 79 | //start service to fetch the url's source code 80 | SourceCodeLoader loader = new SourceCodeLoader(this); 81 | loader.execute(WebUtils.checkHttpPrefix(enteredUrl)); 82 | //calls showSourceCode when done 83 | } 84 | 85 | private OnClickListener sendRequestAct = new OnClickListener() { 86 | 87 | public void onClick(View v) { 88 | EditText textField = (EditText) findViewById(R.id.field_url); 89 | TypeUrlActivity.this.enteredUrl = textField.getText().toString(); 90 | if (Patterns.WEB_URL.matcher(enteredUrl).matches()) { 91 | 92 | progress = ProgressDialog.show(TypeUrlActivity.this, "Please wait", 93 | "Retrieving data from the server", true); 94 | 95 | triggerSourceCodeLoader(); 96 | 97 | //Put the URL in cache 98 | SharedPreferences prefs = getSharedPreferences(MyApp.CACHE, Activity.MODE_PRIVATE); 99 | SharedPreferences.Editor editor = prefs.edit(); 100 | editor.putString(MyApp.LAST_URL, enteredUrl); 101 | editor.commit(); 102 | 103 | TypeUrlActivity.this.enteredUrl = enteredUrl; 104 | 105 | } else { 106 | new AlertDialog.Builder(TypeUrlActivity.this) 107 | .setMessage(R.string.alert_url_invalid) 108 | .setNegativeButton("Ok", new DialogInterface.OnClickListener() { 109 | public void onClick(DialogInterface dialog, int which) { 110 | // do nothing 111 | } 112 | }) 113 | .show(); 114 | } 115 | } 116 | }; 117 | 118 | } 119 | -------------------------------------------------------------------------------- /app/build/intermediates/res/debug/values/values.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | false 6 | #ff2f6699 7 | #ff449def 8 | #ffffffff 9 | 10 | 11 | 16dp 12 | 16dp 13 | 14 | 15 | 3 16 | 30 17 | 40 18 | 15 19 | 15 20 | 21 | 22 | Settings 23 | OHH NO! The URL provided is not valid, try with something like: www.yoursite.com 24 | HTML Source Viewer 25 | 26 | 27 | Your App Name 28 | market://details?id=%s 29 | 30 | 31 | Go 32 | Show source 33 | Find... 34 | E.g. yoursite.com 35 | Hello world! 36 | Rate App 37 | 38 | 39 | Yes, Rate %s 40 | No, Thanks 41 | Remind me later 42 | If you enjoy using %s, would you mind taking a moment to rate it? Thanks for your support! 43 | Rate %s 44 | 45 | 46 | TypeUrlActivity 47 | Section 1 48 | Section 2 49 | Section 3 50 | 51 | 52 | 59 | 62 | 63 | 64 | 68 | -------------------------------------------------------------------------------- /app/src/main/assets/doc/docs.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Source Sans Pro'; 3 | font-style: normal; 4 | font-weight: 400; 5 | src: local('Source Sans Pro'), local('SourceSansPro-Regular'), url(http://themes.googleusercontent.com/static/fonts/sourcesanspro/v5/ODelI1aHBYDBqgeIAH2zlBM0YzuT7MdOe03otPbuUS0.woff) format('woff'); 6 | } 7 | 8 | body, html { margin: 0; padding: 0; height: 100%; } 9 | section, article { display: block; padding: 0; } 10 | 11 | body { 12 | background: #f8f8f8; 13 | font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif; 14 | line-height: 1.5; 15 | } 16 | 17 | p { margin-top: 0; } 18 | 19 | h2, h3 { 20 | font-weight: normal; 21 | text-decoration: underline; 22 | margin-bottom: .7em; 23 | } 24 | h2 { font-size: 120%; } 25 | h3 { font-size: 110%; } 26 | article > h2:first-child, section:first-child > h2 { margin-top: 0; } 27 | 28 | a, a:visited, a:link, .quasilink { 29 | color: #A21313; 30 | text-decoration: none; 31 | } 32 | 33 | .quasilink { 34 | cursor: pointer; 35 | } 36 | 37 | article { 38 | max-width: 700px; 39 | margin: 0 auto; 40 | border-left: 2px solid #E30808; 41 | border-right: 1px solid #ddd; 42 | padding: 30px 50px 100px 50px; 43 | background: white; 44 | z-index: 2; 45 | position: relative; 46 | min-height: 100%; 47 | box-sizing: border-box; 48 | -moz-box-sizing: border-box; 49 | } 50 | 51 | #nav { 52 | position: fixed; 53 | top: 30px; 54 | right: 50%; 55 | padding-right: 350px; 56 | text-align: right; 57 | z-index: 1; 58 | } 59 | 60 | @media screen and (max-width: 1000px) { 61 | article { 62 | margin: 0 0 0 160px; 63 | } 64 | #nav { 65 | left: 0; right: none; 66 | width: 160px; 67 | } 68 | } 69 | 70 | #nav ul { 71 | display: block; 72 | margin: 0; padding: 0; 73 | margin-bottom: 32px; 74 | } 75 | 76 | #nav li { 77 | display: block; 78 | margin-bottom: 4px; 79 | } 80 | 81 | #nav li ul { 82 | font-size: 80%; 83 | margin-bottom: 0; 84 | display: none; 85 | } 86 | 87 | #nav li.active ul { 88 | display: block; 89 | } 90 | 91 | #nav li li a { 92 | padding-right: 20px; 93 | } 94 | 95 | #nav ul a { 96 | color: black; 97 | padding: 0 7px 1px 11px; 98 | } 99 | 100 | #nav ul a.active, #nav ul a:hover { 101 | border-bottom: 1px solid #E30808; 102 | color: #E30808; 103 | } 104 | 105 | #logo { 106 | border: 0; 107 | margin-right: 7px; 108 | margin-bottom: 25px; 109 | } 110 | 111 | section { 112 | border-top: 1px solid #E30808; 113 | margin: 1.5em 0; 114 | } 115 | 116 | section.first { 117 | border: none; 118 | margin-top: 0; 119 | } 120 | 121 | #demo { 122 | position: relative; 123 | } 124 | 125 | #demolist { 126 | position: absolute; 127 | right: 5px; 128 | top: 5px; 129 | z-index: 25; 130 | } 131 | 132 | #bankinfo { 133 | text-align: left; 134 | display: none; 135 | padding: 0 .5em; 136 | position: absolute; 137 | border: 2px solid #aaa; 138 | border-radius: 5px; 139 | background: #eee; 140 | top: 10px; 141 | left: 30px; 142 | } 143 | 144 | #bankinfo_close { 145 | position: absolute; 146 | top: 0; right: 6px; 147 | font-weight: bold; 148 | cursor: pointer; 149 | } 150 | 151 | .bigbutton { 152 | cursor: pointer; 153 | text-align: center; 154 | padding: 0 1em; 155 | display: inline-block; 156 | color: white; 157 | position: relative; 158 | line-height: 1.9; 159 | color: white !important; 160 | background: #A21313; 161 | } 162 | 163 | .bigbutton.right { 164 | border-bottom-left-radius: 100px; 165 | border-top-left-radius: 100px; 166 | } 167 | 168 | .bigbutton.left { 169 | border-bottom-right-radius: 100px; 170 | border-top-right-radius: 100px; 171 | } 172 | 173 | .bigbutton:hover { 174 | background: #E30808; 175 | } 176 | 177 | th { 178 | text-decoration: underline; 179 | font-weight: normal; 180 | text-align: left; 181 | } 182 | 183 | #features ul { 184 | list-style: none; 185 | margin: 0 0 1em; 186 | padding: 0 0 0 1.2em; 187 | } 188 | 189 | #features li:before { 190 | content: "-"; 191 | width: 1em; 192 | display: inline-block; 193 | padding: 0; 194 | margin: 0; 195 | margin-left: -1em; 196 | } 197 | 198 | .rel { 199 | margin-bottom: 0; 200 | } 201 | .rel-note { 202 | margin-top: 0; 203 | color: #555; 204 | } 205 | 206 | pre { 207 | padding-left: 15px; 208 | border-left: 2px solid #ddd; 209 | } 210 | 211 | code { 212 | padding: 0 2px; 213 | } 214 | 215 | strong { 216 | text-decoration: underline; 217 | font-weight: normal; 218 | } 219 | 220 | .field { 221 | border: 1px solid #A21313; 222 | } 223 | -------------------------------------------------------------------------------- /app/build/intermediates/assets/debug/doc/docs.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Source Sans Pro'; 3 | font-style: normal; 4 | font-weight: 400; 5 | src: local('Source Sans Pro'), local('SourceSansPro-Regular'), url(http://themes.googleusercontent.com/static/fonts/sourcesanspro/v5/ODelI1aHBYDBqgeIAH2zlBM0YzuT7MdOe03otPbuUS0.woff) format('woff'); 6 | } 7 | 8 | body, html { margin: 0; padding: 0; height: 100%; } 9 | section, article { display: block; padding: 0; } 10 | 11 | body { 12 | background: #f8f8f8; 13 | font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif; 14 | line-height: 1.5; 15 | } 16 | 17 | p { margin-top: 0; } 18 | 19 | h2, h3 { 20 | font-weight: normal; 21 | text-decoration: underline; 22 | margin-bottom: .7em; 23 | } 24 | h2 { font-size: 120%; } 25 | h3 { font-size: 110%; } 26 | article > h2:first-child, section:first-child > h2 { margin-top: 0; } 27 | 28 | a, a:visited, a:link, .quasilink { 29 | color: #A21313; 30 | text-decoration: none; 31 | } 32 | 33 | .quasilink { 34 | cursor: pointer; 35 | } 36 | 37 | article { 38 | max-width: 700px; 39 | margin: 0 auto; 40 | border-left: 2px solid #E30808; 41 | border-right: 1px solid #ddd; 42 | padding: 30px 50px 100px 50px; 43 | background: white; 44 | z-index: 2; 45 | position: relative; 46 | min-height: 100%; 47 | box-sizing: border-box; 48 | -moz-box-sizing: border-box; 49 | } 50 | 51 | #nav { 52 | position: fixed; 53 | top: 30px; 54 | right: 50%; 55 | padding-right: 350px; 56 | text-align: right; 57 | z-index: 1; 58 | } 59 | 60 | @media screen and (max-width: 1000px) { 61 | article { 62 | margin: 0 0 0 160px; 63 | } 64 | #nav { 65 | left: 0; right: none; 66 | width: 160px; 67 | } 68 | } 69 | 70 | #nav ul { 71 | display: block; 72 | margin: 0; padding: 0; 73 | margin-bottom: 32px; 74 | } 75 | 76 | #nav li { 77 | display: block; 78 | margin-bottom: 4px; 79 | } 80 | 81 | #nav li ul { 82 | font-size: 80%; 83 | margin-bottom: 0; 84 | display: none; 85 | } 86 | 87 | #nav li.active ul { 88 | display: block; 89 | } 90 | 91 | #nav li li a { 92 | padding-right: 20px; 93 | } 94 | 95 | #nav ul a { 96 | color: black; 97 | padding: 0 7px 1px 11px; 98 | } 99 | 100 | #nav ul a.active, #nav ul a:hover { 101 | border-bottom: 1px solid #E30808; 102 | color: #E30808; 103 | } 104 | 105 | #logo { 106 | border: 0; 107 | margin-right: 7px; 108 | margin-bottom: 25px; 109 | } 110 | 111 | section { 112 | border-top: 1px solid #E30808; 113 | margin: 1.5em 0; 114 | } 115 | 116 | section.first { 117 | border: none; 118 | margin-top: 0; 119 | } 120 | 121 | #demo { 122 | position: relative; 123 | } 124 | 125 | #demolist { 126 | position: absolute; 127 | right: 5px; 128 | top: 5px; 129 | z-index: 25; 130 | } 131 | 132 | #bankinfo { 133 | text-align: left; 134 | display: none; 135 | padding: 0 .5em; 136 | position: absolute; 137 | border: 2px solid #aaa; 138 | border-radius: 5px; 139 | background: #eee; 140 | top: 10px; 141 | left: 30px; 142 | } 143 | 144 | #bankinfo_close { 145 | position: absolute; 146 | top: 0; right: 6px; 147 | font-weight: bold; 148 | cursor: pointer; 149 | } 150 | 151 | .bigbutton { 152 | cursor: pointer; 153 | text-align: center; 154 | padding: 0 1em; 155 | display: inline-block; 156 | color: white; 157 | position: relative; 158 | line-height: 1.9; 159 | color: white !important; 160 | background: #A21313; 161 | } 162 | 163 | .bigbutton.right { 164 | border-bottom-left-radius: 100px; 165 | border-top-left-radius: 100px; 166 | } 167 | 168 | .bigbutton.left { 169 | border-bottom-right-radius: 100px; 170 | border-top-right-radius: 100px; 171 | } 172 | 173 | .bigbutton:hover { 174 | background: #E30808; 175 | } 176 | 177 | th { 178 | text-decoration: underline; 179 | font-weight: normal; 180 | text-align: left; 181 | } 182 | 183 | #features ul { 184 | list-style: none; 185 | margin: 0 0 1em; 186 | padding: 0 0 0 1.2em; 187 | } 188 | 189 | #features li:before { 190 | content: "-"; 191 | width: 1em; 192 | display: inline-block; 193 | padding: 0; 194 | margin: 0; 195 | margin-left: -1em; 196 | } 197 | 198 | .rel { 199 | margin-bottom: 0; 200 | } 201 | .rel-note { 202 | margin-top: 0; 203 | color: #555; 204 | } 205 | 206 | pre { 207 | padding-left: 15px; 208 | border-left: 2px solid #ddd; 209 | } 210 | 211 | code { 212 | padding: 0 2px; 213 | } 214 | 215 | strong { 216 | text-decoration: underline; 217 | font-weight: normal; 218 | } 219 | 220 | .field { 221 | border: 1px solid #A21313; 222 | } 223 | -------------------------------------------------------------------------------- /app/build/generated/source/r/debug/com/zupilupi/sourcecodeviewer/R.java: -------------------------------------------------------------------------------- 1 | /* AUTO-GENERATED FILE. DO NOT MODIFY. 2 | * 3 | * This class was automatically generated by the 4 | * aapt tool from the resource data it found. It 5 | * should not be modified by hand. 6 | */ 7 | 8 | package com.zupilupi.sourcecodeviewer; 9 | 10 | public final class R { 11 | public static final class attr { 12 | } 13 | public static final class bool { 14 | public static final int appirator_test_mode=0x7f040000; 15 | } 16 | public static final class color { 17 | public static final int appirator_button_end_color=0x7f050000; 18 | public static final int appirator_button_start_color=0x7f050001; 19 | public static final int appirator_button_text_color=0x7f050002; 20 | public static final int splash=0x7f050003; 21 | } 22 | public static final class dimen { 23 | public static final int activity_horizontal_margin=0x7f060000; 24 | public static final int activity_vertical_margin=0x7f060001; 25 | } 26 | public static final class drawable { 27 | public static final int button_appirator=0x7f020000; 28 | public static final int button_find=0x7f020001; 29 | public static final int button_search=0x7f020002; 30 | public static final int edit_text_find=0x7f020003; 31 | public static final int edit_text_home=0x7f020004; 32 | public static final int ic_launcher=0x7f020005; 33 | } 34 | public static final class id { 35 | public static final int action_settings=0x7f0b0011; 36 | public static final int button_find=0x7f0b000c; 37 | public static final int button_show_source=0x7f0b0002; 38 | public static final int cancel=0x7f0b0007; 39 | public static final int field_find=0x7f0b000b; 40 | public static final int field_url=0x7f0b0003; 41 | public static final int firstLine=0x7f0b000f; 42 | public static final int listView=0x7f0b0008; 43 | public static final int message=0x7f0b0004; 44 | public static final int pager=0x7f0b0000; 45 | public static final int pager_title_strip=0x7f0b0001; 46 | public static final int rate=0x7f0b0005; 47 | public static final int rateLater=0x7f0b0006; 48 | public static final int rate_app=0x7f0b0010; 49 | public static final int res_type=0x7f0b000d; 50 | public static final int secondLine=0x7f0b000e; 51 | public static final int site_preview=0x7f0b0009; 52 | public static final int source_code=0x7f0b000a; 53 | } 54 | public static final class integer { 55 | public static final int appirator_days_before_reminding=0x7f070000; 56 | public static final int appirator_days_until_prompt=0x7f070001; 57 | public static final int appirator_delay_until_prompt=0x7f070002; 58 | public static final int appirator_events_until_prompt=0x7f070003; 59 | public static final int appirator_launches_until_prompt=0x7f070004; 60 | } 61 | public static final class layout { 62 | public static final int activity_main=0x7f030000; 63 | public static final int activity_type_url=0x7f030001; 64 | public static final int appirater=0x7f030002; 65 | public static final int fragment_enter_url=0x7f030003; 66 | public static final int fragment_html_resource=0x7f030004; 67 | public static final int fragment_preview=0x7f030005; 68 | public static final int fragment_source_code=0x7f030006; 69 | public static final int row_html_resources=0x7f030007; 70 | } 71 | public static final class menu { 72 | public static final int main=0x7f0a0000; 73 | public static final int test=0x7f0a0001; 74 | public static final int type_url=0x7f0a0002; 75 | } 76 | public static final class string { 77 | public static final int action_settings=0x7f080000; 78 | public static final int alert_url_invalid=0x7f080001; 79 | public static final int app_name=0x7f080002; 80 | public static final int appirator_app_title=0x7f080003; 81 | public static final int appirator_market_url=0x7f080004; 82 | public static final int button_find=0x7f080005; 83 | public static final int button_text=0x7f080006; 84 | public static final int field_find_hint=0x7f080007; 85 | public static final int field_url_hint=0x7f080008; 86 | public static final int hello_world=0x7f080009; 87 | public static final int menu_rateApp=0x7f08000a; 88 | public static final int rate=0x7f08000b; 89 | public static final int rate_cancel=0x7f08000c; 90 | public static final int rate_later=0x7f08000d; 91 | public static final int rate_message=0x7f08000e; 92 | public static final int rate_title=0x7f08000f; 93 | public static final int title_activity_type_url=0x7f080010; 94 | public static final int title_section1=0x7f080011; 95 | public static final int title_section2=0x7f080012; 96 | public static final int title_section3=0x7f080013; 97 | } 98 | public static final class style { 99 | /** 100 | Theme customizations available in newer API levels can go in 101 | res/values-vXX/styles.xml, while customizations related to 102 | backward-compatibility can go here. 103 | 104 | API 11 theme customizations can go here. 105 | API 14 theme customizations can go here. 106 | */ 107 | public static final int AppBaseTheme=0x7f090000; 108 | /** All customizations that are NOT specific to a particular API-level can go here. 109 | */ 110 | public static final int AppTheme=0x7f090001; 111 | public static final int appiratorButton=0x7f090002; 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /appirater/app.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /appirater/appirater.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /app/app.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /app/src/main/assets/lib/codemirror.css: -------------------------------------------------------------------------------- 1 | /* BASICS */ 2 | 3 | .CodeMirror { 4 | /* Set height, width, borders, and global font properties here */ 5 | font-family: monospace; 6 | /* height: 300px; */ 7 | } 8 | .CodeMirror-scroll { 9 | /* Set scrolling behaviour here */ 10 | overflow: auto; 11 | } 12 | 13 | /* PADDING */ 14 | 15 | .CodeMirror-lines { 16 | padding: 4px 0; /* Vertical padding around content */ 17 | } 18 | .CodeMirror pre { 19 | padding: 0 4px; /* Horizontal padding of content */ 20 | } 21 | 22 | .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { 23 | background-color: white; /* The little square between H and V scrollbars */ 24 | } 25 | 26 | /* GUTTER */ 27 | 28 | .CodeMirror-gutters { 29 | border-right: 1px solid #ddd; 30 | background-color: #f7f7f7; 31 | white-space: nowrap; 32 | } 33 | .CodeMirror-linenumbers {} 34 | .CodeMirror-linenumber { 35 | padding: 0 3px 0 5px; 36 | min-width: 20px; 37 | text-align: right; 38 | color: #999; 39 | } 40 | 41 | /* CURSOR */ 42 | 43 | .CodeMirror div.CodeMirror-cursor { 44 | border-left: 1px solid black; 45 | z-index: 3; 46 | } 47 | /* Shown when moving in bi-directional text */ 48 | .CodeMirror div.CodeMirror-secondarycursor { 49 | border-left: 1px solid silver; 50 | } 51 | .CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor { 52 | width: auto; 53 | border: 0; 54 | background: #7e7; 55 | z-index: 1; 56 | } 57 | /* Can style cursor different in overwrite (non-insert) mode */ 58 | .CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite {} 59 | 60 | .cm-tab { display: inline-block; } 61 | 62 | /* DEFAULT THEME */ 63 | 64 | .cm-s-default .cm-keyword {color: #708;} 65 | .cm-s-default .cm-atom {color: #219;} 66 | .cm-s-default .cm-number {color: #164;} 67 | .cm-s-default .cm-def {color: #00f;} 68 | .cm-s-default .cm-variable {color: black;} 69 | .cm-s-default .cm-variable-2 {color: #05a;} 70 | .cm-s-default .cm-variable-3 {color: #085;} 71 | .cm-s-default .cm-property {color: black;} 72 | .cm-s-default .cm-operator {color: black;} 73 | .cm-s-default .cm-comment {color: #a50;} 74 | .cm-s-default .cm-string {color: #a11;} 75 | .cm-s-default .cm-string-2 {color: #f50;} 76 | .cm-s-default .cm-meta {color: #555;} 77 | .cm-s-default .cm-error {color: #f00;} 78 | .cm-s-default .cm-qualifier {color: #555;} 79 | .cm-s-default .cm-builtin {color: #30a;} 80 | .cm-s-default .cm-bracket {color: #997;} 81 | .cm-s-default .cm-tag {color: #170;} 82 | .cm-s-default .cm-attribute {color: #00c;} 83 | .cm-s-default .cm-header {color: blue;} 84 | .cm-s-default .cm-quote {color: #090;} 85 | .cm-s-default .cm-hr {color: #999;} 86 | .cm-s-default .cm-link {color: #00c;} 87 | 88 | .cm-negative {color: #d44;} 89 | .cm-positive {color: #292;} 90 | .cm-header, .cm-strong {font-weight: bold;} 91 | .cm-em {font-style: italic;} 92 | .cm-link {text-decoration: underline;} 93 | 94 | .cm-invalidchar {color: #f00;} 95 | 96 | div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;} 97 | div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} 98 | .CodeMirror-activeline-background {background: #e8f2ff;} 99 | 100 | /* STOP */ 101 | 102 | /* The rest of this file contains styles related to the mechanics of 103 | the editor. You probably shouldn't touch them. */ 104 | 105 | .CodeMirror { 106 | line-height: 1; 107 | position: relative; 108 | overflow: hidden; 109 | background: white; 110 | color: black; 111 | } 112 | 113 | .CodeMirror-scroll { 114 | /* 30px is the magic margin used to hide the element's real scrollbars */ 115 | /* See overflow: hidden in .CodeMirror */ 116 | margin-bottom: -30px; margin-right: -30px; 117 | padding-bottom: 30px; padding-right: 30px; 118 | height: 100%; 119 | outline: none; /* Prevent dragging from highlighting the element */ 120 | position: relative; 121 | -moz-box-sizing: content-box; 122 | box-sizing: content-box; 123 | } 124 | .CodeMirror-sizer { 125 | position: relative; 126 | } 127 | 128 | /* The fake, visible scrollbars. Used to force redraw during scrolling 129 | before actuall scrolling happens, thus preventing shaking and 130 | flickering artifacts. */ 131 | .CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { 132 | position: absolute; 133 | z-index: 6; 134 | display: none; 135 | } 136 | .CodeMirror-vscrollbar { 137 | right: 0; top: 0; 138 | overflow-x: hidden; 139 | overflow-y: scroll; 140 | } 141 | .CodeMirror-hscrollbar { 142 | bottom: 0; left: 0; 143 | overflow-y: hidden; 144 | overflow-x: scroll; 145 | } 146 | .CodeMirror-scrollbar-filler { 147 | right: 0; bottom: 0; 148 | } 149 | .CodeMirror-gutter-filler { 150 | left: 0; bottom: 0; 151 | } 152 | 153 | .CodeMirror-gutters { 154 | position: absolute; left: 0; top: 0; 155 | padding-bottom: 30px; 156 | z-index: 3; 157 | } 158 | .CodeMirror-gutter { 159 | white-space: normal; 160 | height: 100%; 161 | -moz-box-sizing: content-box; 162 | box-sizing: content-box; 163 | padding-bottom: 30px; 164 | margin-bottom: -32px; 165 | display: inline-block; 166 | /* Hack to make IE7 behave */ 167 | *zoom:1; 168 | *display:inline; 169 | } 170 | .CodeMirror-gutter-elt { 171 | position: absolute; 172 | cursor: default; 173 | z-index: 4; 174 | } 175 | 176 | .CodeMirror-lines { 177 | cursor: text; 178 | } 179 | .CodeMirror pre { 180 | /* Reset some styles that the rest of the page might have set */ 181 | -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; 182 | border-width: 0; 183 | background: transparent; 184 | font-family: inherit; 185 | font-size: inherit; 186 | margin: 0; 187 | white-space: pre; 188 | word-wrap: normal; 189 | line-height: inherit; 190 | color: inherit; 191 | z-index: 2; 192 | position: relative; 193 | overflow: visible; 194 | } 195 | .CodeMirror-wrap pre { 196 | word-wrap: break-word; 197 | white-space: pre-wrap; 198 | word-break: normal; 199 | } 200 | .CodeMirror-code pre { 201 | border-right: 30px solid transparent; 202 | width: -webkit-fit-content; 203 | width: -moz-fit-content; 204 | width: fit-content; 205 | } 206 | .CodeMirror-wrap .CodeMirror-code pre { 207 | border-right: none; 208 | width: auto; 209 | } 210 | .CodeMirror-linebackground { 211 | position: absolute; 212 | left: 0; right: 0; top: 0; bottom: 0; 213 | z-index: 0; 214 | } 215 | 216 | .CodeMirror-linewidget { 217 | position: relative; 218 | z-index: 2; 219 | overflow: auto; 220 | } 221 | 222 | .CodeMirror-widget {} 223 | 224 | .CodeMirror-wrap .CodeMirror-scroll { 225 | overflow-x: hidden; 226 | } 227 | 228 | .CodeMirror-measure { 229 | position: absolute; 230 | width: 100%; 231 | height: 0; 232 | overflow: hidden; 233 | visibility: hidden; 234 | } 235 | .CodeMirror-measure pre { position: static; } 236 | 237 | .CodeMirror div.CodeMirror-cursor { 238 | position: absolute; 239 | visibility: hidden; 240 | border-right: none; 241 | width: 0; 242 | } 243 | .CodeMirror-focused div.CodeMirror-cursor { 244 | visibility: visible; 245 | } 246 | 247 | .CodeMirror-selected { background: #d9d9d9; } 248 | .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; } 249 | 250 | .cm-searching { 251 | background: #ffa; 252 | background: rgba(255, 255, 0, .4); 253 | } 254 | 255 | /* IE7 hack to prevent it from returning funny offsetTops on the spans */ 256 | .CodeMirror span { *vertical-align: text-bottom; } 257 | 258 | @media print { 259 | /* Hide the cursor when printing */ 260 | .CodeMirror div.CodeMirror-cursor { 261 | visibility: hidden; 262 | } 263 | } 264 | -------------------------------------------------------------------------------- /app/build/intermediates/assets/debug/lib/codemirror.css: -------------------------------------------------------------------------------- 1 | /* BASICS */ 2 | 3 | .CodeMirror { 4 | /* Set height, width, borders, and global font properties here */ 5 | font-family: monospace; 6 | /* height: 300px; */ 7 | } 8 | .CodeMirror-scroll { 9 | /* Set scrolling behaviour here */ 10 | overflow: auto; 11 | } 12 | 13 | /* PADDING */ 14 | 15 | .CodeMirror-lines { 16 | padding: 4px 0; /* Vertical padding around content */ 17 | } 18 | .CodeMirror pre { 19 | padding: 0 4px; /* Horizontal padding of content */ 20 | } 21 | 22 | .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { 23 | background-color: white; /* The little square between H and V scrollbars */ 24 | } 25 | 26 | /* GUTTER */ 27 | 28 | .CodeMirror-gutters { 29 | border-right: 1px solid #ddd; 30 | background-color: #f7f7f7; 31 | white-space: nowrap; 32 | } 33 | .CodeMirror-linenumbers {} 34 | .CodeMirror-linenumber { 35 | padding: 0 3px 0 5px; 36 | min-width: 20px; 37 | text-align: right; 38 | color: #999; 39 | } 40 | 41 | /* CURSOR */ 42 | 43 | .CodeMirror div.CodeMirror-cursor { 44 | border-left: 1px solid black; 45 | z-index: 3; 46 | } 47 | /* Shown when moving in bi-directional text */ 48 | .CodeMirror div.CodeMirror-secondarycursor { 49 | border-left: 1px solid silver; 50 | } 51 | .CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor { 52 | width: auto; 53 | border: 0; 54 | background: #7e7; 55 | z-index: 1; 56 | } 57 | /* Can style cursor different in overwrite (non-insert) mode */ 58 | .CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite {} 59 | 60 | .cm-tab { display: inline-block; } 61 | 62 | /* DEFAULT THEME */ 63 | 64 | .cm-s-default .cm-keyword {color: #708;} 65 | .cm-s-default .cm-atom {color: #219;} 66 | .cm-s-default .cm-number {color: #164;} 67 | .cm-s-default .cm-def {color: #00f;} 68 | .cm-s-default .cm-variable {color: black;} 69 | .cm-s-default .cm-variable-2 {color: #05a;} 70 | .cm-s-default .cm-variable-3 {color: #085;} 71 | .cm-s-default .cm-property {color: black;} 72 | .cm-s-default .cm-operator {color: black;} 73 | .cm-s-default .cm-comment {color: #a50;} 74 | .cm-s-default .cm-string {color: #a11;} 75 | .cm-s-default .cm-string-2 {color: #f50;} 76 | .cm-s-default .cm-meta {color: #555;} 77 | .cm-s-default .cm-error {color: #f00;} 78 | .cm-s-default .cm-qualifier {color: #555;} 79 | .cm-s-default .cm-builtin {color: #30a;} 80 | .cm-s-default .cm-bracket {color: #997;} 81 | .cm-s-default .cm-tag {color: #170;} 82 | .cm-s-default .cm-attribute {color: #00c;} 83 | .cm-s-default .cm-header {color: blue;} 84 | .cm-s-default .cm-quote {color: #090;} 85 | .cm-s-default .cm-hr {color: #999;} 86 | .cm-s-default .cm-link {color: #00c;} 87 | 88 | .cm-negative {color: #d44;} 89 | .cm-positive {color: #292;} 90 | .cm-header, .cm-strong {font-weight: bold;} 91 | .cm-em {font-style: italic;} 92 | .cm-link {text-decoration: underline;} 93 | 94 | .cm-invalidchar {color: #f00;} 95 | 96 | div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;} 97 | div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} 98 | .CodeMirror-activeline-background {background: #e8f2ff;} 99 | 100 | /* STOP */ 101 | 102 | /* The rest of this file contains styles related to the mechanics of 103 | the editor. You probably shouldn't touch them. */ 104 | 105 | .CodeMirror { 106 | line-height: 1; 107 | position: relative; 108 | overflow: hidden; 109 | background: white; 110 | color: black; 111 | } 112 | 113 | .CodeMirror-scroll { 114 | /* 30px is the magic margin used to hide the element's real scrollbars */ 115 | /* See overflow: hidden in .CodeMirror */ 116 | margin-bottom: -30px; margin-right: -30px; 117 | padding-bottom: 30px; padding-right: 30px; 118 | height: 100%; 119 | outline: none; /* Prevent dragging from highlighting the element */ 120 | position: relative; 121 | -moz-box-sizing: content-box; 122 | box-sizing: content-box; 123 | } 124 | .CodeMirror-sizer { 125 | position: relative; 126 | } 127 | 128 | /* The fake, visible scrollbars. Used to force redraw during scrolling 129 | before actuall scrolling happens, thus preventing shaking and 130 | flickering artifacts. */ 131 | .CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { 132 | position: absolute; 133 | z-index: 6; 134 | display: none; 135 | } 136 | .CodeMirror-vscrollbar { 137 | right: 0; top: 0; 138 | overflow-x: hidden; 139 | overflow-y: scroll; 140 | } 141 | .CodeMirror-hscrollbar { 142 | bottom: 0; left: 0; 143 | overflow-y: hidden; 144 | overflow-x: scroll; 145 | } 146 | .CodeMirror-scrollbar-filler { 147 | right: 0; bottom: 0; 148 | } 149 | .CodeMirror-gutter-filler { 150 | left: 0; bottom: 0; 151 | } 152 | 153 | .CodeMirror-gutters { 154 | position: absolute; left: 0; top: 0; 155 | padding-bottom: 30px; 156 | z-index: 3; 157 | } 158 | .CodeMirror-gutter { 159 | white-space: normal; 160 | height: 100%; 161 | -moz-box-sizing: content-box; 162 | box-sizing: content-box; 163 | padding-bottom: 30px; 164 | margin-bottom: -32px; 165 | display: inline-block; 166 | /* Hack to make IE7 behave */ 167 | *zoom:1; 168 | *display:inline; 169 | } 170 | .CodeMirror-gutter-elt { 171 | position: absolute; 172 | cursor: default; 173 | z-index: 4; 174 | } 175 | 176 | .CodeMirror-lines { 177 | cursor: text; 178 | } 179 | .CodeMirror pre { 180 | /* Reset some styles that the rest of the page might have set */ 181 | -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; 182 | border-width: 0; 183 | background: transparent; 184 | font-family: inherit; 185 | font-size: inherit; 186 | margin: 0; 187 | white-space: pre; 188 | word-wrap: normal; 189 | line-height: inherit; 190 | color: inherit; 191 | z-index: 2; 192 | position: relative; 193 | overflow: visible; 194 | } 195 | .CodeMirror-wrap pre { 196 | word-wrap: break-word; 197 | white-space: pre-wrap; 198 | word-break: normal; 199 | } 200 | .CodeMirror-code pre { 201 | border-right: 30px solid transparent; 202 | width: -webkit-fit-content; 203 | width: -moz-fit-content; 204 | width: fit-content; 205 | } 206 | .CodeMirror-wrap .CodeMirror-code pre { 207 | border-right: none; 208 | width: auto; 209 | } 210 | .CodeMirror-linebackground { 211 | position: absolute; 212 | left: 0; right: 0; top: 0; bottom: 0; 213 | z-index: 0; 214 | } 215 | 216 | .CodeMirror-linewidget { 217 | position: relative; 218 | z-index: 2; 219 | overflow: auto; 220 | } 221 | 222 | .CodeMirror-widget {} 223 | 224 | .CodeMirror-wrap .CodeMirror-scroll { 225 | overflow-x: hidden; 226 | } 227 | 228 | .CodeMirror-measure { 229 | position: absolute; 230 | width: 100%; 231 | height: 0; 232 | overflow: hidden; 233 | visibility: hidden; 234 | } 235 | .CodeMirror-measure pre { position: static; } 236 | 237 | .CodeMirror div.CodeMirror-cursor { 238 | position: absolute; 239 | visibility: hidden; 240 | border-right: none; 241 | width: 0; 242 | } 243 | .CodeMirror-focused div.CodeMirror-cursor { 244 | visibility: visible; 245 | } 246 | 247 | .CodeMirror-selected { background: #d9d9d9; } 248 | .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; } 249 | 250 | .cm-searching { 251 | background: #ffa; 252 | background: rgba(255, 255, 0, .4); 253 | } 254 | 255 | /* IE7 hack to prevent it from returning funny offsetTops on the spans */ 256 | .CodeMirror span { *vertical-align: text-bottom; } 257 | 258 | @media print { 259 | /* Hide the cursor when printing */ 260 | .CodeMirror div.CodeMirror-cursor { 261 | visibility: hidden; 262 | } 263 | } 264 | -------------------------------------------------------------------------------- /appirater/src/main/java/com/sbstrm/appirater/Appirater.java: -------------------------------------------------------------------------------- 1 | package com.sbstrm.appirater; 2 | 3 | import android.annotation.SuppressLint; 4 | import android.app.Dialog; 5 | import android.content.Context; 6 | import android.content.Intent; 7 | import android.content.SharedPreferences; 8 | import android.net.Uri; 9 | import android.util.DisplayMetrics; 10 | import android.util.Log; 11 | import android.view.Display; 12 | import android.view.LayoutInflater; 13 | import android.view.View; 14 | import android.view.View.OnClickListener; 15 | import android.view.Window; 16 | import android.view.WindowManager; 17 | import android.widget.Button; 18 | import android.widget.LinearLayout; 19 | import android.widget.TextView; 20 | 21 | import android.os.Handler; 22 | 23 | 24 | 25 | /* 26 | * @source https://github.com/sbstrm/appirater-android 27 | * @license MIT/X11 28 | * 29 | * Copyright (c) 2011-2013 sbstrm Y.K. 30 | * 31 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 32 | * 33 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 34 | * 35 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 36 | */ 37 | 38 | public class Appirater { 39 | 40 | private static final String PREF_LAUNCH_COUNT = "launch_count"; 41 | private static final String PREF_EVENT_COUNT = "event_count"; 42 | private static final String PREF_RATE_CLICKED = "rateclicked"; 43 | private static final String PREF_DONT_SHOW = "dontshow"; 44 | private static final String PREF_DATE_REMINDER_PRESSED = "date_reminder_pressed"; 45 | private static final String PREF_DATE_FIRST_LAUNCHED = "date_firstlaunch"; 46 | private static final String PREF_APP_VERSION_CODE = "versioncode"; 47 | 48 | public static void appLaunched(final Context mContext) { 49 | boolean testMode = mContext.getResources().getBoolean(R.bool.appirator_test_mode); 50 | SharedPreferences prefs = mContext.getSharedPreferences(mContext.getPackageName()+".appirater", 0); 51 | if(!testMode && (prefs.getBoolean(PREF_DONT_SHOW, false) || prefs.getBoolean(PREF_RATE_CLICKED, false))) {return;} 52 | 53 | final SharedPreferences.Editor editor = prefs.edit(); 54 | 55 | if(testMode){ 56 | showRateDialog(mContext, editor); 57 | return; 58 | } 59 | 60 | if(R.integer.appirator_delay_until_prompt > 0){ 61 | 62 | Log.d("APPIRATER", "DELAY until prompt bla bla " + mContext.getResources().getInteger(R.integer.appirator_delay_until_prompt)); 63 | 64 | Handler handler = new Handler(); 65 | handler.postDelayed(new Runnable() { 66 | @Override 67 | public void run() { 68 | showRateDialog(mContext, editor); 69 | } 70 | }, mContext.getResources().getInteger(R.integer.appirator_delay_until_prompt) * 1000); // time to start show the dialog 71 | 72 | return; 73 | } 74 | 75 | // Increment launch counter 76 | long launch_count = prefs.getLong(PREF_LAUNCH_COUNT, 0); 77 | 78 | // Get events counter 79 | long event_count = prefs.getLong(PREF_EVENT_COUNT, 0); 80 | 81 | // Get date of first launch 82 | long date_firstLaunch = prefs.getLong(PREF_DATE_FIRST_LAUNCHED, 0); 83 | 84 | // Get reminder date pressed 85 | long date_reminder_pressed = prefs.getLong(PREF_DATE_REMINDER_PRESSED, 0); 86 | 87 | try{ 88 | int appVersionCode = mContext.getPackageManager().getPackageInfo(mContext.getPackageName(), 0).versionCode; 89 | if(prefs.getInt(PREF_APP_VERSION_CODE, 0) != appVersionCode){ 90 | //Reset the launch and event counters to help assure users are rating based on the latest version. 91 | launch_count = 0; 92 | event_count = 0; 93 | editor.putLong(PREF_EVENT_COUNT, event_count); 94 | } 95 | editor.putInt(PREF_APP_VERSION_CODE, appVersionCode); 96 | }catch(Exception e){ 97 | //do nothing 98 | } 99 | 100 | launch_count++; 101 | editor.putLong(PREF_LAUNCH_COUNT, launch_count); 102 | 103 | if (date_firstLaunch == 0) { 104 | date_firstLaunch = System.currentTimeMillis(); 105 | editor.putLong(PREF_DATE_FIRST_LAUNCHED, date_firstLaunch); 106 | } 107 | 108 | // Wait at least n days or m events before opening 109 | if (launch_count >= mContext.getResources().getInteger(R.integer.appirator_launches_until_prompt)) { 110 | long millisecondsToWait = mContext.getResources().getInteger(R.integer.appirator_days_until_prompt) * 24 * 60 * 60 * 1000L; 111 | if (System.currentTimeMillis() >= (date_firstLaunch + millisecondsToWait) || event_count >= mContext.getResources().getInteger(R.integer.appirator_events_until_prompt)) { 112 | if(date_reminder_pressed == 0){ 113 | showRateDialog(mContext, editor); 114 | }else{ 115 | long remindMillisecondsToWait = mContext.getResources().getInteger(R.integer.appirator_days_before_reminding) * 24 * 60 * 60 * 1000L; 116 | if(System.currentTimeMillis() >= (remindMillisecondsToWait + date_reminder_pressed)){ 117 | showRateDialog(mContext, editor); 118 | } 119 | } 120 | } 121 | } 122 | 123 | editor.commit(); 124 | } 125 | 126 | public static void rateApp(Context mContext) 127 | { 128 | SharedPreferences prefs = mContext.getSharedPreferences(mContext.getPackageName()+".appirater", 0); 129 | SharedPreferences.Editor editor = prefs.edit(); 130 | rateApp(mContext, editor); 131 | } 132 | 133 | public static void significantEvent(Context mContext) { 134 | boolean testMode = mContext.getResources().getBoolean(R.bool.appirator_test_mode); 135 | SharedPreferences prefs = mContext.getSharedPreferences(mContext.getPackageName()+".appirater", 0); 136 | if(!testMode && (prefs.getBoolean(PREF_DONT_SHOW, false) || prefs.getBoolean(PREF_RATE_CLICKED, false))) {return;} 137 | 138 | long event_count = prefs.getLong(PREF_EVENT_COUNT, 0); 139 | event_count++; 140 | prefs.edit().putLong(PREF_EVENT_COUNT, event_count).apply(); 141 | } 142 | 143 | private static void rateApp(Context mContext, final SharedPreferences.Editor editor) { 144 | mContext.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(String.format(mContext.getString(R.string.appirator_market_url), mContext.getPackageName())))); 145 | if (editor != null) { 146 | editor.putBoolean(PREF_RATE_CLICKED, true); 147 | editor.commit(); 148 | } 149 | } 150 | 151 | @SuppressLint("NewApi") 152 | private static void showRateDialog(final Context mContext, final SharedPreferences.Editor editor) { 153 | String appName = mContext.getString(R.string.appirator_app_title); 154 | final Dialog dialog = new Dialog(mContext); 155 | 156 | if (android.os.Build.VERSION.RELEASE.startsWith("1.") || android.os.Build.VERSION.RELEASE.startsWith("2.0") || android.os.Build.VERSION.RELEASE.startsWith("2.1")){ 157 | //No dialog title on pre-froyo devices 158 | dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); 159 | }else if(mContext.getResources().getDisplayMetrics().densityDpi == DisplayMetrics.DENSITY_LOW || mContext.getResources().getDisplayMetrics().densityDpi == DisplayMetrics.DENSITY_MEDIUM){ 160 | Display display = ((WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay(); 161 | int rotation = display.getRotation(); 162 | if(rotation == 90 || rotation == 270){ 163 | dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); 164 | }else{ 165 | dialog.setTitle(String.format(mContext.getString(R.string.rate_title), appName)); 166 | } 167 | }else{ 168 | dialog.setTitle(String.format(mContext.getString(R.string.rate_title), appName)); 169 | } 170 | 171 | LinearLayout layout = (LinearLayout)LayoutInflater.from(mContext).inflate(R.layout.appirater, null); 172 | 173 | TextView tv = (TextView) layout.findViewById(R.id.message); 174 | tv.setText(String.format(mContext.getString(R.string.rate_message), appName)); 175 | 176 | Button rateButton = (Button) layout.findViewById(R.id.rate); 177 | rateButton.setText(String.format(mContext.getString(R.string.rate), appName)); 178 | rateButton.setOnClickListener(new OnClickListener() { 179 | public void onClick(View v) { 180 | rateApp(mContext, editor); 181 | dialog.dismiss(); 182 | } 183 | }); 184 | 185 | Button rateLaterButton = (Button) layout.findViewById(R.id.rateLater); 186 | rateLaterButton.setText(mContext.getString(R.string.rate_later)); 187 | rateLaterButton.setOnClickListener(new OnClickListener() { 188 | public void onClick(View v) { 189 | if (editor != null) { 190 | editor.putLong(PREF_DATE_REMINDER_PRESSED,System.currentTimeMillis()); 191 | editor.commit(); 192 | } 193 | dialog.dismiss(); 194 | } 195 | }); 196 | 197 | Button cancelButton = (Button) layout.findViewById(R.id.cancel); 198 | cancelButton.setText(mContext.getString(R.string.rate_cancel)); 199 | cancelButton.setOnClickListener(new OnClickListener() { 200 | public void onClick(View v) { 201 | if (editor != null) { 202 | editor.putBoolean(PREF_DONT_SHOW, true); 203 | editor.commit(); 204 | } 205 | dialog.dismiss(); 206 | } 207 | }); 208 | 209 | dialog.setContentView(layout); 210 | dialog.show(); 211 | } 212 | } --------------------------------------------------------------------------------