├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── drawable │ │ │ │ ├── web.png │ │ │ │ ├── github.png │ │ │ │ ├── instagram.png │ │ │ │ ├── profile.jpg │ │ │ │ ├── twitter.png │ │ │ │ ├── button_bg.xml │ │ │ │ ├── bg_round.xml │ │ │ │ ├── search_icon.xml │ │ │ │ ├── edit_text_bg.xml │ │ │ │ ├── ic_signs.xml │ │ │ │ └── ic_launcher_background.xml │ │ │ ├── font │ │ │ │ └── metropolis_medium.otf │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_background.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_background.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_background.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_background.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_background.png │ │ │ ├── values │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── styles.xml │ │ │ │ └── strings.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── menu │ │ │ │ └── menu.xml │ │ │ ├── layout │ │ │ │ ├── progress_dialog.xml │ │ │ │ ├── statewise_list_layout.xml │ │ │ │ ├── districtwise_list_layout.xml │ │ │ │ ├── splash_activity.xml │ │ │ │ ├── countrywise_list_layout.xml │ │ │ │ ├── activity_districtwise_data.xml │ │ │ │ ├── activity_statewise_data.xml │ │ │ │ ├── activity_countrywise_data.xml │ │ │ │ └── activity_info.xml │ │ │ ├── layout-sw320dp │ │ │ │ ├── statewise_list_layout.xml │ │ │ │ ├── districtwise_list_layout.xml │ │ │ │ ├── countrywise_list_layout.xml │ │ │ │ ├── activity_districtwise_data.xml │ │ │ │ ├── activity_statewise_data.xml │ │ │ │ └── activity_countrywise_data.xml │ │ │ ├── layout-sw411dp │ │ │ │ ├── statewise_list_layout.xml │ │ │ │ ├── districtwise_list_layout.xml │ │ │ │ ├── countrywise_list_layout.xml │ │ │ │ ├── activity_districtwise_data.xml │ │ │ │ ├── activity_statewise_data.xml │ │ │ │ ├── activity_countrywise_data.xml │ │ │ │ └── activity_info.xml │ │ │ ├── layout-sw457dp │ │ │ │ ├── statewise_list_layout.xml │ │ │ │ ├── districtwise_list_layout.xml │ │ │ │ ├── countrywise_list_layout.xml │ │ │ │ ├── activity_districtwise_data.xml │ │ │ │ ├── activity_statewise_data.xml │ │ │ │ ├── activity_countrywise_data.xml │ │ │ │ └── activity_info.xml │ │ │ └── layout-sw514dp │ │ │ │ ├── statewise_list_layout.xml │ │ │ │ ├── districtwise_list_layout.xml │ │ │ │ ├── countrywise_list_layout.xml │ │ │ │ ├── activity_districtwise_data.xml │ │ │ │ ├── activity_statewise_data.xml │ │ │ │ └── activity_countrywise_data.xml │ │ ├── ic_launcher-playstore.png │ │ ├── java │ │ │ └── com │ │ │ │ └── vipul │ │ │ │ └── covidstatus │ │ │ │ ├── SplashActivity.java │ │ │ │ ├── DistrictModel.java │ │ │ │ ├── StatewiseModel.java │ │ │ │ ├── CountrywiseModel.java │ │ │ │ ├── StatewiseAdapter.java │ │ │ │ ├── DistrictAdapter.java │ │ │ │ ├── PerDistrictData.java │ │ │ │ ├── PerCountryData.java │ │ │ │ ├── InfoActivity.java │ │ │ │ ├── CountrywiseAdapter.java │ │ │ │ ├── PerStateData.java │ │ │ │ └── StatewiseDataActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── vipul │ │ │ └── covidstatus │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── vipul │ │ └── covidstatus │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .idea ├── render.experimental.xml ├── runConfigurations.xml ├── jarRepositories.xml └── codeStyles │ └── Project.xml ├── LICENSE ├── gradle.properties ├── README.md ├── gradlew.bat ├── .gitignore └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name='Covid-19 Status' 2 | include ':app' 3 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/covid19-status-android/master/app/src/main/res/drawable/web.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/covid19-status-android/master/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/drawable/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/covid19-status-android/master/app/src/main/res/drawable/github.png -------------------------------------------------------------------------------- /app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/covid19-status-android/master/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/instagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/covid19-status-android/master/app/src/main/res/drawable/instagram.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/profile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/covid19-status-android/master/app/src/main/res/drawable/profile.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/covid19-status-android/master/app/src/main/res/drawable/twitter.png -------------------------------------------------------------------------------- /app/src/main/res/font/metropolis_medium.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/covid19-status-android/master/app/src/main/res/font/metropolis_medium.otf -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/covid19-status-android/master/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/covid19-status-android/master/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/covid19-status-android/master/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/covid19-status-android/master/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/covid19-status-android/master/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/covid19-status-android/master/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/covid19-status-android/master/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/covid19-status-android/master/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/covid19-status-android/master/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/covid19-status-android/master/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/covid19-status-android/master/app/src/main/res/mipmap-hdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/covid19-status-android/master/app/src/main/res/mipmap-mdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/covid19-status-android/master/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/covid19-status-android/master/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lingarajsankaravelu/covid19-status-android/master/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /.idea/render.experimental.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_bg.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri May 29 01:24:57 IST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | -------------------------------------------------------------------------------- /app/src/test/java/com/vipul/covidstatus/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.vipul.covidstatus; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/search_icon.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/edit_text_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_signs.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #161625 4 | #161625 5 | #03DAC5 6 | #FE1D1D2F 7 | #7EC544 8 | #FBC233 9 | #F6404F 10 | #78DBF3 11 | #F375B5 12 | #FF7100 13 | #007afe 14 | #F6404F 15 | #08a045 16 | #c4c4c4 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/vipul/covidstatus/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.vipul.covidstatus; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.test.platform.app.InstrumentationRegistry; 6 | import androidx.test.ext.junit.runners.AndroidJUnit4; 7 | 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | import static org.junit.Assert.*; 12 | 13 | /** 14 | * Instrumented test, which will execute on an Android device. 15 | * 16 | * @see Testing documentation 17 | */ 18 | @RunWith(AndroidJUnit4.class) 19 | public class ExampleInstrumentedTest { 20 | @Test 21 | public void useAppContext() { 22 | // Context of the app under test. 23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 24 | 25 | assertEquals("com.vipul.covidstatus", appContext.getPackageName()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/res/layout/progress_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 14 | 15 | 18 | 19 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Coders-Of-XDA-OT 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app's APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Automatically convert third-party libraries to use AndroidX 19 | android.enableJetifier=true 20 | 21 | -------------------------------------------------------------------------------- /.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Covid-19 Status 3 | 4 | 5 | \u2022 covid19india.org for India specific API. 6 | \n\u2022 corona.lmao.ninja for Global API. 7 | \n\u2022 Laura Reen for app icon. 8 | \n\u2022 Flaticon for social media icons. 9 | \n\u2022 Ashish Vaish for his help in fixing bugs. 10 | 11 | \u2022 Glide for showing flag images. 12 | \n\u2022 Eaze Graph for showing Pie charts. 13 | \n\u2022 Circle ImageView for showing my pic xD lol. 14 | 15 | Made with ❤ in India\n\nBy Vipul Jha 16 | 17 | 18 | 19 | 2.1 20 | 21 | 22 | 23 | Covid-19 Status v2.1 24 | \u2022 Fixed some layout glitches.\n\u2022 Fixed countries not showing new recovered cases.\n\u2022 Improvements in push notifications\n\u2022 Other minor under the hood changes. 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/java/com/vipul/covidstatus/SplashActivity.java: -------------------------------------------------------------------------------- 1 | package com.vipul.covidstatus; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.os.Handler; 6 | import android.os.PersistableBundle; 7 | import android.view.WindowManager; 8 | import android.view.animation.AccelerateInterpolator; 9 | import android.view.animation.AlphaAnimation; 10 | import android.view.animation.Animation; 11 | import android.widget.ImageView; 12 | import android.widget.TextView; 13 | 14 | import androidx.annotation.Nullable; 15 | import androidx.appcompat.app.AppCompatActivity; 16 | import androidx.core.content.ContextCompat; 17 | 18 | public class SplashActivity extends AppCompatActivity { 19 | 20 | @Override 21 | public void onCreate(Bundle savedInstanceState) { 22 | super.onCreate(savedInstanceState); 23 | //getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN ); 24 | setContentView(R.layout.splash_activity); 25 | getWindow().setNavigationBarColor(ContextCompat.getColor(this, R.color.colorPrimaryDark)); 26 | 27 | int SPLASH_SCREEN_TIMEOUT = 1000; 28 | new Handler().postDelayed(new Runnable() { 29 | @Override 30 | public void run() { 31 | Intent intent = new Intent(SplashActivity.this, MainActivity.class); 32 | startActivity(intent); 33 | finish(); 34 | } 35 | }, SPLASH_SCREEN_TIMEOUT); 36 | 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/com/vipul/covidstatus/DistrictModel.java: -------------------------------------------------------------------------------- 1 | package com.vipul.covidstatus; 2 | 3 | public class DistrictModel { 4 | private String district; 5 | private String confirmed; 6 | private String active; 7 | private String recovered; 8 | private String deceased; 9 | private String newConfirmed; 10 | private String newRecovered; 11 | private String newDeceased; 12 | 13 | public DistrictModel(String district, String confirmed, String active, String recovered, String deceased, String newConfirmed, String newRecovered, String newDeceased) { 14 | this.district = district; 15 | this.confirmed = confirmed; 16 | this.active = active; 17 | this.recovered = recovered; 18 | this.deceased = deceased; 19 | this.newConfirmed = newConfirmed; 20 | this.newRecovered = newRecovered; 21 | this.newDeceased = newDeceased; 22 | } 23 | 24 | public String getDistrict() { 25 | return district; 26 | } 27 | 28 | public String getConfirmed() { 29 | return confirmed; 30 | } 31 | 32 | public String getActive() { 33 | return active; 34 | } 35 | 36 | public String getRecovered() { 37 | return recovered; 38 | } 39 | 40 | public String getDeceased() { 41 | return deceased; 42 | } 43 | 44 | public String getNewConfirmed() { 45 | return newConfirmed; 46 | } 47 | 48 | public String getNewRecovered() { 49 | return newRecovered; 50 | } 51 | 52 | public String getNewDeceased() { 53 | return newDeceased; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /app/src/main/res/layout/statewise_list_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 18 | 19 | 31 | 32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/vipul/covidstatus/StatewiseModel.java: -------------------------------------------------------------------------------- 1 | package com.vipul.covidstatus; 2 | 3 | public class StatewiseModel { 4 | private String state; 5 | private String confirmed; 6 | private String active; 7 | private String deceased; 8 | private String newConfirmed; 9 | private String newRecovered; 10 | private String newDeceased; 11 | private String lastupdate; 12 | private String recovered; 13 | 14 | public StatewiseModel(String state, String confirmed, String active, String deceased, String newConfirmed, String newRecovered, String newDeceased, String lastupdate, String recovered) { 15 | this.state = state; 16 | this.confirmed = confirmed; 17 | this.active = active; 18 | this.deceased = deceased; 19 | this.newConfirmed = newConfirmed; 20 | this.newRecovered = newRecovered; 21 | this.newDeceased = newDeceased; 22 | this.lastupdate = lastupdate; 23 | this.recovered = recovered; 24 | } 25 | 26 | public String getState() { 27 | return state; 28 | } 29 | 30 | public String getConfirmed() { 31 | return confirmed; 32 | } 33 | 34 | public String getActive() { 35 | return active; 36 | } 37 | 38 | public String getDeceased() { 39 | return deceased; 40 | } 41 | 42 | public String getNewConfirmed() { 43 | return newConfirmed; 44 | } 45 | 46 | public String getNewRecovered() { 47 | return newRecovered; 48 | } 49 | 50 | public String getNewDeceased() { 51 | return newDeceased; 52 | } 53 | 54 | public String getLastupdate() { 55 | return lastupdate; 56 | } 57 | 58 | public String getRecovered() { 59 | return recovered; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /app/src/main/res/layout-sw320dp/statewise_list_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 18 | 19 | 31 | 32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /app/src/main/res/layout-sw411dp/statewise_list_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 18 | 19 | 31 | 32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /app/src/main/res/layout-sw457dp/statewise_list_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 18 | 19 | 31 | 32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /app/src/main/res/layout-sw514dp/statewise_list_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 18 | 19 | 31 | 32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /app/src/main/res/layout/districtwise_list_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 18 | 19 | 31 | 32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /app/src/main/res/layout-sw320dp/districtwise_list_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 18 | 19 | 31 | 32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /app/src/main/res/layout-sw411dp/districtwise_list_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 18 | 19 | 31 | 32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /app/src/main/res/layout-sw457dp/districtwise_list_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 18 | 19 | 31 | 32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /app/src/main/res/layout-sw514dp/districtwise_list_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 18 | 19 | 31 | 32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # COVID-19 Status Android app 3 | 4 | An android app to track COVID-19 status in India and around the world. 5 | 6 | **Features: -** 7 | * Fast, Beautiful, Lightweight & Elegant 8 | * Detailed home screen 9 | * Swipe down to refresh 10 | * State wise and Country wise data 11 | * Active search bar to search states/countries 12 | * Pie chart representation in detailed state/country view 13 | * Country flags 14 | 15 | **Some screenshots: -** 16 | 17 | 18 | 19 | **Download: -** 20 | * [GitHub Releases](https://github.com/Coders-Of-XDA-OT/covid19-status-android/releases) 21 | 22 | **APIs used: -** 23 | 24 | * [https://api.covid19india.org/](https://api.covid19india.org/) 25 | * [https://corona.lmao.ninja/](https://corona.lmao.ninja/) 26 | 27 | **How to contribute?** 28 | * Fork this repo. 29 | * Push changes to forked repo. 30 | * Make sure everything works. 31 | * Create a pull request. 32 | 33 | **Credits: -** 34 | * [Laura Reen](https://iconscout.com/contributors/laura-reen/icons) for app icon. 35 | * [Flaticon](https://www.flaticon.com/) for social media icons. 36 | * [Ashish Vaish](https://www.facebook.com/ASHVA1SH) for his help in fixing bugs. 37 | 38 | **Libraries used: -** 39 | * [Glide](https://github.com/bumptech/glide) 40 | * [Eaze Graph](https://github.com/blackfizz/EazeGraph) 41 | * [Circle ImageView](https://github.com/hdodenhof/CircleImageView) 42 | 43 | **Eat, Sleep, Code, Repeat!** 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/vipul/covidstatus/CountrywiseModel.java: -------------------------------------------------------------------------------- 1 | package com.vipul.covidstatus; 2 | 3 | public class CountrywiseModel { 4 | private String country; 5 | private String confirmed; 6 | private String active; 7 | private String deceased; 8 | private String newConfirmed; 9 | private String newDeceased; 10 | private String recovered; 11 | private String tests; 12 | private String flag; 13 | private String newRecovered; 14 | 15 | public CountrywiseModel(String country, String confirmed, String active, String deceased, String newConfirmed, String newDeceased, String recovered, String tests, String flag, String newRecovered) { 16 | this.country = country; 17 | this.confirmed = confirmed; 18 | this.active = active; 19 | this.deceased = deceased; 20 | this.newConfirmed = newConfirmed; 21 | this.newDeceased = newDeceased; 22 | this.recovered = recovered; 23 | this.tests = tests; 24 | this.flag = flag; 25 | this.newRecovered = newRecovered; 26 | } 27 | 28 | public String getCountry() { 29 | return country; 30 | } 31 | 32 | public String getConfirmed() { 33 | return confirmed; 34 | } 35 | 36 | public String getActive() { 37 | return active; 38 | } 39 | 40 | public String getDeceased() { 41 | return deceased; 42 | } 43 | 44 | public String getNewConfirmed() { 45 | return newConfirmed; 46 | } 47 | 48 | public String getNewDeceased() { 49 | return newDeceased; 50 | } 51 | 52 | public String getRecovered() { 53 | return recovered; 54 | } 55 | 56 | public String getTests() { 57 | return tests; 58 | } 59 | 60 | public String getFlag() { 61 | return flag; 62 | } 63 | 64 | public String getNewRecovered() { 65 | return newRecovered; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | apply plugin: 'com.google.gms.google-services' 3 | // Apply the Crashlytics Gradle plugin 4 | apply plugin: 'com.google.firebase.crashlytics' 5 | 6 | android { 7 | compileSdkVersion 29 8 | buildToolsVersion "29.0.3" 9 | 10 | defaultConfig { 11 | applicationId "com.vipul.covidstatus" 12 | minSdkVersion 23 13 | targetSdkVersion 29 14 | versionCode 2 15 | versionName "2.1" 16 | 17 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 18 | } 19 | 20 | buildTypes { 21 | release { 22 | minifyEnabled false 23 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 24 | } 25 | } 26 | 27 | } 28 | 29 | dependencies { 30 | implementation fileTree(dir: 'libs', include: ['*.jar']) 31 | 32 | implementation 'androidx.appcompat:appcompat:1.1.0' 33 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3' 34 | implementation 'com.google.firebase:firebase-messaging:20.2.1' 35 | testImplementation 'junit:junit:4.12' 36 | androidTestImplementation 'androidx.test.ext:junit:1.1.1' 37 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' 38 | implementation 'com.android.volley:volley:1.1.1' 39 | implementation "androidx.cardview:cardview:1.0.0" 40 | implementation 'androidx.recyclerview:recyclerview:1.1.0' 41 | implementation 'com.github.blackfizz:eazegraph:1.2.2@aar' 42 | implementation 'com.nineoldandroids:library:2.4.0' 43 | implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" 44 | implementation 'com.github.bumptech.glide:glide:4.11.0' 45 | annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0' 46 | implementation 'de.hdodenhof:circleimageview:3.1.0' 47 | implementation 'com.google.firebase:firebase-analytics:17.4.3' 48 | 49 | // Add the Firebase Crashlytics SDK. 50 | implementation 'com.google.firebase:firebase-crashlytics:17.1.0' 51 | } 52 | -------------------------------------------------------------------------------- /app/src/main/res/layout/splash_activity.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 16 | 17 | 23 | 24 | 33 | 34 | 43 | 44 | 45 | 46 | 51 | 52 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 18 | 19 | 20 | 21 | 22 | 23 | 27 | 31 | 35 | 39 | 43 | 47 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /app/src/main/res/layout/countrywise_list_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 19 | 20 | 28 | 29 | 34 | 35 | 40 | 41 | 42 | 54 | 55 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /app/src/main/res/layout-sw320dp/countrywise_list_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 19 | 20 | 28 | 29 | 34 | 35 | 40 | 41 | 42 | 54 | 55 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /app/src/main/res/layout-sw411dp/countrywise_list_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 19 | 20 | 28 | 29 | 34 | 35 | 40 | 41 | 42 | 54 | 55 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /app/src/main/res/layout-sw457dp/countrywise_list_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 19 | 20 | 28 | 29 | 34 | 35 | 40 | 41 | 42 | 54 | 55 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /app/src/main/res/layout-sw514dp/countrywise_list_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 19 | 20 | 28 | 29 | 34 | 35 | 40 | 41 | 42 | 54 | 55 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_districtwise_data.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 31 | 32 | 33 | 42 | 43 | 50 | 51 | 61 | 62 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /app/src/main/res/layout-sw320dp/activity_districtwise_data.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 31 | 32 | 33 | 42 | 43 | 50 | 51 | 61 | 62 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /app/src/main/res/layout-sw411dp/activity_districtwise_data.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 31 | 32 | 33 | 42 | 43 | 50 | 51 | 61 | 62 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /app/src/main/res/layout-sw457dp/activity_districtwise_data.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 31 | 32 | 33 | 42 | 43 | 50 | 51 | 61 | 62 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /app/src/main/res/layout-sw514dp/activity_districtwise_data.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 31 | 32 | 33 | 42 | 43 | 50 | 51 | 61 | 62 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_statewise_data.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 31 | 32 | 33 | 42 | 43 | 50 | 51 | 61 | 62 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /app/src/main/res/layout-sw320dp/activity_statewise_data.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 31 | 32 | 33 | 42 | 43 | 50 | 51 | 61 | 62 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /app/src/main/res/layout-sw411dp/activity_statewise_data.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 31 | 32 | 33 | 42 | 43 | 50 | 51 | 61 | 62 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /app/src/main/res/layout-sw457dp/activity_statewise_data.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 31 | 32 | 33 | 42 | 43 | 50 | 51 | 61 | 62 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /app/src/main/res/layout-sw514dp/activity_statewise_data.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 31 | 32 | 33 | 42 | 43 | 50 | 51 | 61 | 62 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_countrywise_data.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 31 | 32 | 33 | 42 | 43 | 50 | 51 | 62 | 63 | 73 | 74 | 75 | 76 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /app/src/main/res/layout-sw320dp/activity_countrywise_data.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 31 | 32 | 33 | 42 | 43 | 50 | 51 | 62 | 63 | 73 | 74 | 75 | 76 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /app/src/main/res/layout-sw411dp/activity_countrywise_data.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 31 | 32 | 33 | 42 | 43 | 50 | 51 | 62 | 63 | 73 | 74 | 75 | 76 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /app/src/main/res/layout-sw457dp/activity_countrywise_data.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 31 | 32 | 33 | 42 | 43 | 50 | 51 | 62 | 63 | 73 | 74 | 75 | 76 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /app/src/main/res/layout-sw514dp/activity_countrywise_data.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 31 | 32 | 33 | 42 | 43 | 50 | 51 | 62 | 63 | 73 | 74 | 75 | 76 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | xmlns:android 14 | 15 | ^$ 16 | 17 | 18 | 19 |
20 |
21 | 22 | 23 | 24 | xmlns:.* 25 | 26 | ^$ 27 | 28 | 29 | BY_NAME 30 | 31 |
32 |
33 | 34 | 35 | 36 | .*:id 37 | 38 | http://schemas.android.com/apk/res/android 39 | 40 | 41 | 42 |
43 |
44 | 45 | 46 | 47 | .*:name 48 | 49 | http://schemas.android.com/apk/res/android 50 | 51 | 52 | 53 |
54 |
55 | 56 | 57 | 58 | name 59 | 60 | ^$ 61 | 62 | 63 | 64 |
65 |
66 | 67 | 68 | 69 | style 70 | 71 | ^$ 72 | 73 | 74 | 75 |
76 |
77 | 78 | 79 | 80 | .* 81 | 82 | ^$ 83 | 84 | 85 | BY_NAME 86 | 87 |
88 |
89 | 90 | 91 | 92 | .* 93 | 94 | http://schemas.android.com/apk/res/android 95 | 96 | 97 | ANDROID_ATTRIBUTE_ORDER 98 | 99 |
100 |
101 | 102 | 103 | 104 | .* 105 | 106 | .* 107 | 108 | 109 | BY_NAME 110 | 111 |
112 |
113 |
114 |
115 |
116 |
-------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | ### Android ### 3 | # Built application files 4 | *.apk 5 | *.ap_ 6 | *.aab 7 | 8 | # Files for the ART/Dalvik VM 9 | *.dex 10 | 11 | # Java class files 12 | *.class 13 | 14 | # Generated files 15 | bin/ 16 | gen/ 17 | out/ 18 | release/ 19 | 20 | # Gradle files 21 | .gradle/ 22 | build/ 23 | 24 | # Local configuration file (sdk path, etc) 25 | local.properties 26 | 27 | # Proguard folder generated by Eclipse 28 | proguard/ 29 | 30 | # Log Files 31 | *.log 32 | 33 | # Android Studio Navigation editor temp files 34 | .navigation/ 35 | 36 | # Android Studio captures folder 37 | captures/ 38 | 39 | # IntelliJ 40 | *.iml 41 | .idea/workspace.xml 42 | .idea/tasks.xml 43 | .idea/gradle.xml 44 | .idea/assetWizardSettings.xml 45 | .idea/dictionaries 46 | .idea/libraries 47 | # Android Studio 3 in .gitignore file. 48 | .idea/caches 49 | .idea/modules.xml 50 | # Comment next line if keeping position of elements in Navigation Editor is relevant for you 51 | .idea/navEditor.xml 52 | 53 | # Keystore files 54 | # Uncomment the following lines if you do not want to check your keystore files in. 55 | #*.jks 56 | #*.keystore 57 | 58 | # External native build folder generated in Android Studio 2.2 and later 59 | .externalNativeBuild 60 | 61 | # Google Services (e.g. APIs or Firebase) 62 | google-services.json 63 | 64 | # Freeline 65 | freeline.py 66 | freeline/ 67 | freeline_project_description.json 68 | 69 | # fastlane 70 | fastlane/report.xml 71 | fastlane/Preview.html 72 | fastlane/screenshots 73 | fastlane/test_output 74 | fastlane/readme.md 75 | 76 | # Version control 77 | vcs.xml 78 | 79 | # lint 80 | lint/intermediates/ 81 | lint/generated/ 82 | lint/outputs/ 83 | lint/tmp/ 84 | # lint/reports/ 85 | 86 | ### Android Patch ### 87 | gen-external-apklibs 88 | output.json 89 | 90 | # Replacement of .externalNativeBuild directories introduced 91 | # with Android Studio 3.5. 92 | .cxx/ 93 | 94 | ### AndroidStudio ### 95 | # Covers files to be ignored for android development using Android Studio. 96 | 97 | # Built application files 98 | 99 | # Files for the ART/Dalvik VM 100 | 101 | # Java class files 102 | 103 | # Generated files 104 | 105 | # Gradle files 106 | .gradle 107 | 108 | # Signing files 109 | .signing/ 110 | 111 | # Local configuration file (sdk path, etc) 112 | 113 | # Proguard folder generated by Eclipse 114 | 115 | # Log Files 116 | 117 | # Android Studio 118 | /*/build/ 119 | /*/local.properties 120 | /*/out 121 | /*/*/build 122 | /*/*/production 123 | *.ipr 124 | *~ 125 | *.swp 126 | 127 | # Android Patch 128 | 129 | # External native build folder generated in Android Studio 2.2 and later 130 | 131 | # NDK 132 | obj/ 133 | 134 | # IntelliJ IDEA 135 | *.iws 136 | /out/ 137 | 138 | # User-specific configurations 139 | .idea/caches/ 140 | .idea/libraries/ 141 | .idea/shelf/ 142 | .idea/.name 143 | .idea/compiler.xml 144 | .idea/copyright/profiles_settings.xml 145 | .idea/encodings.xml 146 | .idea/misc.xml 147 | .idea/scopes/scope_settings.xml 148 | .idea/vcs.xml 149 | .idea/jsLibraryMappings.xml 150 | .idea/datasources.xml 151 | .idea/dataSources.ids 152 | .idea/sqlDataSources.xml 153 | .idea/dynamic.xml 154 | .idea/uiDesigner.xml 155 | 156 | # OS-specific files 157 | .DS_Store 158 | .DS_Store? 159 | ._* 160 | .Spotlight-V100 161 | .Trashes 162 | ehthumbs.db 163 | Thumbs.db 164 | 165 | # Legacy Eclipse project files 166 | .classpath 167 | .project 168 | .cproject 169 | .settings/ 170 | 171 | # Mobile Tools for Java (J2ME) 172 | .mtj.tmp/ 173 | 174 | # Package Files # 175 | *.war 176 | *.ear 177 | 178 | # virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml) 179 | hs_err_pid* 180 | 181 | ## Plugin-specific files: 182 | 183 | # mpeltonen/sbt-idea plugin 184 | .idea_modules/ 185 | 186 | # JIRA plugin 187 | atlassian-ide-plugin.xml 188 | 189 | # Mongo Explorer plugin 190 | .idea/mongoSettings.xml 191 | 192 | # Crashlytics plugin (for Android Studio and IntelliJ) 193 | com_crashlytics_export_strings.xml 194 | crashlytics.properties 195 | crashlytics-build.properties 196 | fabric.properties 197 | 198 | ### AndroidStudio Patch ### 199 | 200 | !/gradle/wrapper/gradle-wrapper.jar 201 | 202 | # End of https://www.gitignore.io/api/android,androidstudio 203 | -------------------------------------------------------------------------------- /app/src/main/java/com/vipul/covidstatus/StatewiseAdapter.java: -------------------------------------------------------------------------------- 1 | package com.vipul.covidstatus; 2 | 3 | import android.content.Context; 4 | import android.content.Intent; 5 | import android.view.LayoutInflater; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | import android.widget.TextView; 9 | 10 | import androidx.annotation.NonNull; 11 | import androidx.recyclerview.widget.RecyclerView; 12 | 13 | import java.util.ArrayList; 14 | 15 | public class StatewiseAdapter extends RecyclerView.Adapter { 16 | 17 | private Context mContext; 18 | private ArrayList arrayList; 19 | private OnItemClickListner mListner; 20 | private static final String STATE_NAME = "stateName"; 21 | private static final String STATE_CONFIRMED = "stateConfirmed"; 22 | private static final String STATE_ACTIVE = "stateActive"; 23 | private static final String STATE_DECEASED = "stateDeaceased"; 24 | private static final String STATE_NEW_CONFIRMED = "stateNewConfirmed"; 25 | private static final String STATE_NEW_RECOVERED = "stateNewRecovered"; 26 | private static final String STATE_NEW_DECEASED = "stateNewDeceased"; 27 | private static final String STATE_LAST_UPDATE = "stateLastUpdate"; 28 | private static final String STATE_RECOVERED = "stateRecovered"; 29 | 30 | public interface OnItemClickListner { 31 | void onItemClick(int position); 32 | } 33 | 34 | public void setOnItemClickListner(OnItemClickListner listner) { 35 | mListner = listner; 36 | } 37 | 38 | public StatewiseAdapter(Context context, ArrayList statewiseModelArrayList) { 39 | mContext = context; 40 | arrayList = statewiseModelArrayList; 41 | } 42 | 43 | @NonNull 44 | @Override 45 | public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { 46 | View view = LayoutInflater.from(mContext).inflate(R.layout.statewise_list_layout, parent, false); 47 | return new ViewHolder(view); 48 | } 49 | 50 | @Override 51 | public void onBindViewHolder(@NonNull ViewHolder holder, final int position) { 52 | holder.itemView.setOnClickListener(new View.OnClickListener() { 53 | @Override 54 | public void onClick(View v) { 55 | StatewiseModel clickedItem = arrayList.get(position); 56 | Intent perStateIntent = new Intent(mContext, PerStateData.class); 57 | 58 | perStateIntent.putExtra(STATE_NAME, clickedItem.getState()); 59 | perStateIntent.putExtra(STATE_CONFIRMED, clickedItem.getConfirmed()); 60 | perStateIntent.putExtra(STATE_ACTIVE, clickedItem.getActive()); 61 | perStateIntent.putExtra(STATE_DECEASED, clickedItem.getDeceased()); 62 | perStateIntent.putExtra(STATE_NEW_CONFIRMED, clickedItem.getNewConfirmed()); 63 | perStateIntent.putExtra(STATE_NEW_RECOVERED, clickedItem.getNewRecovered()); 64 | perStateIntent.putExtra(STATE_NEW_DECEASED, clickedItem.getNewDeceased()); 65 | perStateIntent.putExtra(STATE_LAST_UPDATE, clickedItem.getLastupdate()); 66 | perStateIntent.putExtra(STATE_RECOVERED, clickedItem.getRecovered()); 67 | 68 | 69 | mContext.startActivity(perStateIntent); 70 | } 71 | }); 72 | 73 | 74 | StatewiseModel currentItem = arrayList.get(position); 75 | String stateName = currentItem.getState(); 76 | String stateTotal = currentItem.getConfirmed(); 77 | holder.stateTotalCases.setText(stateTotal); 78 | holder.stateName.setText(stateName); 79 | } 80 | 81 | @Override 82 | public int getItemCount() { 83 | return arrayList.size(); 84 | } 85 | 86 | public void filterList(ArrayList filteredList) { 87 | arrayList = filteredList; 88 | notifyDataSetChanged(); 89 | } 90 | 91 | public class ViewHolder extends RecyclerView.ViewHolder { 92 | 93 | TextView stateName, stateTotalCases; 94 | 95 | public ViewHolder(View itemView) { 96 | super(itemView); 97 | 98 | stateName = itemView.findViewById(R.id.state_name_textview); 99 | stateTotalCases = itemView.findViewById(R.id.state_confirmed_textview); 100 | 101 | itemView.setOnClickListener(new View.OnClickListener() { 102 | @Override 103 | public void onClick(View v) { 104 | if (mListner != null) { 105 | int position = getAdapterPosition(); 106 | if (position != RecyclerView.NO_POSITION) { 107 | mListner.onItemClick(position); 108 | } 109 | } 110 | } 111 | }); 112 | } 113 | } 114 | 115 | } 116 | -------------------------------------------------------------------------------- /app/src/main/java/com/vipul/covidstatus/DistrictAdapter.java: -------------------------------------------------------------------------------- 1 | package com.vipul.covidstatus; 2 | 3 | import android.content.Context; 4 | import android.content.Intent; 5 | import android.view.LayoutInflater; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | import android.widget.TextView; 9 | 10 | import androidx.annotation.NonNull; 11 | import androidx.recyclerview.widget.RecyclerView; 12 | 13 | import java.text.NumberFormat; 14 | import java.util.ArrayList; 15 | 16 | public class DistrictAdapter extends RecyclerView.Adapter{ 17 | 18 | private Context mContext; 19 | private ArrayList arrayList; 20 | private DistrictAdapter.OnItemClickListner mListner; 21 | private static final String DISTRICT_NAME = "districtName"; 22 | private static final String DISTRICT_CONFIRMED = "districtConfirmed"; 23 | private static final String DISTRICT_ACTIVE = "districtActive"; 24 | private static final String DISTRICT_DECEASED = "districtDeaceased"; 25 | private static final String DISTRICT_NEW_CONFIRMED = "districtNewConfirmed"; 26 | private static final String DISTRICT_NEW_RECOVERED = "districtNewRecovered"; 27 | private static final String DISTRICT_NEW_DECEASED = "districtNewDeceased"; 28 | private static final String DISTRICT_RECOVERED = "districtRecovered"; 29 | 30 | public interface OnItemClickListner { 31 | void onItemClick(int position); 32 | } 33 | 34 | public void setOnItemClickListner(DistrictAdapter.OnItemClickListner listner) { 35 | mListner = listner; 36 | } 37 | 38 | public DistrictAdapter(Context context, ArrayList districtModelArrayList) { 39 | mContext = context; 40 | arrayList = districtModelArrayList; 41 | } 42 | 43 | 44 | 45 | @NonNull 46 | @Override 47 | public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { 48 | View view = LayoutInflater.from(mContext).inflate(R.layout.districtwise_list_layout, parent, false); 49 | return new ViewHolder(view); 50 | } 51 | 52 | @Override 53 | public void onBindViewHolder(@NonNull ViewHolder holder, final int position) { 54 | holder.itemView.setOnClickListener(new View.OnClickListener() { 55 | @Override 56 | public void onClick(View v) { 57 | DistrictModel clickedItem = arrayList.get(position); 58 | Intent perDistrictIntent = new Intent(mContext, PerDistrictData.class); 59 | 60 | perDistrictIntent.putExtra(DISTRICT_NAME, clickedItem.getDistrict()); 61 | perDistrictIntent.putExtra(DISTRICT_CONFIRMED, clickedItem.getConfirmed()); 62 | perDistrictIntent.putExtra(DISTRICT_ACTIVE, clickedItem.getActive()); 63 | perDistrictIntent.putExtra(DISTRICT_DECEASED, clickedItem.getDeceased()); 64 | perDistrictIntent.putExtra(DISTRICT_NEW_CONFIRMED, clickedItem.getNewConfirmed()); 65 | perDistrictIntent.putExtra(DISTRICT_NEW_RECOVERED, clickedItem.getNewRecovered()); 66 | perDistrictIntent.putExtra(DISTRICT_NEW_DECEASED, clickedItem.getNewDeceased());; 67 | perDistrictIntent.putExtra(DISTRICT_RECOVERED, clickedItem.getRecovered()); 68 | 69 | 70 | mContext.startActivity(perDistrictIntent); 71 | } 72 | }); 73 | 74 | 75 | DistrictModel currentItem = arrayList.get(position); 76 | String districtName = currentItem.getDistrict(); 77 | String districtTotal = currentItem.getConfirmed(); 78 | int districtTotalInt = Integer.parseInt(districtTotal); 79 | holder.districtTotalCases.setText(NumberFormat.getInstance().format(districtTotalInt)); 80 | holder.districtName.setText(districtName); 81 | } 82 | 83 | @Override 84 | public int getItemCount() { 85 | return arrayList.size(); 86 | } 87 | 88 | public void filterList(ArrayList filteredList) { 89 | arrayList = filteredList; 90 | notifyDataSetChanged(); 91 | } 92 | 93 | public class ViewHolder extends RecyclerView.ViewHolder{ 94 | TextView districtName, districtTotalCases; 95 | 96 | public ViewHolder(View itemView) { 97 | super(itemView); 98 | districtName = itemView.findViewById(R.id.district_name_textview); 99 | districtTotalCases = itemView.findViewById(R.id.district_confirmed_textview); 100 | 101 | itemView.setOnClickListener(new View.OnClickListener() { 102 | @Override 103 | public void onClick(View v) { 104 | if (mListner != null) { 105 | int position = getAdapterPosition(); 106 | if (position != RecyclerView.NO_POSITION) { 107 | mListner.onItemClick(position); 108 | } 109 | } 110 | } 111 | }); 112 | 113 | } 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /app/src/main/java/com/vipul/covidstatus/PerDistrictData.java: -------------------------------------------------------------------------------- 1 | package com.vipul.covidstatus; 2 | 3 | import androidx.annotation.NonNull; 4 | import androidx.appcompat.app.AppCompatActivity; 5 | import androidx.core.content.ContextCompat; 6 | 7 | import android.content.Intent; 8 | import android.graphics.Color; 9 | import android.os.Bundle; 10 | import android.view.MenuItem; 11 | import android.widget.TextView; 12 | 13 | import org.eazegraph.lib.charts.PieChart; 14 | import org.eazegraph.lib.models.PieModel; 15 | 16 | import java.text.NumberFormat; 17 | import java.util.Objects; 18 | 19 | import static com.vipul.covidstatus.DistrictwiseDataActivity.DISTRICT_ACTIVE; 20 | import static com.vipul.covidstatus.DistrictwiseDataActivity.DISTRICT_CONFIRMED; 21 | import static com.vipul.covidstatus.DistrictwiseDataActivity.DISTRICT_DECEASED; 22 | import static com.vipul.covidstatus.DistrictwiseDataActivity.DISTRICT_LAST_UPDATE; 23 | import static com.vipul.covidstatus.DistrictwiseDataActivity.DISTRICT_NAME; 24 | import static com.vipul.covidstatus.DistrictwiseDataActivity.DISTRICT_NEW_CONFIRMED; 25 | import static com.vipul.covidstatus.DistrictwiseDataActivity.DISTRICT_NEW_DECEASED; 26 | import static com.vipul.covidstatus.DistrictwiseDataActivity.DISTRICT_NEW_RECOVERED; 27 | import static com.vipul.covidstatus.DistrictwiseDataActivity.DISTRICT_RECOVERED; 28 | 29 | public class PerDistrictData extends AppCompatActivity { 30 | 31 | TextView perDistrictConfirmed, perDistrictActive, perDistrictDeceased, perDistrictNewConfirmed, perDistrictNewRecovered, perDistrictNewDeceased, perDistrictUpdate, perDistrictRecovered, perDistrictName; 32 | PieChart mPieChart; 33 | String districtName; 34 | 35 | @Override 36 | protected void onCreate(Bundle savedInstanceState) { 37 | super.onCreate(savedInstanceState); 38 | setContentView(R.layout.activity_per_district_data); 39 | 40 | Intent intent = getIntent(); 41 | districtName = intent.getStringExtra(DISTRICT_NAME); 42 | String districtConfirmed = intent.getStringExtra(DISTRICT_CONFIRMED); 43 | String districtActive = intent.getStringExtra(DISTRICT_ACTIVE); 44 | String districtDeceased = intent.getStringExtra(DISTRICT_DECEASED); 45 | String districtNewConfirmed = intent.getStringExtra(DISTRICT_NEW_CONFIRMED); 46 | String districtNewRecovered = intent.getStringExtra(DISTRICT_NEW_RECOVERED); 47 | String districtNewDeceased = intent.getStringExtra(DISTRICT_NEW_DECEASED); 48 | String districtRecovery = intent.getStringExtra(DISTRICT_RECOVERED); 49 | 50 | Objects.requireNonNull(getSupportActionBar()).setTitle(districtName); 51 | perDistrictConfirmed = findViewById(R.id.district_confirmed_textview); 52 | perDistrictActive = findViewById(R.id.district_active_textView); 53 | perDistrictRecovered = findViewById(R.id.district_recovered_textView); 54 | perDistrictDeceased = findViewById(R.id.district_death_textView); 55 | perDistrictNewConfirmed = findViewById(R.id.district_confirmed_new_textView); 56 | perDistrictNewRecovered = findViewById(R.id.district_recovered_new_textView); 57 | perDistrictNewDeceased = findViewById(R.id.district_death_new_textView); 58 | mPieChart = findViewById(R.id.piechart_district); 59 | getSupportActionBar().setDisplayHomeAsUpEnabled(true); 60 | getSupportActionBar().setDisplayShowHomeEnabled(true); 61 | 62 | getWindow().setNavigationBarColor(ContextCompat.getColor(this, R.color.colorPrimaryDark)); 63 | String activeCopy = districtActive; 64 | String recoveredCopy = districtRecovery; 65 | String deceasedCopy = districtDeceased; 66 | 67 | int districtActiveInt = Integer.parseInt(districtActive); 68 | districtActive = NumberFormat.getInstance().format(districtActiveInt); 69 | 70 | int districtDeceasedInt = Integer.parseInt(districtDeceased); 71 | districtDeceased = NumberFormat.getInstance().format(districtDeceasedInt); 72 | 73 | int districtRecoveredInt = Integer.parseInt(districtRecovery); 74 | districtRecovery = NumberFormat.getInstance().format(districtRecoveredInt); 75 | 76 | int confirmedInt = Integer.parseInt(districtConfirmed); 77 | districtConfirmed = NumberFormat.getInstance().format(confirmedInt); 78 | 79 | //assert districtActive != null; 80 | mPieChart.addPieSlice(new PieModel("Active", Integer.parseInt(activeCopy), Color.parseColor("#007afe"))); 81 | mPieChart.addPieSlice(new PieModel("Recovered", Integer.parseInt(recoveredCopy), Color.parseColor("#08a045"))); 82 | mPieChart.addPieSlice(new PieModel("Deceased", Integer.parseInt(deceasedCopy), Color.parseColor("#F6404F"))); 83 | 84 | mPieChart.startAnimation(); 85 | 86 | MainActivity object = new MainActivity(); 87 | perDistrictConfirmed.setText(districtConfirmed); 88 | perDistrictActive.setText(districtActive); 89 | perDistrictDeceased.setText(districtDeceased); 90 | perDistrictNewConfirmed.setText("+" + districtNewConfirmed); 91 | perDistrictNewRecovered.setText("+" + districtNewRecovered); 92 | perDistrictNewDeceased.setText("+" + districtNewDeceased); 93 | perDistrictRecovered.setText(districtRecovery); 94 | } 95 | 96 | @Override 97 | public boolean onOptionsItemSelected(@NonNull MenuItem item) { 98 | if (item.getItemId() == android.R.id.home) 99 | finish(); 100 | return super.onOptionsItemSelected(item); 101 | } 102 | } -------------------------------------------------------------------------------- /app/src/main/java/com/vipul/covidstatus/PerCountryData.java: -------------------------------------------------------------------------------- 1 | package com.vipul.covidstatus; 2 | 3 | import androidx.annotation.NonNull; 4 | import androidx.appcompat.app.AppCompatActivity; 5 | import androidx.core.content.ContextCompat; 6 | 7 | import android.content.Intent; 8 | import android.graphics.Color; 9 | import android.os.Bundle; 10 | import android.view.MenuItem; 11 | import android.widget.TextView; 12 | 13 | import org.eazegraph.lib.charts.PieChart; 14 | import org.eazegraph.lib.models.PieModel; 15 | 16 | import java.text.NumberFormat; 17 | import java.util.Objects; 18 | 19 | import static com.vipul.covidstatus.CountrywiseDataActivity.COUNTRY_CONFIRMED; 20 | import static com.vipul.covidstatus.CountrywiseDataActivity.COUNTRY_NAME; 21 | import static com.vipul.covidstatus.CountrywiseDataActivity.COUNTRY_ACTIVE; 22 | import static com.vipul.covidstatus.CountrywiseDataActivity.COUNTRY_DECEASED; 23 | import static com.vipul.covidstatus.CountrywiseDataActivity.COUNTRY_NEW_CONFIRMED; 24 | import static com.vipul.covidstatus.CountrywiseDataActivity.COUNTRY_NEW_RECOVERED; 25 | import static com.vipul.covidstatus.CountrywiseDataActivity.COUNTRY_TESTS; 26 | import static com.vipul.covidstatus.CountrywiseDataActivity.COUNTRY_NEW_DECEASED; 27 | import static com.vipul.covidstatus.CountrywiseDataActivity.COUNTRY_RECOVERED; 28 | 29 | 30 | public class PerCountryData extends AppCompatActivity { 31 | TextView perCountryConfirmed, perCountryActive, perCountryDeceased, perCountryNewConfirmed, perCountryTests, perCountryNewDeceased, perCountryRecovered, perCountryNewRecovered; 32 | PieChart mPieChart; 33 | 34 | @Override 35 | protected void onCreate(Bundle savedInstanceState) { 36 | super.onCreate(savedInstanceState); 37 | setContentView(R.layout.activity_per_country_data); 38 | 39 | getWindow().setNavigationBarColor(ContextCompat.getColor(this, R.color.colorPrimaryDark)); 40 | 41 | Intent intent = getIntent(); 42 | String countryName = intent.getStringExtra(COUNTRY_NAME); 43 | String countryConfirmed = intent.getStringExtra(COUNTRY_CONFIRMED); 44 | String countryActive = intent.getStringExtra(COUNTRY_ACTIVE); 45 | String countryDeceased = intent.getStringExtra(COUNTRY_DECEASED); 46 | String countryRecovery = intent.getStringExtra(COUNTRY_RECOVERED); 47 | String countryNewConfirmed = intent.getStringExtra(COUNTRY_NEW_CONFIRMED); 48 | String countryNewDeceased = intent.getStringExtra(COUNTRY_NEW_DECEASED); 49 | String countryTests = intent.getStringExtra(COUNTRY_TESTS); 50 | String countryNewRecovered = intent.getStringExtra(COUNTRY_NEW_RECOVERED); 51 | Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true); 52 | getSupportActionBar().setDisplayShowHomeEnabled(true); 53 | 54 | 55 | Objects.requireNonNull(getSupportActionBar()).setTitle(countryName); 56 | perCountryConfirmed = findViewById(R.id.percountry_confirmed_textview); 57 | perCountryActive = findViewById(R.id.percountry_active_textView); 58 | perCountryRecovered = findViewById(R.id.percountry_recovered_textView); 59 | perCountryDeceased = findViewById(R.id.percountry_death_textView); 60 | perCountryNewConfirmed = findViewById(R.id.percountry_confirmed_new_textView); 61 | perCountryTests = findViewById(R.id.percountry_tests_textView); 62 | perCountryNewDeceased = findViewById(R.id.percountry_death_new_textView); 63 | mPieChart = findViewById(R.id.piechart_percountry); 64 | perCountryNewRecovered = findViewById(R.id.percountry_recovered_new_textView); 65 | 66 | String activeCopy = countryActive; 67 | String recoveredCopy = countryRecovery; 68 | String deceasedCopy = countryDeceased; 69 | 70 | int activeInt = Integer.parseInt(countryActive); 71 | countryActive = NumberFormat.getInstance().format(activeInt); 72 | 73 | int recoveredInt = Integer.parseInt(countryRecovery); 74 | countryRecovery = NumberFormat.getInstance().format(recoveredInt); 75 | 76 | int deceasedInt = Integer.parseInt(countryDeceased); 77 | countryDeceased = NumberFormat.getInstance().format(deceasedInt); 78 | 79 | int confirmedInt = Integer.parseInt(countryConfirmed); 80 | countryConfirmed = NumberFormat.getInstance().format(confirmedInt); 81 | 82 | int testsInt = Integer.parseInt(countryTests); 83 | countryTests = NumberFormat.getInstance().format(testsInt); 84 | 85 | mPieChart.addPieSlice(new PieModel("Active", Integer.parseInt(activeCopy), Color.parseColor("#007afe"))); 86 | mPieChart.addPieSlice(new PieModel("Recovered", Integer.parseInt(recoveredCopy), Color.parseColor("#08a045"))); 87 | mPieChart.addPieSlice(new PieModel("Deceased", Integer.parseInt(deceasedCopy), Color.parseColor("#F6404F"))); 88 | 89 | mPieChart.startAnimation(); 90 | 91 | perCountryConfirmed.setText(countryConfirmed); 92 | perCountryActive.setText(countryActive); 93 | perCountryDeceased.setText(countryDeceased); 94 | perCountryTests.setText(countryTests); 95 | perCountryNewConfirmed.setText("+" + countryNewConfirmed); 96 | perCountryNewDeceased.setText("+" + countryNewDeceased); 97 | perCountryRecovered.setText(countryRecovery); 98 | perCountryNewRecovered.setText("+"+countryNewRecovered); 99 | 100 | } 101 | 102 | @Override 103 | public boolean onOptionsItemSelected(@NonNull MenuItem item) { 104 | if (item.getItemId() == android.R.id.home) 105 | finish(); 106 | return super.onOptionsItemSelected(item); 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /app/src/main/java/com/vipul/covidstatus/InfoActivity.java: -------------------------------------------------------------------------------- 1 | package com.vipul.covidstatus; 2 | 3 | import androidx.annotation.NonNull; 4 | import androidx.appcompat.app.AlertDialog; 5 | import androidx.appcompat.app.AppCompatActivity; 6 | import androidx.core.content.ContextCompat; 7 | 8 | import android.content.DialogInterface; 9 | import android.content.Intent; 10 | import android.net.Uri; 11 | import android.os.Bundle; 12 | import android.view.MenuItem; 13 | import android.view.View; 14 | import android.widget.Toast; 15 | 16 | import com.android.volley.Request; 17 | import com.android.volley.RequestQueue; 18 | import com.android.volley.Response; 19 | import com.android.volley.VolleyError; 20 | import com.android.volley.toolbox.JsonObjectRequest; 21 | import com.android.volley.toolbox.Volley; 22 | 23 | import org.json.JSONException; 24 | import org.json.JSONObject; 25 | 26 | import java.util.Objects; 27 | 28 | public class InfoActivity extends AppCompatActivity { 29 | 30 | String version; 31 | String updateUrl; 32 | String updateChanges; 33 | 34 | @Override 35 | protected void onCreate(Bundle savedInstanceState) { 36 | super.onCreate(savedInstanceState); 37 | setContentView(R.layout.activity_info); 38 | Objects.requireNonNull(getSupportActionBar()).setTitle("About"); 39 | getSupportActionBar().setDisplayHomeAsUpEnabled(true); 40 | getSupportActionBar().setDisplayShowHomeEnabled(true); 41 | getWindow().setNavigationBarColor(ContextCompat.getColor(this, R.color.colorPrimaryDark)); 42 | 43 | } 44 | 45 | @Override 46 | public boolean onOptionsItemSelected(@NonNull MenuItem item) { 47 | if (item.getItemId() == android.R.id.home) 48 | finish(); 49 | return super.onOptionsItemSelected(item); 50 | } 51 | 52 | public void openWeb(View view) { 53 | startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.vipuljha.com"))); 54 | } 55 | 56 | public void openGit(View view) { 57 | startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.github.com/lordarcadius"))); 58 | } 59 | 60 | public void openInsta(View view) { 61 | startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.instagram.com/lordarcadius"))); 62 | } 63 | 64 | public void openTwitter(View view) { 65 | startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.twitter.com/lordarcadius"))); 66 | } 67 | 68 | public void checkUpdate(View view){ 69 | 70 | RequestQueue requestQueue = Volley.newRequestQueue(this); 71 | String apiUrl = "https://vipul-api.netlify.app/api/version.json"; 72 | 73 | JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, apiUrl, null, new Response.Listener() { 74 | @Override 75 | public void onResponse(JSONObject response) { 76 | try { 77 | version = response.getString("version"); 78 | updateUrl = response.getString("url"); 79 | updateChanges = response.getString("changes"); 80 | 81 | if (!version.equals(String.valueOf(BuildConfig.VERSION_NAME))){ 82 | new AlertDialog.Builder(InfoActivity.this) 83 | .setTitle("v"+version+" update available!") 84 | .setMessage(updateChanges) 85 | .setPositiveButton("Update", new DialogInterface.OnClickListener() { 86 | @Override 87 | public void onClick(DialogInterface dialog, int which) { 88 | Intent intent = new Intent(Intent.ACTION_VIEW); 89 | intent.setData(Uri.parse(updateUrl)); 90 | startActivity(intent); 91 | } 92 | }) 93 | .setNegativeButton("Not now", new DialogInterface.OnClickListener() { 94 | @Override 95 | public void onClick(DialogInterface dialog, int which) { 96 | dialog.dismiss(); 97 | } 98 | }) 99 | .setCancelable(false) 100 | .create().show(); 101 | } else { 102 | Toast.makeText(InfoActivity.this, "No update available!", Toast.LENGTH_SHORT).show(); 103 | } 104 | } catch (JSONException e) { 105 | e.printStackTrace(); 106 | } 107 | } 108 | }, new Response.ErrorListener() { 109 | @Override 110 | public void onErrorResponse(VolleyError error) { 111 | error.printStackTrace(); 112 | } 113 | }); 114 | requestQueue.add(jsonObjectRequest); 115 | 116 | } 117 | 118 | public void showChanges(View view){ 119 | new AlertDialog.Builder(this) 120 | .setTitle(R.string.changelogTitle) 121 | .setMessage(R.string.changelog) 122 | .setPositiveButton("OK", new DialogInterface.OnClickListener() { 123 | @Override 124 | public void onClick(DialogInterface dialog, int which) { 125 | dialog.dismiss(); 126 | } 127 | }) 128 | .setCancelable(false) 129 | .create().show(); 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /app/src/main/java/com/vipul/covidstatus/CountrywiseAdapter.java: -------------------------------------------------------------------------------- 1 | package com.vipul.covidstatus; 2 | 3 | import android.content.Context; 4 | import android.content.Intent; 5 | import android.view.LayoutInflater; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | import android.widget.ImageView; 9 | import android.widget.TextView; 10 | 11 | import androidx.annotation.NonNull; 12 | import androidx.recyclerview.widget.RecyclerView; 13 | 14 | import com.bumptech.glide.Glide; 15 | 16 | import java.text.NumberFormat; 17 | import java.util.ArrayList; 18 | 19 | public class CountrywiseAdapter extends RecyclerView.Adapter { 20 | 21 | private Context mContext; 22 | private ArrayList arrayList; 23 | private CountrywiseAdapter.OnItemClickListner mListner; 24 | private static final String COUNTRY_NAME = "country"; 25 | private static final String COUNTRY_CONFIRMED = "cases"; 26 | private static final String COUNTRY_ACTIVE = "active"; 27 | private static final String COUNTRY_DECEASED = "deaths"; 28 | private static final String COUNTRY_NEW_CONFIRMED = "todayCases"; 29 | private static final String COUNTRY_TESTS = "tests"; 30 | private static final String COUNTRY_NEW_DECEASED = "todayDeaths"; 31 | private static final String COUNTRY_FLAGURL = "flag"; 32 | private static final String COUNTRY_RECOVERED = "recovered"; 33 | public static final String COUNTRY_NEW_RECOVERED = "todayRecovered"; 34 | 35 | public interface OnItemClickListner { 36 | void onItemClick(int position); 37 | } 38 | 39 | public void setOnItemClickListner(OnItemClickListner listner) { 40 | mListner = listner; 41 | } 42 | 43 | 44 | public CountrywiseAdapter(Context context, ArrayList countrywiseModelArrayList) { 45 | mContext = context; 46 | arrayList = countrywiseModelArrayList; 47 | } 48 | 49 | @NonNull 50 | @Override 51 | public CountrywiseAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { 52 | View view = LayoutInflater.from(mContext).inflate(R.layout.countrywise_list_layout, parent, false); 53 | return new ViewHolder(view); 54 | } 55 | 56 | 57 | @Override 58 | public void onBindViewHolder(@NonNull CountrywiseAdapter.ViewHolder holder, final int position) { 59 | holder.itemView.setOnClickListener(new View.OnClickListener() { 60 | @Override 61 | public void onClick(View v) { 62 | CountrywiseModel clickedItem = arrayList.get(position); 63 | Intent perCountryIntent = new Intent(mContext, PerCountryData.class); 64 | 65 | perCountryIntent.putExtra(COUNTRY_NAME, clickedItem.getCountry()); 66 | perCountryIntent.putExtra(COUNTRY_CONFIRMED, clickedItem.getConfirmed()); 67 | perCountryIntent.putExtra(COUNTRY_ACTIVE, clickedItem.getActive()); 68 | perCountryIntent.putExtra(COUNTRY_RECOVERED, clickedItem.getRecovered()); 69 | perCountryIntent.putExtra(COUNTRY_DECEASED, clickedItem.getDeceased()); 70 | perCountryIntent.putExtra(COUNTRY_NEW_CONFIRMED, clickedItem.getNewConfirmed()); 71 | perCountryIntent.putExtra(COUNTRY_NEW_DECEASED, clickedItem.getNewDeceased()); 72 | perCountryIntent.putExtra(COUNTRY_TESTS, clickedItem.getTests()); 73 | perCountryIntent.putExtra(COUNTRY_FLAGURL, clickedItem.getFlag()); 74 | perCountryIntent.putExtra(COUNTRY_NEW_RECOVERED, clickedItem.getNewRecovered()); 75 | 76 | 77 | mContext.startActivity(perCountryIntent); 78 | } 79 | }); 80 | 81 | CountrywiseModel currentItem = arrayList.get(position); 82 | String countryName = currentItem.getCountry(); 83 | String countryTotal = currentItem.getConfirmed(); 84 | String countryFlag = currentItem.getFlag(); 85 | String countryRank = String.valueOf(position+1); 86 | int countryTotalInt = Integer.parseInt(countryTotal); 87 | holder.rankTextView.setText(countryRank+"."); 88 | holder.countryTotalCases.setText(NumberFormat.getInstance().format(countryTotalInt)); 89 | holder.countryName.setText(countryName); 90 | Glide.with(mContext).load(countryFlag).into(holder.flagImage); 91 | } 92 | 93 | @Override 94 | public int getItemCount() { 95 | return arrayList.size(); 96 | } 97 | 98 | public void filterList(ArrayList filteredList) { 99 | arrayList = filteredList; 100 | notifyDataSetChanged(); 101 | } 102 | 103 | public class ViewHolder extends RecyclerView.ViewHolder { 104 | 105 | TextView countryName, countryTotalCases, rankTextView; 106 | ImageView flagImage; 107 | 108 | public ViewHolder(View itemView) { 109 | super(itemView); 110 | 111 | countryName = itemView.findViewById(R.id.country_name_textview); 112 | countryTotalCases = itemView.findViewById(R.id.country_confirmed_textview); 113 | flagImage = itemView.findViewById(R.id.flag_image); 114 | rankTextView = itemView.findViewById(R.id.country_rank); 115 | 116 | itemView.setOnClickListener(new View.OnClickListener() { 117 | @Override 118 | public void onClick(View v) { 119 | if (mListner != null) { 120 | int position = getAdapterPosition(); 121 | if (position != RecyclerView.NO_POSITION) { 122 | mListner.onItemClick(position); 123 | } 124 | } 125 | } 126 | }); 127 | } 128 | } 129 | 130 | } 131 | -------------------------------------------------------------------------------- /app/src/main/java/com/vipul/covidstatus/PerStateData.java: -------------------------------------------------------------------------------- 1 | package com.vipul.covidstatus; 2 | 3 | import androidx.annotation.NonNull; 4 | import androidx.appcompat.app.AppCompatActivity; 5 | import androidx.core.content.ContextCompat; 6 | 7 | import android.content.Intent; 8 | import android.graphics.Color; 9 | import android.os.Bundle; 10 | import android.view.MenuItem; 11 | import android.view.View; 12 | import android.widget.TextView; 13 | import android.widget.Toast; 14 | 15 | import org.eazegraph.lib.charts.PieChart; 16 | import org.eazegraph.lib.models.PieModel; 17 | 18 | import java.text.NumberFormat; 19 | import java.util.Objects; 20 | 21 | import static com.vipul.covidstatus.StatewiseDataActivity.STATE_CONFIRMED; 22 | import static com.vipul.covidstatus.StatewiseDataActivity.STATE_NAME; 23 | import static com.vipul.covidstatus.StatewiseDataActivity.STATE_ACTIVE; 24 | import static com.vipul.covidstatus.StatewiseDataActivity.STATE_DECEASED; 25 | import static com.vipul.covidstatus.StatewiseDataActivity.STATE_NEW_CONFIRMED; 26 | import static com.vipul.covidstatus.StatewiseDataActivity.STATE_NEW_RECOVERED; 27 | import static com.vipul.covidstatus.StatewiseDataActivity.STATE_NEW_DECEASED; 28 | import static com.vipul.covidstatus.StatewiseDataActivity.STATE_LAST_UPDATE; 29 | import static com.vipul.covidstatus.StatewiseDataActivity.STATE_RECOVERED; 30 | 31 | public class PerStateData extends AppCompatActivity { 32 | 33 | TextView perStateConfirmed, perStateActive, perStateDeceased, perStateNewConfirmed, perStateNewRecovered, perStateNewDeceased, perStateUpdate, perStateRecovered, perstateName; 34 | PieChart mPieChart; 35 | String stateName; 36 | 37 | @Override 38 | protected void onCreate(Bundle savedInstanceState) { 39 | super.onCreate(savedInstanceState); 40 | setContentView(R.layout.activity_per_state_data); 41 | 42 | Intent intent = getIntent(); 43 | stateName = intent.getStringExtra(STATE_NAME); 44 | String stateConfirmed = intent.getStringExtra(STATE_CONFIRMED); 45 | String stateActive = intent.getStringExtra(STATE_ACTIVE); 46 | String stateDeceased = intent.getStringExtra(STATE_DECEASED); 47 | String stateNewConfirmed = intent.getStringExtra(STATE_NEW_CONFIRMED); 48 | String stateNewRecovered = intent.getStringExtra(STATE_NEW_RECOVERED); 49 | String stateNewDeceased = intent.getStringExtra(STATE_NEW_DECEASED); 50 | String stateLastUpdate = intent.getStringExtra(STATE_LAST_UPDATE); 51 | String stateRecovery = intent.getStringExtra(STATE_RECOVERED); 52 | 53 | Objects.requireNonNull(getSupportActionBar()).setTitle(stateName); 54 | perStateConfirmed = findViewById(R.id.perstate_confirmed_textview); 55 | perStateActive = findViewById(R.id.perstate_active_textView); 56 | perStateRecovered = findViewById(R.id.perstate_recovered_textView); 57 | perStateDeceased = findViewById(R.id.perstate_death_textView); 58 | perStateUpdate = findViewById(R.id.perstate_lastupdate_textView); 59 | perStateNewConfirmed = findViewById(R.id.perstate_confirmed_new_textView); 60 | perStateNewRecovered = findViewById(R.id.perstate_recovered_new_textView); 61 | perStateNewDeceased = findViewById(R.id.perstate_death_new_textView); 62 | perstateName = findViewById(R.id.district_data_title); 63 | mPieChart = findViewById(R.id.piechart_perstate); 64 | getSupportActionBar().setDisplayHomeAsUpEnabled(true); 65 | getSupportActionBar().setDisplayShowHomeEnabled(true); 66 | 67 | getWindow().setNavigationBarColor(ContextCompat.getColor(this, R.color.colorPrimaryDark)); 68 | 69 | String activeCopy = stateActive; 70 | String recoveredCopy = stateRecovery; 71 | String deceasedCopy = stateDeceased; 72 | 73 | int stateActiveInt = Integer.parseInt(stateActive); 74 | stateActive = NumberFormat.getInstance().format(stateActiveInt); 75 | 76 | int stateDeceasedInt = Integer.parseInt(stateDeceased); 77 | stateDeceased = NumberFormat.getInstance().format(stateDeceasedInt); 78 | 79 | int stateRecoveredInt = Integer.parseInt(stateRecovery); 80 | stateRecovery = NumberFormat.getInstance().format(stateRecoveredInt); 81 | 82 | //assert stateActive != null; 83 | mPieChart.addPieSlice(new PieModel("Active", Integer.parseInt(activeCopy), Color.parseColor("#007afe"))); 84 | mPieChart.addPieSlice(new PieModel("Recovered", Integer.parseInt(recoveredCopy), Color.parseColor("#08a045"))); 85 | mPieChart.addPieSlice(new PieModel("Deceased", Integer.parseInt(deceasedCopy), Color.parseColor("#F6404F"))); 86 | 87 | mPieChart.startAnimation(); 88 | 89 | MainActivity object = new MainActivity(); 90 | String formatDate = object.formatDate(stateLastUpdate, 0); 91 | perStateConfirmed.setText(stateConfirmed); 92 | perStateActive.setText(stateActive); 93 | perStateDeceased.setText(stateDeceased); 94 | perStateUpdate.setText(formatDate); 95 | perStateNewConfirmed.setText("+" + stateNewConfirmed); 96 | perStateNewRecovered.setText("+" + stateNewRecovered); 97 | perStateNewDeceased.setText("+" + stateNewDeceased); 98 | perStateRecovered.setText(stateRecovery); 99 | perstateName.setText("District data of "+stateName); 100 | } 101 | 102 | @Override 103 | public boolean onOptionsItemSelected(@NonNull MenuItem item) { 104 | if (item.getItemId() == android.R.id.home) 105 | finish(); 106 | return super.onOptionsItemSelected(item); 107 | } 108 | 109 | public void openDistrictData(View view){ 110 | Intent intent = new Intent(this, DistrictwiseDataActivity.class); 111 | intent.putExtra(STATE_NAME, stateName); 112 | startActivity(intent); 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Attempt to set APP_HOME 10 | # Resolve links: $0 may be a link 11 | PRG="$0" 12 | # Need this for relative symlinks. 13 | while [ -h "$PRG" ] ; do 14 | ls=`ls -ld "$PRG"` 15 | link=`expr "$ls" : '.*-> \(.*\)$'` 16 | if expr "$link" : '/.*' > /dev/null; then 17 | PRG="$link" 18 | else 19 | PRG=`dirname "$PRG"`"/$link" 20 | fi 21 | done 22 | SAVED="`pwd`" 23 | cd "`dirname \"$PRG\"`/" >/dev/null 24 | APP_HOME="`pwd -P`" 25 | cd "$SAVED" >/dev/null 26 | 27 | APP_NAME="Gradle" 28 | APP_BASE_NAME=`basename "$0"` 29 | 30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 31 | DEFAULT_JVM_OPTS="" 32 | 33 | # Use the maximum available, or set MAX_FD != -1 to use that value. 34 | MAX_FD="maximum" 35 | 36 | warn () { 37 | echo "$*" 38 | } 39 | 40 | die () { 41 | echo 42 | echo "$*" 43 | echo 44 | exit 1 45 | } 46 | 47 | # OS specific support (must be 'true' or 'false'). 48 | cygwin=false 49 | msys=false 50 | darwin=false 51 | nonstop=false 52 | case "`uname`" in 53 | CYGWIN* ) 54 | cygwin=true 55 | ;; 56 | Darwin* ) 57 | darwin=true 58 | ;; 59 | MINGW* ) 60 | msys=true 61 | ;; 62 | NONSTOP* ) 63 | nonstop=true 64 | ;; 65 | esac 66 | 67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 68 | 69 | # Determine the Java command to use to start the JVM. 70 | if [ -n "$JAVA_HOME" ] ; then 71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 72 | # IBM's JDK on AIX uses strange locations for the executables 73 | JAVACMD="$JAVA_HOME/jre/sh/java" 74 | else 75 | JAVACMD="$JAVA_HOME/bin/java" 76 | fi 77 | if [ ! -x "$JAVACMD" ] ; then 78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 79 | 80 | Please set the JAVA_HOME variable in your environment to match the 81 | location of your Java installation." 82 | fi 83 | else 84 | JAVACMD="java" 85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 86 | 87 | Please set the JAVA_HOME variable in your environment to match the 88 | location of your Java installation." 89 | fi 90 | 91 | # Increase the maximum file descriptors if we can. 92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 93 | MAX_FD_LIMIT=`ulimit -H -n` 94 | if [ $? -eq 0 ] ; then 95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 96 | MAX_FD="$MAX_FD_LIMIT" 97 | fi 98 | ulimit -n $MAX_FD 99 | if [ $? -ne 0 ] ; then 100 | warn "Could not set maximum file descriptor limit: $MAX_FD" 101 | fi 102 | else 103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 104 | fi 105 | fi 106 | 107 | # For Darwin, add options to specify how the application appears in the dock 108 | if $darwin; then 109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 110 | fi 111 | 112 | # For Cygwin, switch paths to Windows format before running java 113 | if $cygwin ; then 114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 116 | JAVACMD=`cygpath --unix "$JAVACMD"` 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 | # Escape application args 158 | save () { 159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 160 | echo " " 161 | } 162 | APP_ARGS=$(save "$@") 163 | 164 | # Collect all arguments for the java command, following the shell quoting and substitution rules 165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 166 | 167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong 168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then 169 | cd "$(dirname "$0")" 170 | fi 171 | 172 | exec "$JAVACMD" "$@" 173 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50 | 55 | 60 | 65 | 70 | 75 | 80 | 85 | 90 | 95 | 100 | 105 | 110 | 115 | 120 | 125 | 130 | 135 | 140 | 145 | 150 | 155 | 160 | 165 | 170 | 171 | -------------------------------------------------------------------------------- /app/src/main/res/layout-sw457dp/activity_info.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 21 | 22 | 27 | 28 | 37 | 38 | 47 | 48 | 56 | 57 | 64 | 65 | 71 | 72 | 79 | 80 | 87 | 88 | 95 | 96 | 97 | 105 | 106 |