├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── pull_request_template.md ├── .gitignore ├── .idea ├── .gitignore ├── .name ├── codeStyles │ ├── Project.xml │ └── codeStyleConfig.xml ├── compiler.xml ├── gradle.xml ├── jarRepositories.xml ├── misc.xml └── vcs.xml ├── LICENSE ├── README.md ├── app ├── .gitignore ├── build.gradle ├── google-services.json ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── example │ │ └── inout2020_aimers │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── ic_app_icon-playstore.png │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── inout2020_aimers │ │ │ ├── Exercise │ │ │ ├── ExerciseFragment.kt │ │ │ └── StartExerciseFragment.kt │ │ │ ├── MainActivity.kt │ │ │ ├── MainFragment.kt │ │ │ ├── Milestones │ │ │ ├── Adapter │ │ │ │ └── GoalsAdapter.kt │ │ │ ├── AddGoalFragment.kt │ │ │ ├── Database │ │ │ │ ├── Goals.kt │ │ │ │ ├── GoalsDao.kt │ │ │ │ ├── GoalsRepository.kt │ │ │ │ ├── GoalsRoomDatabase.kt │ │ │ │ └── GoalsViewModel.kt │ │ │ ├── DetailsFragment.kt │ │ │ └── StartFragment.kt │ │ │ ├── Motivation │ │ │ └── Fragment │ │ │ │ ├── Adapter │ │ │ │ └── MotivationImageAdapter.kt │ │ │ │ ├── Image.kt │ │ │ │ ├── MotivationFragment.kt │ │ │ │ ├── MotivationFullscreenFragment.kt │ │ │ │ ├── MotivationImageClickListener.kt │ │ │ │ ├── MyAppGlideModule.kt │ │ │ │ ├── SquareLayout │ │ │ │ └── SquareLayout.kt │ │ │ │ └── ZoomOutPageTransformer.kt │ │ │ ├── MusicPlayer │ │ │ └── MusicPlayerFragment.kt │ │ │ ├── MyCustomAppIntro.kt │ │ │ ├── ProTips │ │ │ ├── LifeLessonsFragment.kt │ │ │ ├── MyAdapter.kt │ │ │ ├── PlanningFragment.kt │ │ │ └── ProTipsActivity.kt │ │ │ ├── Resources │ │ │ ├── Adapter │ │ │ │ └── ResourceAdapter.kt │ │ │ ├── ResourceFragment.kt │ │ │ ├── ResourceWebFragment.kt │ │ │ └── Resources.kt │ │ │ ├── Viewpager │ │ │ ├── AppIntroFragment.kt │ │ │ ├── BucketIntroFragment.kt │ │ │ ├── GoalsIntroFragment.kt │ │ │ └── TipsIntroFragment.kt │ │ │ ├── WeeklyPlanner │ │ │ ├── Adapter │ │ │ │ └── DayAdapter.kt │ │ │ ├── Database │ │ │ │ ├── Day.kt │ │ │ │ ├── DayDao.kt │ │ │ │ ├── DayRepository.kt │ │ │ │ ├── DayRoomDatabase.kt │ │ │ │ └── DayViewModel.kt │ │ │ └── WeekFragment.kt │ │ │ ├── appblock │ │ │ ├── AppListModel.kt │ │ │ ├── BlockerFragment.kt │ │ │ ├── blockService │ │ │ │ ├── AppBlockService.kt │ │ │ │ └── BlockActivity.kt │ │ │ ├── database │ │ │ │ ├── AppsDao.kt │ │ │ │ ├── BlockedApps.kt │ │ │ │ ├── BlockedAppsRepository.kt │ │ │ │ └── BlockerDatabase.kt │ │ │ └── util │ │ │ │ ├── AppsAdapter.kt │ │ │ │ ├── BlockerVMF.kt │ │ │ │ └── BlockerViewModel.kt │ │ │ ├── bucket │ │ │ ├── Adapter │ │ │ │ └── BucketListAdapter.kt │ │ │ ├── BucketList │ │ │ │ ├── AddItemFragment.kt │ │ │ │ └── DisplayFragment.kt │ │ │ └── Database │ │ │ │ ├── Bucket.kt │ │ │ │ ├── ListDao.kt │ │ │ │ ├── ListRepository.kt │ │ │ │ ├── ListRoomDatabase.kt │ │ │ │ └── ListViewModel.kt │ │ │ ├── ui │ │ │ ├── AccountFragment.kt │ │ │ ├── DashboardFragment.kt │ │ │ ├── HomeActivity.kt │ │ │ ├── ProtipFragment.kt │ │ │ └── auth │ │ │ │ ├── AuthActivity.kt │ │ │ │ ├── AuthOptionsFragment.kt │ │ │ │ ├── EmailVerificationFragment.kt │ │ │ │ ├── LoginFragment.kt │ │ │ │ └── SignupFragment.kt │ │ │ └── utils │ │ │ ├── Snacker.kt │ │ │ └── SwipeToDeleteCallback.kt │ └── res │ │ ├── anim │ │ ├── from_left.xml │ │ ├── from_right.xml │ │ ├── to_left.xml │ │ └── to_right.xml │ │ ├── drawable-v24 │ │ ├── alarm.png │ │ ├── badge.png │ │ ├── bucket.png │ │ ├── calendar.png │ │ ├── calendar_b.png │ │ ├── deadline.png │ │ ├── diet.png │ │ ├── direction.png │ │ ├── e.png │ │ ├── ex_a.png │ │ ├── ex_b.png │ │ ├── exercise.png │ │ ├── finish.png │ │ ├── flag.png │ │ ├── gallery.png │ │ ├── habit.jpg │ │ ├── ic_launcher_foreground.xml │ │ ├── ikigai.jpg │ │ ├── lazy.png │ │ ├── learn.png │ │ ├── leftdirection.png │ │ ├── map.png │ │ ├── music.png │ │ ├── night.png │ │ ├── no_excuse.jpg │ │ ├── positive.png │ │ ├── power.jpg │ │ ├── quit.jpg │ │ ├── res.png │ │ ├── rounded.xml │ │ ├── rounded_dialog.xml │ │ ├── se.png │ │ ├── sleep.png │ │ ├── stress.png │ │ ├── success.png │ │ ├── sw.png │ │ ├── target.png │ │ ├── todo.png │ │ ├── twenty.png │ │ ├── two.png │ │ └── water.png │ │ ├── drawable-xxhdpi │ │ ├── article_a.jpeg │ │ ├── article_c.png │ │ ├── article_d.png │ │ ├── block_intro.jpg │ │ ├── bucket_intro.png │ │ ├── ex_aa.jpg │ │ ├── ex_bb.jpg │ │ ├── ex_cc.jpg │ │ ├── ex_dd.jpg │ │ ├── ex_ee.jpg │ │ ├── ex_gg.jpg │ │ ├── ex_hh.jpg │ │ ├── goal_intro.jpg │ │ ├── mountains.png │ │ ├── natrajsana.png │ │ ├── paschimottasana.png │ │ ├── pause.png │ │ ├── pb.png │ │ ├── r.png │ │ ├── stop.png │ │ ├── tdraw.png │ │ ├── tips_intro.jpg │ │ ├── virasana.png │ │ └── vrik.png │ │ ├── drawable │ │ ├── article_e.PNG │ │ ├── article_f.PNG │ │ ├── avd_bin_open_close_black_24dp.xml │ │ ├── bulb.png │ │ ├── deep_work.jpg │ │ ├── ex_ff.jpg │ │ ├── frog.jpg │ │ ├── ic_app_icon_foreground.xml │ │ ├── ic_baseline_account_circle_24.xml │ │ ├── ic_baseline_add_24.xml │ │ ├── ic_baseline_alternate_email_24.xml │ │ ├── ic_baseline_app_blocking_24.xml │ │ ├── ic_baseline_apps_24.xml │ │ ├── ic_baseline_arrow_back_ios_24.xml │ │ ├── ic_baseline_block_24.xml │ │ ├── ic_baseline_check_24.xml │ │ ├── ic_baseline_check_circle_24.xml │ │ ├── ic_baseline_edit_24.xml │ │ ├── ic_baseline_fiber_manual_record_24.xml │ │ ├── ic_baseline_home_24.xml │ │ ├── ic_baseline_music_note_24.xml │ │ ├── ic_baseline_settings_24.xml │ │ ├── ic_baseline_vpn_key_24.xml │ │ ├── ic_baseline_warning_24.xml │ │ ├── ic_bucketlist.xml │ │ ├── ic_cancel.xml │ │ ├── ic_dtc_logo.xml │ │ ├── ic_dtc_logo_white.xml │ │ ├── ic_exercise.xml │ │ ├── ic_launcher_background.xml │ │ ├── ic_milestone.xml │ │ ├── ic_motivation.xml │ │ ├── ic_protip.xml │ │ ├── ic_refresh.xml │ │ ├── ic_resources.xml │ │ ├── ic_splash_logo.xml │ │ ├── obstacle.jpg │ │ ├── rect.xml │ │ ├── rectangle.xml │ │ ├── splash_image.xml │ │ ├── war_of_art.jpg │ │ └── weekly.png │ │ ├── font │ │ ├── fonts.xml │ │ ├── mont_black_italic.ttf │ │ ├── montserrat_black.ttf │ │ ├── montserrat_bold.ttf │ │ ├── montserrat_bolditalic.ttf │ │ ├── montserrat_light.ttf │ │ ├── montserrat_medium.ttf │ │ └── pacifico.xml │ │ ├── layout │ │ ├── activity_auth.xml │ │ ├── activity_block.xml │ │ ├── activity_home.xml │ │ ├── activity_main.xml │ │ ├── activity_pro_tips.xml │ │ ├── dialog.xml │ │ ├── fragment_account.xml │ │ ├── fragment_add_goal.xml │ │ ├── fragment_add_item.xml │ │ ├── fragment_app_intro.xml │ │ ├── fragment_auth_options.xml │ │ ├── fragment_blocker.xml │ │ ├── fragment_bucket_intro.xml │ │ ├── fragment_dashboard.xml │ │ ├── fragment_details.xml │ │ ├── fragment_display.xml │ │ ├── fragment_email_verification_activity.xml │ │ ├── fragment_exercise.xml │ │ ├── fragment_goals_intro.xml │ │ ├── fragment_life_lessons.xml │ │ ├── fragment_login.xml │ │ ├── fragment_main.xml │ │ ├── fragment_motivation.xml │ │ ├── fragment_motivation_fullscreen.xml │ │ ├── fragment_music_player.xml │ │ ├── fragment_planning.xml │ │ ├── fragment_protip.xml │ │ ├── fragment_resource.xml │ │ ├── fragment_resource_web.xml │ │ ├── fragment_signup.xml │ │ ├── fragment_start.xml │ │ ├── fragment_start_exercise.xml │ │ ├── fragment_tips_intro.xml │ │ ├── fragment_week.xml │ │ ├── image_fullscreen.xml │ │ ├── item_bucket.xml │ │ ├── item_goals.xml │ │ ├── item_motivation_image.xml │ │ ├── item_select_apps.xml │ │ ├── item_weekday.xml │ │ ├── select_apps_bottomsheet.xml │ │ └── view_resources.xml │ │ ├── menu │ │ ├── blocker_fragment_menu.xml │ │ ├── bottom_nav_menu.xml │ │ ├── dashboard_menu.xml │ │ ├── dashboard_vert_dot.xml │ │ └── reset_btn.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_app_icon.xml │ │ ├── ic_app_icon_round.xml │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_app_icon.png │ │ ├── ic_app_icon_round.png │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_app_icon.png │ │ ├── ic_app_icon_round.png │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_app_icon.png │ │ ├── ic_app_icon_round.png │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_app_icon.png │ │ ├── ic_app_icon_round.png │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_app_icon.png │ │ ├── ic_app_icon_round.png │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── navigation │ │ ├── nav_graph_auth.xml │ │ ├── nav_graph_home.xml │ │ └── navigate.xml │ │ ├── raw │ │ ├── anim.json │ │ ├── fast_and.mp3 │ │ ├── focus.json │ │ ├── goal_anim.json │ │ ├── loading.json │ │ ├── wave.json │ │ ├── welcome.json │ │ └── work.json │ │ ├── values-night │ │ ├── colors.xml │ │ ├── font_certs.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── values │ │ ├── colors.xml │ │ ├── font_certs.xml │ │ ├── ic_app_icon_background.xml │ │ ├── preloaded_fonts.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── example │ └── inout2020_aimers │ └── ExampleUnitTest.kt ├── build.gradle ├── contribution.md ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | 12 | 13 | **To Reproduce** 14 | 19 | 20 | **Expected behavior** 21 | 22 | 23 | **Logs** 24 | 25 | 26 | **Screenshots** 27 | 28 | 29 | **Smartphone Info:** 30 | 31 | | | | 32 | |---------------|-| 33 | |Device || 34 | |Android Version| | 35 | 36 | **Additional context** 37 | 38 | 39 | **Would you like to work on the issue?** 40 | 41 | - [ ] Yes 42 | - [ ] No 43 | - Other: 44 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the feature you'd like** 11 | 12 | 13 | **Screenshots** 14 | 15 | 16 | **Additional context** 17 | 18 | 19 | **Would you like to work on the issue?** 20 | 21 | - [ ] Yes 22 | - [ ] No 23 | - Other: 24 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 3 | 4 | 5 | Fixes # (issue) 6 | 7 | ## Type of change 8 | 9 | 10 | 11 | - [ ] Bug fix (non-breaking change which fixes an issue) 12 | - [ ] New feature (non-breaking change which adds functionality) 13 | 14 | 15 | ## Screenshot/APK Link 16 | 17 | 18 | 19 | 20 | # Checklist: 21 | 22 | - [ ] My code follows the style guidelines of this project 23 | - [ ] I have performed a self-review of my own code 24 | - [ ] I have commented my code, particularly in hard-to-understand areas 25 | - [ ] My changes generate no new warnings 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | /app/src/main/java/com/example/inout2020_aimers/utils/SecretKeys.kt 17 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | inOut2020-Aimers -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 22 | 23 | -------------------------------------------------------------------------------- /.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | 29 | 30 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Pranshu Pandey 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 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "112228089668", 4 | "firebase_url": "https://inout2020-aimers.firebaseio.com", 5 | "project_id": "inout2020-aimers", 6 | "storage_bucket": "inout2020-aimers.appspot.com" 7 | }, 8 | "client": [ 9 | { 10 | "client_info": { 11 | "mobilesdk_app_id": "1:112228089668:android:963220228e5e742d5ce111", 12 | "android_client_info": { 13 | "package_name": "com.example.inout2020_aimers" 14 | } 15 | }, 16 | "oauth_client": [ 17 | { 18 | "client_id": "112228089668-qf3omiavq22keealm54dqku19bl2sibj.apps.googleusercontent.com", 19 | "client_type": 3 20 | } 21 | ], 22 | "api_key": [ 23 | { 24 | "current_key": "AIzaSyD4e94Tx838xnPMSZJZLXmPJkjtG7dDOfc" 25 | } 26 | ], 27 | "services": { 28 | "appinvite_service": { 29 | "other_platform_oauth_client": [ 30 | { 31 | "client_id": "112228089668-qf3omiavq22keealm54dqku19bl2sibj.apps.googleusercontent.com", 32 | "client_type": 3 33 | } 34 | ] 35 | } 36 | } 37 | } 38 | ], 39 | "configuration_version": "1" 40 | } -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /app/src/androidTest/java/com/example/inout2020_aimers/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.example.inout2020_aimers", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 11 | 12 | 19 | 20 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 38 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /app/src/main/ic_app_icon-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/ic_app_icon-playstore.png -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/Exercise/ExerciseFragment.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.Exercise 2 | 3 | import android.os.Bundle 4 | import androidx.fragment.app.Fragment 5 | import android.view.LayoutInflater 6 | import android.view.View 7 | import android.view.ViewGroup 8 | import android.widget.Toast 9 | import com.example.inout2020_aimers.R 10 | import com.example.inout2020_aimers.databinding.FragmentExerciseBinding 11 | 12 | class ExerciseFragment : Fragment() { 13 | companion object{ 14 | var key:Int = -1 15 | } 16 | private var _binding: FragmentExerciseBinding? = null 17 | private val binding 18 | get() = _binding!! 19 | override fun onCreateView( 20 | inflater: LayoutInflater, container: ViewGroup?, 21 | savedInstanceState: Bundle? 22 | ): View? { 23 | // Inflate the layout for this fragment 24 | _binding = FragmentExerciseBinding.inflate(inflater, container, false) 25 | if(key == 1){ 26 | binding.demo.setImageResource(R.drawable.ex_aa) 27 | binding.head.text=resources.getString(R.string.exHead1) 28 | binding.description.text=resources.getString(R.string.desc1) 29 | } 30 | if(key == 2){ 31 | binding.demo.setImageResource(R.drawable.ex_bb) 32 | binding.head.text=resources.getString(R.string.exHead2) 33 | binding.description.text=resources.getString(R.string.desc2) 34 | } 35 | if(key == 3){ 36 | binding.demo.setImageResource(R.drawable.ex_cc) 37 | binding.head.text=resources.getString(R.string.exHead3) 38 | binding.description.text=resources.getString(R.string.desc3) 39 | } 40 | if(key == 4){ 41 | binding.demo.setImageResource(R.drawable.ex_dd) 42 | binding.head.text=resources.getString(R.string.exHead4) 43 | binding.description.text=resources.getString(R.string.desc4) 44 | } 45 | if(key == 5){ 46 | binding.demo.setImageResource(R.drawable.ex_ee) 47 | binding.head.text=resources.getString(R.string.exHead5) 48 | binding.description.text=resources.getString(R.string.desc5) 49 | } 50 | if(key == 6){ 51 | binding.demo.setImageResource(R.drawable.ex_ff) 52 | binding.head.text=resources.getString(R.string.exHead6) 53 | binding.description.text=resources.getString(R.string.desc6) 54 | } 55 | if(key == 7){ 56 | binding.demo.setImageResource(R.drawable.ex_gg) 57 | binding.head.text=resources.getString(R.string.exHead7) 58 | binding.description.text=resources.getString(R.string.desc7) 59 | } 60 | if(key == 8){ 61 | binding.demo.setImageResource(R.drawable.ex_hh) 62 | binding.head.text=resources.getString(R.string.exHead8) 63 | binding.description.text=resources.getString(R.string.desc8) 64 | } 65 | return binding.root 66 | } 67 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/Exercise/StartExerciseFragment.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.Exercise 2 | 3 | import android.os.Bundle 4 | import androidx.fragment.app.Fragment 5 | import android.view.LayoutInflater 6 | import android.view.View 7 | import android.view.ViewGroup 8 | import android.widget.Toast 9 | import androidx.navigation.fragment.findNavController 10 | import com.example.inout2020_aimers.R 11 | import com.example.inout2020_aimers.databinding.FragmentStartExerciseBinding 12 | 13 | class StartExerciseFragment : Fragment() { 14 | private var _binding: FragmentStartExerciseBinding? = null 15 | private val binding 16 | get() = _binding!! 17 | override fun onCreateView( 18 | inflater: LayoutInflater, container: ViewGroup?, 19 | savedInstanceState: Bundle? 20 | ): View? { 21 | // Inflate the layout for this fragment 22 | _binding = FragmentStartExerciseBinding.inflate(inflater, container, false) 23 | binding.ex1.setOnClickListener { 24 | ExerciseFragment.key=1 25 | findNavController().navigate(R.id.action_startExerciseFragment_to_exerciseFragment) 26 | } 27 | binding.ex2.setOnClickListener { 28 | ExerciseFragment.key=2 29 | findNavController().navigate(R.id.action_startExerciseFragment_to_exerciseFragment) 30 | } 31 | binding.ex3.setOnClickListener { 32 | ExerciseFragment.key=3 33 | findNavController().navigate(R.id.action_startExerciseFragment_to_exerciseFragment) 34 | } 35 | binding.ex4.setOnClickListener { 36 | ExerciseFragment.key=4 37 | findNavController().navigate(R.id.action_startExerciseFragment_to_exerciseFragment) 38 | } 39 | binding.ex5.setOnClickListener { 40 | ExerciseFragment.key=5 41 | findNavController().navigate(R.id.action_startExerciseFragment_to_exerciseFragment) 42 | } 43 | binding.ex6.setOnClickListener { 44 | ExerciseFragment.key=6 45 | findNavController().navigate(R.id.action_startExerciseFragment_to_exerciseFragment) 46 | } 47 | binding.ex7.setOnClickListener { 48 | ExerciseFragment.key=7 49 | findNavController().navigate(R.id.action_startExerciseFragment_to_exerciseFragment) 50 | } 51 | binding.ex8.setOnClickListener { 52 | ExerciseFragment.key=8 53 | findNavController().navigate(R.id.action_startExerciseFragment_to_exerciseFragment) 54 | } 55 | return binding.root 56 | } 57 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers 2 | 3 | import androidx.appcompat.app.AppCompatActivity 4 | import android.os.Bundle 5 | 6 | class MainActivity : AppCompatActivity() { 7 | override fun onCreate(savedInstanceState: Bundle?) { 8 | super.onCreate(savedInstanceState) 9 | setTheme(R.style.AppTheme) 10 | setContentView(R.layout.activity_main) 11 | } 12 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/MainFragment.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers 2 | 3 | import android.os.Bundle 4 | import androidx.fragment.app.Fragment 5 | import android.view.LayoutInflater 6 | import android.view.View 7 | import android.view.ViewGroup 8 | class MainFragment : Fragment() { 9 | override fun onCreateView( 10 | inflater: LayoutInflater, container: ViewGroup?, 11 | savedInstanceState: Bundle? 12 | ): View? { 13 | // Inflate the layout for this fragment 14 | return inflater.inflate(R.layout.fragment_main, container, false) 15 | } 16 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/Milestones/Database/Goals.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.Milestones.Database 2 | 3 | import android.os.Parcelable 4 | import androidx.room.Entity 5 | import androidx.room.PrimaryKey 6 | import kotlinx.android.parcel.Parcelize 7 | 8 | @Parcelize 9 | @Entity(tableName = "goals_table") 10 | data class Goals( 11 | @PrimaryKey(autoGenerate = true) var goalId: Long = 0L, 12 | var mainGoal: String = "", 13 | var mainGoalDate: String = "", 14 | var subGoal1: String = "", 15 | var subGoal1Date: String = "", 16 | var subGoal2: String = "", 17 | var subGoal2Date: String = "", 18 | var subGoal3: String = "", 19 | var subGoal3Date: String = "" 20 | ) : 21 | Parcelable 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/Milestones/Database/GoalsDao.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.Milestones.Database 2 | 3 | import androidx.lifecycle.LiveData 4 | import androidx.room.* 5 | @Dao 6 | interface GoalsDao 7 | { 8 | @Query("SELECT * FROM goals_table") 9 | fun getAllGoals(): LiveData> 10 | 11 | @Insert 12 | fun insertGoals(vararg Goals: Goals) 13 | 14 | @Delete 15 | fun deleteGoals(vararg Goals: Goals) 16 | 17 | @Update 18 | fun updateGoals(vararg Goals: Goals) 19 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/Milestones/Database/GoalsRepository.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.Milestones.Database 2 | 3 | import androidx.annotation.WorkerThread 4 | import androidx.lifecycle.LiveData 5 | 6 | class GoalsRepository(private val goalsDao: GoalsDao) { 7 | 8 | val allGoals: LiveData> = goalsDao.getAllGoals() 9 | 10 | @WorkerThread 11 | fun insert(goals: Goals) { 12 | goalsDao.insertGoals(goals) 13 | } 14 | 15 | @WorkerThread 16 | fun delete(goals: Goals) { 17 | goalsDao.deleteGoals(goals) 18 | } 19 | @WorkerThread 20 | fun update(goals: Goals) { 21 | goalsDao.updateGoals(goals) 22 | } 23 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/Milestones/Database/GoalsRoomDatabase.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.Milestones.Database 2 | 3 | import android.content.Context 4 | import androidx.room.Database 5 | import androidx.room.Room 6 | import androidx.room.RoomDatabase 7 | 8 | @Database(entities = [Goals::class], version = 1) 9 | abstract class GoalsRoomDatabase: RoomDatabase() { 10 | 11 | abstract fun goalsDao(): GoalsDao 12 | 13 | companion object { 14 | @Volatile 15 | private var INSTANCE: GoalsRoomDatabase? = null 16 | 17 | fun getDatabase(context: Context): GoalsRoomDatabase { 18 | val tempInstance = INSTANCE 19 | if (tempInstance != null) { 20 | return tempInstance 21 | } 22 | synchronized(this) { 23 | val instance = Room.databaseBuilder( 24 | context.applicationContext, 25 | GoalsRoomDatabase::class.java, 26 | "Goals_Database" 27 | ).build() 28 | INSTANCE = instance 29 | return instance 30 | } 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/Milestones/Database/GoalsViewModel.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.Milestones.Database 2 | 3 | 4 | import android.app.Application 5 | import androidx.lifecycle.AndroidViewModel 6 | import androidx.lifecycle.LiveData 7 | import kotlinx.coroutines.CoroutineScope 8 | import kotlinx.coroutines.Dispatchers 9 | import kotlinx.coroutines.Job 10 | import kotlinx.coroutines.launch 11 | 12 | class GoalsViewModel(application: Application) : AndroidViewModel(Application()) { 13 | 14 | private var parentJob = Job() 15 | private val scope = CoroutineScope(parentJob + Dispatchers.Main) 16 | 17 | private val repository: GoalsRepository 18 | val allLists: LiveData> 19 | 20 | init { 21 | val listDao = GoalsRoomDatabase.getDatabase(application).goalsDao() 22 | repository = GoalsRepository(listDao) 23 | allLists = repository.allGoals 24 | } 25 | 26 | fun insert(goals: Goals) = scope.launch(Dispatchers.IO) { 27 | repository.insert(goals) 28 | } 29 | 30 | fun delete(goals: Goals) = scope.launch(Dispatchers.IO) { 31 | repository.delete(goals) 32 | } 33 | 34 | fun update(goals: Goals) = scope.launch(Dispatchers.IO) { 35 | repository.update(goals) 36 | } 37 | 38 | override fun onCleared() { 39 | super.onCleared() 40 | parentJob.cancel() 41 | } 42 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/Milestones/DetailsFragment.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.Milestones 2 | 3 | import android.annotation.SuppressLint 4 | import android.os.Bundle 5 | import android.view.LayoutInflater 6 | import android.view.View 7 | import android.view.View.GONE 8 | import android.view.View.VISIBLE 9 | import android.view.ViewGroup 10 | import android.widget.Toast 11 | import com.example.inout2020_aimers.Milestones.Database.Goals 12 | import com.example.inout2020_aimers.databinding.FragmentDetailsBinding 13 | import com.google.android.material.bottomsheet.BottomSheetBehavior 14 | import com.google.android.material.bottomsheet.BottomSheetDialogFragment 15 | 16 | 17 | class DetailsFragment : BottomSheetDialogFragment() { 18 | companion object { 19 | fun newInstance(args: Bundle) = DetailsFragment().apply { 20 | val fragment = DetailsFragment() 21 | fragment.arguments = args 22 | return fragment 23 | } 24 | } 25 | private var _binding: FragmentDetailsBinding? = null 26 | private val binding 27 | get() = _binding!! 28 | 29 | @SuppressLint("SetTextI18n") 30 | override fun onCreateView( 31 | inflater: LayoutInflater, container: ViewGroup?, 32 | savedInstanceState: Bundle? 33 | ): View? { 34 | // Inflate the layout for this fragment 35 | _binding = FragmentDetailsBinding.inflate(inflater, container, false) 36 | val args = arguments?.getParcelable("Goals") 37 | 38 | if (args != null) { 39 | binding.mainHead.text = args.mainGoal 40 | binding.goal1.text = "${args.subGoal1} (${args.subGoal1Date})" 41 | binding.goal2.text = "${args.subGoal2} (${args.subGoal2Date})" 42 | binding.goal3.text = "${args.subGoal3} (${args.subGoal3Date})" 43 | if(args.subGoal2==""){ 44 | binding.goal2.visibility=GONE 45 | binding.two.visibility= GONE 46 | binding.sw.visibility= GONE 47 | binding.finishTwo.visibility=VISIBLE 48 | binding.goal3.visibility=GONE 49 | binding.three.visibility= GONE 50 | binding.se2.visibility= GONE 51 | binding.finalFinish.visibility= GONE 52 | } 53 | else if(args.subGoal3==""){ 54 | binding.goal3.visibility=GONE 55 | binding.three.visibility= GONE 56 | binding.se2.visibility= GONE 57 | binding.finalFinish.visibility= GONE 58 | binding.finishThree.visibility=VISIBLE 59 | } 60 | } 61 | return binding.root 62 | } 63 | 64 | override fun onStart() { 65 | super.onStart() 66 | // this forces the sheet to appear at max height even on landscape 67 | val behavior = BottomSheetBehavior.from(requireView().parent as View) 68 | behavior.state = BottomSheetBehavior.STATE_EXPANDED 69 | } 70 | 71 | override fun onDestroyView() { 72 | super.onDestroyView() 73 | _binding = null 74 | } 75 | 76 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/Motivation/Fragment/Adapter/MotivationImageAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.Motivation.Fragment.Adapter 2 | 3 | import android.content.Context 4 | import android.view.LayoutInflater 5 | import android.view.View 6 | import android.view.ViewGroup 7 | import androidx.recyclerview.widget.RecyclerView 8 | import com.bumptech.glide.load.engine.DiskCacheStrategy 9 | import com.example.inout2020_aimers.Motivation.Fragment.GalleryImageClickListener 10 | import com.example.inout2020_aimers.Motivation.Fragment.GlideApp 11 | import com.example.inout2020_aimers.R 12 | import kotlinx.android.synthetic.main.item_motivation_image.view.* 13 | 14 | class MotivationImageAdapter(private val itemList: ArrayList) : RecyclerView.Adapter() { 15 | private var context: Context? = null 16 | var listener: GalleryImageClickListener? = null 17 | override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): MotivationImageAdapter.ViewHolder { 18 | context = parent.context 19 | val view = LayoutInflater.from(parent.context).inflate( 20 | R.layout.item_motivation_image, parent, 21 | false) 22 | return ViewHolder(view) 23 | } 24 | override fun getItemCount(): Int { 25 | return itemList.size 26 | } 27 | override fun onBindViewHolder(holder: MotivationImageAdapter.ViewHolder, position: Int) { 28 | holder.bind() 29 | } 30 | inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { 31 | fun bind() { 32 | val image = itemList.get(adapterPosition) 33 | // load image 34 | GlideApp.with(context!!) 35 | .load(image.imageUrl) 36 | .centerCrop() 37 | .diskCacheStrategy(DiskCacheStrategy.ALL) 38 | .into(itemView.ivGalleryImage) 39 | // adding click or tap handler for our image layout 40 | itemView.container.setOnClickListener { 41 | listener?.onClick(adapterPosition) 42 | } 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/Motivation/Fragment/Image.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.Motivation.Fragment 2 | 3 | 4 | data class Image ( 5 | val imageUrl: String 6 | ) -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/Motivation/Fragment/MotivationImageClickListener.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.Motivation.Fragment 2 | 3 | interface GalleryImageClickListener { 4 | fun onClick(position: Int) 5 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/Motivation/Fragment/MyAppGlideModule.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.Motivation.Fragment 2 | 3 | import com.bumptech.glide.annotation.GlideModule 4 | import com.bumptech.glide.module.AppGlideModule 5 | 6 | @GlideModule 7 | class MyAppGlideModule : AppGlideModule() -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/Motivation/Fragment/SquareLayout/SquareLayout.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.Motivation.Fragment.SquareLayout 2 | 3 | import android.annotation.TargetApi 4 | import android.content.Context 5 | import android.os.Build 6 | import android.util.AttributeSet 7 | import android.widget.RelativeLayout 8 | 9 | internal class SquareLayout: RelativeLayout { 10 | constructor(context: Context) : super(context) 11 | constructor(context: Context, attrs: AttributeSet) : super(context, attrs) 12 | constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) 13 | @TargetApi(Build.VERSION_CODES.LOLLIPOP) 14 | constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : 15 | super(context, attrs, defStyleAttr, defStyleRes) 16 | override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) { 17 | super.onMeasure(widthMeasureSpec, widthMeasureSpec) 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/Motivation/Fragment/ZoomOutPageTransformer.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.Motivation.Fragment 2 | 3 | import android.view.View 4 | import androidx.viewpager.widget.ViewPager 5 | 6 | private const val MIN_SCALE = 0.75f 7 | class ZoomOutPageTransformer : ViewPager.PageTransformer { 8 | override fun transformPage(view: View, position: Float) { 9 | view.apply { 10 | val pageWidth = width 11 | when { 12 | position < -1 -> { // [-Infinity,-1) 13 | // This page is way off-screen to the left. 14 | alpha = 0f 15 | } 16 | position <= 0 -> { // [-1,0] 17 | // Use the default slide transition when moving to the left page 18 | alpha = 1f 19 | translationX = 0f 20 | scaleX = 1f 21 | scaleY = 1f 22 | } 23 | position <= 1 -> { // (0,1] 24 | // Fade the page out. 25 | alpha = 1 - position 26 | // Counteract the default slide transition 27 | translationX = pageWidth * -position 28 | // Scale the page down (between MIN_SCALE and 1) 29 | val scaleFactor = (MIN_SCALE + (1 - MIN_SCALE) * (1 - Math.abs(position))) 30 | scaleX = scaleFactor 31 | scaleY = scaleFactor 32 | } 33 | else -> { // (1,+Infinity] 34 | // This page is way off-screen to the right. 35 | alpha = 0f 36 | } 37 | } 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/MyCustomAppIntro.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers 2 | 3 | import android.content.Context 4 | import android.content.Intent 5 | import android.content.SharedPreferences 6 | import android.os.Bundle 7 | import androidx.core.content.ContextCompat 8 | import androidx.fragment.app.Fragment 9 | import com.example.inout2020_aimers.ui.HomeActivity 10 | import com.github.appintro.AppIntro 11 | import com.github.appintro.AppIntroCustomLayoutFragment 12 | import com.github.appintro.AppIntroFragment 13 | import com.github.appintro.AppIntroPageTransformerType 14 | 15 | class MyCustomAppIntro : AppIntro() { 16 | lateinit var sharedPreferences: SharedPreferences 17 | override fun onCreate(savedInstanceState: Bundle?) { 18 | super.onCreate(savedInstanceState) 19 | sharedPreferences = this.getSharedPreferences("FIRST_RUN", Context.MODE_PRIVATE)!! 20 | // Make sure you don't call setContentView! 21 | if (sharedPreferences.getInt("FIRST_RUN", 0) == 1){ 22 | startActivity(Intent(this, HomeActivity::class.java)) 23 | finish() 24 | } 25 | // Call addSlide passing your Fragments. 26 | // You can use AppIntroFragment to use a pre-built fragment 27 | 28 | setColorDoneText(ContextCompat.getColor(this, R.color.white)) 29 | setColorSkipButton(ContextCompat.getColor(this, R.color.white)) 30 | setNextArrowColor(R.color.white) 31 | setIndicatorColor( 32 | selectedIndicatorColor = ContextCompat.getColor(this, R.color.white), 33 | unselectedIndicatorColor = ContextCompat.getColor(this, R.color.blackShade) 34 | ) 35 | setTransformer(AppIntroPageTransformerType.SlideOver) 36 | setImmersiveMode() 37 | addSlide(AppIntroCustomLayoutFragment.newInstance(R.layout.fragment_app_intro)) 38 | addSlide(AppIntroCustomLayoutFragment.newInstance(R.layout.fragment_goals_intro)) 39 | addSlide(AppIntroCustomLayoutFragment.newInstance(R.layout.fragment_bucket_intro)) 40 | addSlide(AppIntroCustomLayoutFragment.newInstance(R.layout.fragment_tips_intro)) 41 | } 42 | 43 | override fun onSkipPressed(currentFragment: Fragment?) { 44 | super.onSkipPressed(currentFragment) 45 | // Decide what to do when the user clicks on "Skip" 46 | startActivity(Intent(this, HomeActivity::class.java)) 47 | finish() 48 | } 49 | 50 | override fun onDonePressed(currentFragment: Fragment?) { 51 | super.onDonePressed(currentFragment) 52 | // Decide what to do when the user clicks on "Done" 53 | startActivity(Intent(this, HomeActivity::class.java)) 54 | finish() 55 | } 56 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/ProTips/LifeLessonsFragment.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.ProTips 2 | 3 | import android.os.Bundle 4 | import androidx.fragment.app.Fragment 5 | import android.view.LayoutInflater 6 | import android.view.View 7 | import android.view.ViewGroup 8 | import com.example.inout2020_aimers.R 9 | class LifeLessonsFragment : Fragment() { 10 | override fun onCreateView( 11 | inflater: LayoutInflater, container: ViewGroup?, 12 | savedInstanceState: Bundle? 13 | ): View? { 14 | // Inflate the layout for this fragment 15 | return inflater.inflate(R.layout.fragment_life_lessons, container, false) 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/ProTips/MyAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.ProTips 2 | import android.content.Context 3 | import androidx.fragment.app.Fragment 4 | import androidx.fragment.app.FragmentManager 5 | import androidx.fragment.app.FragmentPagerAdapter 6 | @Suppress("DEPRECATION") 7 | internal class MyAdapter( 8 | var context: Context, 9 | fm: FragmentManager, 10 | var totalTabs: Int 11 | ) : 12 | FragmentPagerAdapter(fm) { 13 | override fun getItem(position: Int): Fragment { 14 | return when (position) { 15 | 0 -> { 16 | LifeLessonsFragment() 17 | } 18 | 1 -> { 19 | PlanningFragment() 20 | } 21 | else -> getItem(position) 22 | } 23 | } 24 | override fun getCount(): Int { 25 | return totalTabs 26 | } 27 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/ProTips/PlanningFragment.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.ProTips 2 | 3 | import android.os.Bundle 4 | import androidx.fragment.app.Fragment 5 | import android.view.LayoutInflater 6 | import android.view.View 7 | import android.view.ViewGroup 8 | import com.example.inout2020_aimers.R 9 | class PlanningFragment : Fragment() { 10 | override fun onCreateView( 11 | inflater: LayoutInflater, container: ViewGroup?, 12 | savedInstanceState: Bundle? 13 | ): View? { 14 | // Inflate the layout for this fragment 15 | return inflater.inflate(R.layout.fragment_planning, container, false) 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/ProTips/ProTipsActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.ProTips 2 | 3 | import androidx.appcompat.app.AppCompatActivity 4 | import android.os.Bundle 5 | import android.view.View 6 | import android.view.Window 7 | import androidx.core.content.ContextCompat 8 | import androidx.navigation.findNavController 9 | import androidx.navigation.ui.setupWithNavController 10 | import androidx.viewpager.widget.ViewPager 11 | import com.example.inout2020_aimers.R 12 | import com.google.android.material.bottomnavigation.BottomNavigationMenu 13 | import com.google.android.material.bottomnavigation.BottomNavigationView 14 | import com.google.android.material.tabs.TabLayout 15 | 16 | class ProTipsActivity : AppCompatActivity() { 17 | lateinit var tabLayout: TabLayout 18 | lateinit var viewPager: ViewPager 19 | override fun onCreate(savedInstanceState: Bundle?) { 20 | super.onCreate(savedInstanceState) 21 | setContentView(R.layout.activity_pro_tips) 22 | supportActionBar?.hide() 23 | setTheme(R.style.AppTheme) 24 | tabLayout = findViewById(R.id.tabLayout) 25 | viewPager = findViewById(R.id.viewPager) 26 | tabLayout.addTab(tabLayout.newTab().setText("Top Tips from Achievers")) 27 | tabLayout.addTab(tabLayout.newTab().setText("How to plan your day")) 28 | tabLayout.tabGravity = TabLayout.GRAVITY_FILL 29 | val adapter = MyAdapter(this, supportFragmentManager, tabLayout.tabCount) 30 | val window: Window = this.window 31 | window.statusBarColor = ContextCompat.getColor(this, R.color.colorPrimaryDark) 32 | viewPager.adapter = adapter 33 | viewPager.addOnPageChangeListener(TabLayout.TabLayoutOnPageChangeListener(tabLayout)) 34 | tabLayout.addOnTabSelectedListener(object : TabLayout.OnTabSelectedListener { 35 | override fun onTabSelected(tab: TabLayout.Tab) { 36 | viewPager.currentItem = tab.position 37 | } 38 | 39 | override fun onTabUnselected(tab: TabLayout.Tab) {} 40 | override fun onTabReselected(tab: TabLayout.Tab) {} 41 | }) 42 | } 43 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/Resources/Adapter/ResourceAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.Resources.Adapter 2 | 3 | import android.content.Intent 4 | import android.net.Uri 5 | import android.view.LayoutInflater 6 | import android.view.View 7 | import android.view.ViewGroup 8 | import androidx.recyclerview.widget.RecyclerView 9 | import com.example.inout2020_aimers.R 10 | import kotlinx.android.synthetic.main.view_resources.view.* 11 | 12 | class ResourceAdapter( 13 | var ResourceItem: MutableList 14 | 15 | ) : RecyclerView.Adapter() { 16 | inner class contentAdaterViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) 17 | 18 | override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): contentAdaterViewHolder { 19 | val view = 20 | LayoutInflater.from(parent.context).inflate(R.layout.view_resources, parent, false) 21 | return contentAdaterViewHolder(view) 22 | } 23 | 24 | override fun getItemCount(): Int = ResourceItem.size 25 | 26 | override fun onBindViewHolder(holder: contentAdaterViewHolder, position: Int) { 27 | holder.itemView.apply { 28 | resourceText.text = ResourceItem[position].text1 29 | if (position == 0) 30 | imgBook.setImageResource(R.drawable.article_a) 31 | else if (position == 1) 32 | imgBook.setImageResource(R.drawable.twenty) 33 | else if (position == 2) 34 | imgBook.setImageResource(R.drawable.article_c) 35 | else if (position == 3) 36 | imgBook.setImageResource(R.drawable.article_d) 37 | else if (position == 4) 38 | imgBook.setImageResource(R.drawable.article_e) 39 | else if (position == 5) 40 | imgBook.setImageResource(R.drawable.article_f) 41 | else if (position == 6) 42 | imgBook.setImageResource(R.drawable.frog) 43 | else if (position == 7) 44 | imgBook.setImageResource(R.drawable.deep_work) 45 | else if (position == 8) 46 | imgBook.setImageResource(R.drawable.obstacle) 47 | else if (position == 9) 48 | imgBook.setImageResource(R.drawable.habit) 49 | else if (position == 10) 50 | imgBook.setImageResource(R.drawable.ikigai) 51 | else if (position == 11) 52 | imgBook.setImageResource(R.drawable.no_excuse) 53 | else if (position == 12) 54 | imgBook.setImageResource(R.drawable.power) 55 | else if (position == 13) 56 | imgBook.setImageResource(R.drawable.war_of_art) 57 | } 58 | holder.itemView.setOnClickListener { 59 | onItemClickListener?.let { 60 | it(ResourceItem[position].url) 61 | } 62 | } 63 | } 64 | 65 | private var onItemClickListener:((String)->Unit)? = null 66 | 67 | fun setOnItemClickListner(listener:(String) -> Unit){ 68 | onItemClickListener = listener 69 | } 70 | 71 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/Resources/ResourceWebFragment.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.Resources 2 | 3 | import android.os.Bundle 4 | import androidx.fragment.app.Fragment 5 | import android.view.LayoutInflater 6 | import android.view.View 7 | import android.view.ViewGroup 8 | import android.webkit.WebViewClient 9 | import androidx.navigation.fragment.navArgs 10 | import com.example.inout2020_aimers.R 11 | import kotlinx.android.synthetic.main.fragment_resource_web.* 12 | 13 | 14 | class ResourceWebFragment : Fragment(R.layout.fragment_resource_web) { 15 | 16 | val args : ResourceWebFragmentArgs by navArgs() 17 | 18 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { 19 | super.onViewCreated(view, savedInstanceState) 20 | 21 | val url = args.url 22 | 23 | webViewResource.apply { 24 | webViewClient = WebViewClient() 25 | loadUrl(url) 26 | } 27 | 28 | } 29 | 30 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/Resources/Resources.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.Resources 2 | 3 | data class Resources( 4 | var text1:String, 5 | var url: String 6 | ) -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/Viewpager/AppIntroFragment.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.Viewpager 2 | 3 | import android.os.Bundle 4 | import androidx.fragment.app.Fragment 5 | import android.view.LayoutInflater 6 | import android.view.View 7 | import android.view.ViewGroup 8 | import com.example.inout2020_aimers.R 9 | class AppIntroFragment : Fragment() { 10 | override fun onCreateView( 11 | inflater: LayoutInflater, container: ViewGroup?, 12 | savedInstanceState: Bundle? 13 | ): View? { 14 | // Inflate the layout for this fragment 15 | return inflater.inflate(R.layout.fragment_app_intro, container, false) 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/Viewpager/BucketIntroFragment.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.Viewpager 2 | 3 | import android.os.Bundle 4 | import androidx.fragment.app.Fragment 5 | import android.view.LayoutInflater 6 | import android.view.View 7 | import android.view.ViewGroup 8 | import com.example.inout2020_aimers.R 9 | 10 | class BucketIntroFragment : Fragment() { 11 | override fun onCreateView( 12 | inflater: LayoutInflater, container: ViewGroup?, 13 | savedInstanceState: Bundle? 14 | ): View? { 15 | // Inflate the layout for this fragment 16 | return inflater.inflate(R.layout.fragment_bucket_intro, container, false) 17 | } 18 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/Viewpager/GoalsIntroFragment.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.Viewpager 2 | 3 | import android.os.Bundle 4 | import androidx.fragment.app.Fragment 5 | import android.view.LayoutInflater 6 | import android.view.View 7 | import android.view.ViewGroup 8 | import com.example.inout2020_aimers.R 9 | class GoalsIntroFragment : Fragment() { 10 | override fun onCreateView( 11 | inflater: LayoutInflater, container: ViewGroup?, 12 | savedInstanceState: Bundle? 13 | ): View? { 14 | // Inflate the layout for this fragment 15 | return inflater.inflate(R.layout.fragment_goals_intro, container, false) 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/Viewpager/TipsIntroFragment.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.Viewpager 2 | 3 | import android.os.Bundle 4 | import androidx.fragment.app.Fragment 5 | import android.view.LayoutInflater 6 | import android.view.View 7 | import android.view.ViewGroup 8 | import com.example.inout2020_aimers.R 9 | class TipsIntroFragment : Fragment() { 10 | override fun onCreateView( 11 | inflater: LayoutInflater, container: ViewGroup?, 12 | savedInstanceState: Bundle? 13 | ): View? { 14 | // Inflate the layout for this fragment 15 | return inflater.inflate(R.layout.fragment_tips_intro, container, false) 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/WeeklyPlanner/Database/Day.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.WeeklyPlanner.Database 2 | 3 | import android.os.Parcelable 4 | import androidx.room.Entity 5 | import androidx.room.PrimaryKey 6 | import kotlinx.android.parcel.Parcelize 7 | 8 | @Entity(tableName = "week_table") 9 | data class Day( 10 | @PrimaryKey(autoGenerate = true) var dayId: Long = 0L, 11 | var dayTask: String = "", 12 | var dayName: String="", 13 | var id:Int=0, 14 | var done:Int=0 15 | ) -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/WeeklyPlanner/Database/DayDao.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.WeeklyPlanner.Database 2 | 3 | import androidx.lifecycle.LiveData 4 | import androidx.room.* 5 | 6 | @Dao 7 | interface DayDao 8 | { 9 | @Query("SELECT * FROM week_table ORDER BY id ") 10 | fun getAllProfile(): LiveData> 11 | 12 | @Insert 13 | fun insertDay(vararg day: Day) 14 | 15 | @Delete 16 | fun deleteDay(vararg day: Day) 17 | 18 | @Update 19 | fun updateDay(vararg day: Day) 20 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/WeeklyPlanner/Database/DayRepository.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.WeeklyPlanner.Database 2 | 3 | import androidx.annotation.WorkerThread 4 | import androidx.lifecycle.LiveData 5 | 6 | 7 | class DayRepository (private val dayDao: DayDao) { 8 | 9 | val allDays: LiveData> = dayDao.getAllProfile() 10 | 11 | @WorkerThread 12 | fun insert(day: Day) { 13 | dayDao.insertDay(day) 14 | } 15 | 16 | @WorkerThread 17 | fun delete(day: Day) { 18 | dayDao.deleteDay(day) 19 | } 20 | @WorkerThread 21 | fun update(day: Day) { 22 | dayDao.updateDay(day) 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/WeeklyPlanner/Database/DayRoomDatabase.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.WeeklyPlanner.Database 2 | 3 | import android.content.Context 4 | import androidx.room.Database 5 | import androidx.room.Room 6 | import androidx.room.RoomDatabase 7 | 8 | @Database(entities = [Day::class], version = 2) 9 | abstract class DayRoomDatabase : RoomDatabase() { 10 | 11 | abstract fun dayDao(): DayDao 12 | 13 | companion object { 14 | @Volatile 15 | private var INSTANCE: DayRoomDatabase? = null 16 | 17 | fun getDatabase(context: Context): DayRoomDatabase { 18 | val tempInstance = INSTANCE 19 | if (tempInstance != null) { 20 | return tempInstance 21 | } 22 | synchronized(this) { 23 | val instance = Room.databaseBuilder( 24 | context.applicationContext, 25 | DayRoomDatabase::class.java, 26 | "Day_Database" 27 | ).build() 28 | INSTANCE = instance 29 | return instance 30 | } 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/WeeklyPlanner/Database/DayViewModel.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.WeeklyPlanner.Database 2 | 3 | import android.app.Application 4 | import androidx.lifecycle.AndroidViewModel 5 | import androidx.lifecycle.LiveData 6 | import androidx.lifecycle.MutableLiveData 7 | import kotlinx.coroutines.CoroutineScope 8 | import kotlinx.coroutines.Dispatchers 9 | import kotlinx.coroutines.Job 10 | import kotlinx.coroutines.launch 11 | 12 | 13 | class DayViewModel (application: Application) : AndroidViewModel(Application()) { 14 | 15 | private var parentJob = Job() 16 | private val scope = CoroutineScope(parentJob + Dispatchers.Main) 17 | 18 | private val repository: DayRepository 19 | val allDays: LiveData> 20 | val mListLivedata = MutableLiveData>() 21 | 22 | init { 23 | val listDao = DayRoomDatabase.getDatabase(application).dayDao() 24 | repository = DayRepository(listDao) 25 | allDays = repository.allDays 26 | } 27 | 28 | fun insert(day: Day) = scope.launch(Dispatchers.IO) { 29 | repository.insert(day) 30 | } 31 | 32 | fun getNewLivedata(newList: ArrayList) { 33 | 34 | for(i in newList){ 35 | i.dayTask="" 36 | i.done= 0 37 | delete(i) 38 | } 39 | val day0 = Day( 40 | dayTask = "", 41 | dayName = "MONDAY", 42 | id = 0 43 | ) 44 | val day1 = Day( 45 | dayTask = "", 46 | dayName = "TUESDAY", 47 | id = 1 48 | ) 49 | val day2 = Day( 50 | dayTask = "", 51 | dayName = "WEDNESDAY", 52 | id = 2 53 | ) 54 | val day3 = Day( 55 | dayTask = "", 56 | dayName = "THURSDAY", 57 | id = 3 58 | ) 59 | val day4 = Day( 60 | dayTask = "", 61 | dayName = "FRIDAY", 62 | id = 4 63 | ) 64 | val day5 = Day( 65 | dayTask = "", 66 | dayName = "SATURDAY", 67 | id = 5 68 | ) 69 | val day6 = Day( 70 | dayTask = "", 71 | dayName = "SUNDAY", 72 | id = 6 73 | ) 74 | insert(day0) 75 | insert(day1) 76 | insert(day2) 77 | insert(day3) 78 | insert(day4) 79 | insert(day5) 80 | insert(day6) 81 | 82 | 83 | } 84 | 85 | fun delete(day: Day) = scope.launch(Dispatchers.IO) { 86 | repository.delete(day) 87 | } 88 | 89 | fun update(day: Day) = scope.launch(Dispatchers.IO) { 90 | repository.update(day) 91 | } 92 | 93 | override fun onCleared() { 94 | super.onCleared() 95 | parentJob.cancel() 96 | } 97 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/appblock/AppListModel.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.appblock 2 | 3 | import android.graphics.drawable.Drawable 4 | 5 | data class AppListModel( 6 | val icon : Drawable, 7 | val packageName : String, 8 | val name : String 9 | ) 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/appblock/blockService/BlockActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.appblock.blockService 2 | 3 | import androidx.appcompat.app.AppCompatActivity 4 | import android.os.Bundle 5 | import android.os.CountDownTimer 6 | import android.util.Log 7 | import com.example.inout2020_aimers.R 8 | import com.example.inout2020_aimers.databinding.ActivityBlockBinding 9 | import kotlinx.android.synthetic.main.activity_block.* 10 | 11 | class BlockActivity : AppCompatActivity() { 12 | private val TAG = "BlockActivity" 13 | override fun onCreate(savedInstanceState: Bundle?) { 14 | super.onCreate(savedInstanceState) 15 | setContentView(R.layout.activity_block) 16 | 17 | val timeLeft = intent.getLongExtra("timeLeftUnblock",0) 18 | Log.d(TAG, "onCreate: timeLeft -> $timeLeft") 19 | 20 | 21 | val countDownTimer = object : CountDownTimer(timeLeft+2000,1000){ 22 | override fun onTick(p0: Long) { 23 | Log.d(TAG, "onTick in block activity: $p0") 24 | val inSec = p0/1000 25 | tvBlockActTimer.text = inSec.toString() 26 | } 27 | 28 | override fun onFinish() { 29 | Log.d(TAG, "onFinish: FINISHED") 30 | tvBlockActTimer.text = "Finished" 31 | moveTaskToBack(true) 32 | } 33 | } 34 | countDownTimer.start() 35 | 36 | } 37 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/appblock/database/AppsDao.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.appblock.database 2 | 3 | import androidx.lifecycle.LiveData 4 | import androidx.room.* 5 | 6 | @Dao 7 | interface AppsDao { 8 | 9 | @Insert(onConflict = OnConflictStrategy.REPLACE) 10 | suspend fun upsert(item : BlockedApps) 11 | 12 | @Delete 13 | suspend fun delete(item : BlockedApps) 14 | 15 | @Query("SELECT * FROM tbl_blockedApps") 16 | fun getBlockedApps() : LiveData> 17 | 18 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/appblock/database/BlockedApps.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.appblock.database 2 | 3 | import androidx.room.Entity 4 | import androidx.room.PrimaryKey 5 | import java.io.Serializable 6 | 7 | @Entity(tableName = "tbl_blockedApps") 8 | class BlockedApps ( 9 | @PrimaryKey(autoGenerate = false) 10 | val packageName : String 11 | ) : Serializable{ 12 | 13 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/appblock/database/BlockedAppsRepository.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.appblock.database 2 | 3 | class BlockedAppsRepository( 4 | private val db : BlockerDatabase 5 | ) { 6 | 7 | suspend fun upsert(item:BlockedApps) = db.getAppsDao().upsert(item) 8 | 9 | suspend fun delete(item: BlockedApps) = db.getAppsDao().delete(item) 10 | 11 | fun getBlockedApps() = db.getAppsDao().getBlockedApps() 12 | 13 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/appblock/database/BlockerDatabase.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.appblock.database 2 | 3 | import android.content.Context 4 | import androidx.room.Database 5 | import androidx.room.Room 6 | import androidx.room.RoomDatabase 7 | 8 | @Database(entities = [BlockedApps::class], version = 1) 9 | abstract class BlockerDatabase : RoomDatabase() { 10 | 11 | abstract fun getAppsDao() : AppsDao 12 | 13 | companion object{ 14 | 15 | private var instance : BlockerDatabase? = null 16 | private val LOCK = Any() 17 | 18 | operator fun invoke(context : Context) = instance?: synchronized(LOCK){ 19 | instance ?: createDatabase(context).also{ instance = it} 20 | } 21 | 22 | private fun createDatabase(context: Context) = 23 | Room.databaseBuilder(context.applicationContext, 24 | BlockerDatabase::class.java, 25 | "apps_database" 26 | ).build() 27 | 28 | 29 | } 30 | 31 | 32 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/appblock/util/AppsAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.appblock.util 2 | 3 | import android.view.LayoutInflater 4 | import android.view.View 5 | import android.view.ViewGroup 6 | import androidx.recyclerview.widget.RecyclerView 7 | import com.example.inout2020_aimers.R 8 | import com.example.inout2020_aimers.appblock.AppListModel 9 | import com.example.inout2020_aimers.appblock.database.BlockedApps 10 | import kotlinx.android.synthetic.main.item_select_apps.view.* 11 | 12 | class AppsAdapter( 13 | private val appList : ArrayList, 14 | private val viewModel: BlockerViewModel, 15 | private val blockedApps : ArrayList 16 | ) : RecyclerView.Adapter() { 17 | 18 | inner class AppsViewHolder(itemView : View) : RecyclerView.ViewHolder(itemView) 19 | 20 | private val TAG = "AppsAdapter" 21 | 22 | override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): AppsViewHolder { 23 | return AppsViewHolder( 24 | LayoutInflater.from(parent.context).inflate( 25 | R.layout.item_select_apps, 26 | parent, 27 | false 28 | ) 29 | ) 30 | } 31 | 32 | override fun onBindViewHolder(holder: AppsViewHolder, position: Int) { 33 | 34 | val currentItem = appList[position] 35 | 36 | holder.setIsRecyclable(false) 37 | 38 | holder.itemView.apply { 39 | 40 | itemAppIcon.setImageDrawable(currentItem.icon) 41 | itemAppname.text = currentItem.name 42 | 43 | for (app in blockedApps){ 44 | if (app.packageName == currentItem.packageName){ 45 | itemAppCheckbox.isChecked = true 46 | break 47 | } 48 | } 49 | 50 | 51 | itemAppCheckbox.setOnCheckedChangeListener { compoundButton, b -> 52 | 53 | if (b){ 54 | viewModel.upsert(BlockedApps(currentItem.packageName)) 55 | }else{ 56 | viewModel.delete(BlockedApps(currentItem.packageName)) 57 | } 58 | 59 | } 60 | 61 | 62 | } 63 | } 64 | 65 | override fun getItemCount(): Int { 66 | return appList.size 67 | } 68 | 69 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/appblock/util/BlockerVMF.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.appblock.util 2 | 3 | import androidx.lifecycle.ViewModel 4 | import androidx.lifecycle.ViewModelProvider 5 | import com.example.inout2020_aimers.appblock.database.BlockedAppsRepository 6 | 7 | class BlockerVMF( 8 | private val repository: BlockedAppsRepository 9 | ) : ViewModelProvider.NewInstanceFactory(){ 10 | 11 | override fun create(modelClass: Class): T { 12 | return BlockerViewModel(repository) as T 13 | } 14 | 15 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/appblock/util/BlockerViewModel.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.appblock.util 2 | 3 | import androidx.lifecycle.ViewModel 4 | import com.example.inout2020_aimers.appblock.database.BlockedApps 5 | import com.example.inout2020_aimers.appblock.database.BlockedAppsRepository 6 | import kotlinx.coroutines.CoroutineScope 7 | import kotlinx.coroutines.Dispatchers 8 | import kotlinx.coroutines.launch 9 | 10 | class BlockerViewModel( 11 | private val repository : BlockedAppsRepository 12 | ) : ViewModel(){ 13 | 14 | fun upsert(item : BlockedApps) = CoroutineScope(Dispatchers.IO).launch { 15 | repository.upsert(item) 16 | } 17 | 18 | fun delete(item: BlockedApps) = CoroutineScope(Dispatchers.IO).launch { 19 | repository.delete(item) 20 | } 21 | 22 | fun getBlockedApps() = repository.getBlockedApps() 23 | 24 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/bucket/BucketList/AddItemFragment.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.bucket.BucketList 2 | 3 | import android.os.Bundle 4 | import androidx.fragment.app.Fragment 5 | import android.view.LayoutInflater 6 | import android.view.View 7 | import android.view.ViewGroup 8 | import androidx.lifecycle.ViewModelProviders 9 | import androidx.navigation.fragment.findNavController 10 | import com.example.inout2020_aimers.R 11 | import com.example.inout2020_aimers.bucket.Database.Bucket 12 | import com.example.inout2020_aimers.bucket.Database.ListViewModel 13 | import com.example.inout2020_aimers.databinding.FragmentAddItemBinding 14 | import com.example.inout2020_aimers.utils.Snacker 15 | import com.google.android.material.snackbar.Snackbar 16 | 17 | class AddItemFragment : Fragment() { 18 | private lateinit var listViewModel: ListViewModel 19 | private var _binding: FragmentAddItemBinding? = null 20 | private val binding 21 | get() = _binding!! 22 | override fun onCreateView( 23 | inflater: LayoutInflater, container: ViewGroup?, 24 | savedInstanceState: Bundle? 25 | ): View? { 26 | // Inflate the layout for this fragment 27 | _binding = FragmentAddItemBinding.inflate(inflater, container, false) 28 | binding.makeList.setOnClickListener { 29 | listViewModel = ViewModelProviders.of(this).get(ListViewModel::class.java) 30 | if(binding.userToDoEditText.text.toString() == ""){ 31 | Snacker(it,"This Field can't be empty").error() 32 | } 33 | else { 34 | val bucket = Bucket( 35 | task = binding.userToDoEditText.text.toString(), 36 | check = false 37 | ) 38 | bucket.listId = System.currentTimeMillis() 39 | listViewModel.insert(bucket) 40 | findNavController().navigate(R.id.action_addItemFragment_to_displayFragment) 41 | } 42 | } 43 | return binding.root 44 | } 45 | 46 | override fun onDestroyView() { 47 | super.onDestroyView() 48 | _binding = null 49 | } 50 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/bucket/Database/Bucket.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.bucket.Database 2 | 3 | import androidx.room.Entity 4 | import androidx.room.PrimaryKey 5 | 6 | @Entity(tableName = "bucket_list_table") 7 | data class Bucket( 8 | @PrimaryKey(autoGenerate = true) var listId: Long = 0L, 9 | var task: String = "", 10 | var check: Boolean = false 11 | ) -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/bucket/Database/ListDao.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.bucket.Database 2 | 3 | import androidx.lifecycle.LiveData 4 | import androidx.room.* 5 | 6 | @Dao 7 | interface ListDao 8 | { 9 | @Query("SELECT * FROM bucket_list_table") 10 | fun getAllProfile(): LiveData> 11 | 12 | @Insert 13 | fun insertBucket(vararg bucket: Bucket) 14 | 15 | @Delete 16 | fun deleteBucket(vararg bucket: Bucket) 17 | 18 | @Update 19 | fun updateBucket(vararg bucket: Bucket) 20 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/bucket/Database/ListRepository.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.bucket.Database 2 | 3 | import androidx.annotation.WorkerThread 4 | import androidx.lifecycle.LiveData 5 | 6 | class ListRepository(private val listDao: ListDao) { 7 | 8 | val allLists: LiveData> = listDao.getAllProfile() 9 | 10 | @WorkerThread 11 | fun insert(bucket: Bucket) { 12 | listDao.insertBucket(bucket) 13 | } 14 | 15 | @WorkerThread 16 | fun delete(bucket: Bucket) { 17 | listDao.deleteBucket(bucket) 18 | } 19 | @WorkerThread 20 | fun update(bucket: Bucket) { 21 | listDao.updateBucket(bucket) 22 | } 23 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/bucket/Database/ListRoomDatabase.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.bucket.Database 2 | 3 | import android.content.Context 4 | import androidx.room.Database 5 | import androidx.room.Room 6 | import androidx.room.RoomDatabase 7 | 8 | @Database(entities = [Bucket::class], version = 1) 9 | abstract class ListRoomDatabase: RoomDatabase() { 10 | 11 | abstract fun listDao(): ListDao 12 | 13 | companion object { 14 | @Volatile 15 | private var INSTANCE: ListRoomDatabase? = null 16 | 17 | fun getDatabase(context: Context): ListRoomDatabase { 18 | val tempInstance = INSTANCE 19 | if (tempInstance != null) { 20 | return tempInstance 21 | } 22 | synchronized(this) { 23 | val instance = Room.databaseBuilder( 24 | context.applicationContext, 25 | ListRoomDatabase::class.java, 26 | "List_Database" 27 | ).build() 28 | INSTANCE = instance 29 | return instance 30 | } 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/bucket/Database/ListViewModel.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.bucket.Database 2 | 3 | import android.app.Application 4 | import androidx.lifecycle.AndroidViewModel 5 | import androidx.lifecycle.LiveData 6 | import kotlinx.coroutines.CoroutineScope 7 | import kotlinx.coroutines.Dispatchers 8 | import kotlinx.coroutines.Job 9 | import kotlinx.coroutines.launch 10 | 11 | class ListViewModel(application: Application) : AndroidViewModel(Application()) { 12 | 13 | private var parentJob = Job() 14 | private val scope = CoroutineScope(parentJob + Dispatchers.Main) 15 | 16 | private val repository: ListRepository 17 | val allLists: LiveData> 18 | 19 | init { 20 | val listDao = ListRoomDatabase.getDatabase(application).listDao() 21 | repository = ListRepository(listDao) 22 | allLists = repository.allLists 23 | } 24 | 25 | fun insert(bucket: Bucket) = scope.launch(Dispatchers.IO) { 26 | repository.insert(bucket) 27 | } 28 | 29 | fun delete(bucket: Bucket) = scope.launch(Dispatchers.IO) { 30 | repository.delete(bucket) 31 | } 32 | 33 | fun update(bucket: Bucket) = scope.launch(Dispatchers.IO) { 34 | repository.update(bucket) 35 | } 36 | 37 | override fun onCleared() { 38 | super.onCleared() 39 | parentJob.cancel() 40 | } 41 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/ui/AccountFragment.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.ui 2 | 3 | import android.os.Bundle 4 | import androidx.fragment.app.Fragment 5 | import android.view.LayoutInflater 6 | import android.view.View 7 | import android.view.ViewGroup 8 | import com.example.inout2020_aimers.R 9 | 10 | 11 | class AccountFragment : Fragment(R.layout.fragment_account) { 12 | 13 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/ui/HomeActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.ui 2 | 3 | import androidx.appcompat.app.AppCompatActivity 4 | import android.os.Bundle 5 | import android.view.View 6 | import androidx.navigation.findNavController 7 | import androidx.navigation.ui.setupWithNavController 8 | import com.example.inout2020_aimers.R 9 | import com.example.inout2020_aimers.databinding.ActivityHomeBinding 10 | 11 | class HomeActivity : AppCompatActivity() { 12 | 13 | private lateinit var binding: ActivityHomeBinding 14 | 15 | override fun onCreate(savedInstanceState: Bundle?) { 16 | super.onCreate(savedInstanceState) 17 | 18 | binding = ActivityHomeBinding.inflate(layoutInflater) 19 | val view = binding.root 20 | setTheme(R.style.AppTheme) 21 | setContentView(view) 22 | val navHost = findViewById(R.id.navHostFragmentHome) 23 | 24 | binding.bottomNav.setupWithNavController(navHost.findNavController()) 25 | 26 | } 27 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/ui/ProtipFragment.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.ui 2 | 3 | import android.os.Bundle 4 | import androidx.fragment.app.Fragment 5 | import android.view.LayoutInflater 6 | import android.view.View 7 | import android.view.ViewGroup 8 | import com.example.inout2020_aimers.R 9 | 10 | 11 | class ProtipFragment : Fragment(R.layout.fragment_protip) { 12 | 13 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/ui/auth/AuthActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.ui.auth 2 | 3 | import androidx.appcompat.app.AppCompatActivity 4 | import android.os.Bundle 5 | import com.example.inout2020_aimers.R 6 | import com.google.firebase.FirebaseApp 7 | 8 | class AuthActivity : AppCompatActivity() { 9 | override fun onCreate(savedInstanceState: Bundle?) { 10 | super.onCreate(savedInstanceState) 11 | setTheme(R.style.AppTheme) 12 | setContentView(R.layout.activity_auth) 13 | 14 | FirebaseApp.initializeApp(applicationContext) 15 | } 16 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/ui/auth/EmailVerificationFragment.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.ui.auth 2 | 3 | import android.content.Intent 4 | import android.os.Bundle 5 | import android.util.Log 6 | import androidx.fragment.app.Fragment 7 | import android.view.LayoutInflater 8 | import android.view.View 9 | import android.view.ViewGroup 10 | import com.example.inout2020_aimers.R 11 | import com.example.inout2020_aimers.databinding.FragmentEmailVerificationActivityBinding 12 | import com.example.inout2020_aimers.ui.HomeActivity 13 | import com.example.inout2020_aimers.utils.Snacker 14 | import com.google.firebase.auth.FirebaseAuth 15 | import kotlinx.coroutines.CoroutineScope 16 | import kotlinx.coroutines.Dispatchers 17 | import kotlinx.coroutines.android.awaitFrame 18 | import kotlinx.coroutines.launch 19 | 20 | 21 | class EmailVerificationFragment : Fragment(R.layout.fragment_email_verification_activity) { 22 | 23 | private val TAG = "EmailVerificationActivity" 24 | private lateinit var auth : FirebaseAuth 25 | private lateinit var binding:FragmentEmailVerificationActivityBinding 26 | override fun onCreate(savedInstanceState: Bundle?) { 27 | super.onCreate(savedInstanceState) 28 | 29 | auth = FirebaseAuth.getInstance() 30 | 31 | } 32 | 33 | 34 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { 35 | super.onViewCreated(view, savedInstanceState) 36 | 37 | val user = auth.currentUser 38 | val userMail = user!!.email 39 | 40 | binding = FragmentEmailVerificationActivityBinding.bind(view) 41 | binding.tvMail.text = userMail 42 | 43 | 44 | // Continue button 45 | binding.btnContinue.setOnClickListener { 46 | 47 | setLoading() 48 | 49 | user!!.reload().addOnSuccessListener { 50 | // Checking if user has verified email 51 | if (user!!.isEmailVerified){ 52 | 53 | Log.d(TAG, "onViewCreated: User has verified email") 54 | 55 | // Navigating to HomeActivity 56 | Intent(requireContext(), HomeActivity::class.java).also { 57 | it.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK 58 | startActivity(it) 59 | } 60 | 61 | }else{ 62 | unSetLaoding() 63 | Snacker(view,"Please verify mail to continue").error() 64 | } 65 | } 66 | 67 | } 68 | 69 | // Resend button 70 | binding.btnResendMail.setOnClickListener { 71 | 72 | setLoading() 73 | 74 | if (user?.isEmailVerified == false){ 75 | user.sendEmailVerification().addOnSuccessListener { 76 | Snacker(view,"Verification mail sent").success() 77 | unSetLaoding() 78 | } 79 | .addOnFailureListener { 80 | Snacker(view,"Something went wrong").error() 81 | unSetLaoding() 82 | } 83 | } 84 | 85 | 86 | } 87 | 88 | } 89 | 90 | private fun setLoading(){ 91 | binding.progressBar.visibility = View.VISIBLE 92 | } 93 | 94 | private fun unSetLaoding(){ 95 | binding.progressBar.visibility = View.GONE 96 | } 97 | 98 | 99 | 100 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/inout2020_aimers/utils/Snacker.kt: -------------------------------------------------------------------------------- 1 | package com.example.inout2020_aimers.utils 2 | 3 | import android.graphics.Color 4 | import android.view.View 5 | import androidx.core.content.ContextCompat 6 | import com.example.inout2020_aimers.R 7 | import com.google.android.material.snackbar.Snackbar 8 | 9 | class Snacker(val view : View, val text : String) { 10 | 11 | fun success(){ 12 | return Snackbar.make(view,text,Snackbar.LENGTH_SHORT) 13 | .setBackgroundTint(ContextCompat.getColor(view.context,R.color.colorSuccess)) 14 | .setTextColor(ContextCompat.getColor(view.context,R.color.white)) 15 | .show() 16 | } 17 | 18 | fun error(){ 19 | return Snackbar.make(view,text,Snackbar.LENGTH_SHORT) 20 | .setBackgroundTint(ContextCompat.getColor(view.context,R.color.colorError)) 21 | .setTextColor(ContextCompat.getColor(view.context,R.color.white)) 22 | .show() 23 | } 24 | 25 | fun warning(){ 26 | return Snackbar.make(view,text,Snackbar.LENGTH_SHORT) 27 | .setBackgroundTint(ContextCompat.getColor(view.context,R.color.colorWarning)) 28 | .setTextColor(ContextCompat.getColor(view.context,R.color.white)) 29 | .show() 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /app/src/main/res/anim/from_left.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/anim/from_right.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/anim/to_left.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/anim/to_right.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/alarm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/alarm.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/badge.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/bucket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/bucket.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/calendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/calendar.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/calendar_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/calendar_b.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/deadline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/deadline.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/diet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/diet.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/direction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/direction.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/e.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ex_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/ex_a.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ex_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/ex_b.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/exercise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/exercise.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/finish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/finish.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/flag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/flag.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/gallery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/gallery.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/habit.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/habit.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 18 | 21 | 22 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ikigai.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/ikigai.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/lazy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/lazy.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/learn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/learn.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/leftdirection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/leftdirection.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/map.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/music.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/night.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/night.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/no_excuse.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/no_excuse.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/positive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/positive.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/power.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/power.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/quit.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/quit.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/res.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/res.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/rounded.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/rounded_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/se.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/se.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/sleep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/sleep.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/stress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/stress.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/success.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/sw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/sw.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/target.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/target.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/todo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/todo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/twenty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/twenty.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/two.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/two.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/water.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-v24/water.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/article_a.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-xxhdpi/article_a.jpeg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/article_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-xxhdpi/article_c.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/article_d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-xxhdpi/article_d.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/block_intro.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-xxhdpi/block_intro.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bucket_intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-xxhdpi/bucket_intro.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ex_aa.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-xxhdpi/ex_aa.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ex_bb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-xxhdpi/ex_bb.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ex_cc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-xxhdpi/ex_cc.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ex_dd.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-xxhdpi/ex_dd.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ex_ee.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-xxhdpi/ex_ee.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ex_gg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-xxhdpi/ex_gg.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ex_hh.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-xxhdpi/ex_hh.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/goal_intro.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-xxhdpi/goal_intro.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/mountains.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-xxhdpi/mountains.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/natrajsana.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-xxhdpi/natrajsana.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/paschimottasana.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-xxhdpi/paschimottasana.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-xxhdpi/pause.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/pb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-xxhdpi/pb.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-xxhdpi/r.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-xxhdpi/stop.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/tdraw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-xxhdpi/tdraw.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/tips_intro.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-xxhdpi/tips_intro.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/virasana.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-xxhdpi/virasana.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/vrik.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable-xxhdpi/vrik.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/article_e.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable/article_e.PNG -------------------------------------------------------------------------------- /app/src/main/res/drawable/article_f.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable/article_f.PNG -------------------------------------------------------------------------------- /app/src/main/res/drawable/avd_bin_open_close_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 11 | 12 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 30 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bulb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable/bulb.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/deep_work.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable/deep_work.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/ex_ff.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable/ex_ff.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/frog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable/frog.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_app_icon_foreground.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_account_circle_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_add_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_alternate_email_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_app_blocking_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_apps_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_arrow_back_ios_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_block_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_check_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_check_circle_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_edit_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_fiber_manual_record_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_home_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_music_note_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_settings_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_vpn_key_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_warning_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_bucketlist.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_cancel.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_dtc_logo.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_dtc_logo_white.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_exercise.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_milestone.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_motivation.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 15 | 18 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_protip.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_refresh.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_resources.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/obstacle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable/obstacle.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/rect.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/rectangle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/splash_image.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/war_of_art.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable/war_of_art.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/weekly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/drawable/weekly.png -------------------------------------------------------------------------------- /app/src/main/res/font/fonts.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/font/mont_black_italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/font/mont_black_italic.ttf -------------------------------------------------------------------------------- /app/src/main/res/font/montserrat_black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/font/montserrat_black.ttf -------------------------------------------------------------------------------- /app/src/main/res/font/montserrat_bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/font/montserrat_bold.ttf -------------------------------------------------------------------------------- /app/src/main/res/font/montserrat_bolditalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/font/montserrat_bolditalic.ttf -------------------------------------------------------------------------------- /app/src/main/res/font/montserrat_light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/font/montserrat_light.ttf -------------------------------------------------------------------------------- /app/src/main/res/font/montserrat_medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coder2699/Dare2Change/d102310312e3488a780b35ce02c8c229e732b81e/app/src/main/res/font/montserrat_medium.ttf -------------------------------------------------------------------------------- /app/src/main/res/font/pacifico.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_auth.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_home.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | 25 | 26 | 27 | 28 | 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | 12 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_pro_tips.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 23 | 24 | 25 | 26 | 34 | 35 | 42 | -------------------------------------------------------------------------------- /app/src/main/res/layout/dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 18 | 19 | 27 | 28 |