├── .github └── workflows │ └── test.yml ├── .gitignore ├── .idea ├── .name ├── codeStyles │ ├── Project.xml │ └── codeStyleConfig.xml ├── gradle.xml ├── jarRepositories.xml ├── misc.xml ├── runConfigurations.xml └── vcs.xml ├── Images ├── 1.jpeg ├── 2.jpeg ├── 3.jpeg ├── 4.jpeg ├── 5.jpeg ├── 6.jpeg └── Readme ├── README.md ├── app ├── .gitignore ├── build.gradle ├── build │ └── outputs │ │ └── apk │ │ └── debug │ │ └── app-debug.apk ├── proguard-rules.pro ├── release │ └── app-release.aab └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── thelazypeople │ │ └── algorithmvisualizer │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── assets │ │ ├── back.json │ │ ├── graph.json │ │ ├── scroll_down_animation.json │ │ └── splashs.json │ ├── ic_launcher-playstore.png │ ├── java │ │ └── com │ │ │ └── thelazypeople │ │ │ └── algorithmvisualizer │ │ │ ├── FragmentAdapter.kt │ │ │ ├── GithubDetails.kt │ │ │ ├── MainActivity.kt │ │ │ ├── SplashScreen.kt │ │ │ ├── Transformations.kt │ │ │ ├── VerticalViewPager.kt │ │ │ ├── ViewAdapter.kt │ │ │ ├── graph │ │ │ ├── GraphActivity.kt │ │ │ ├── GraphTutorialActivity.kt │ │ │ ├── LineView.kt │ │ │ └── tutorial │ │ │ │ ├── FifthFragment.kt │ │ │ │ ├── FourthFragment.kt │ │ │ │ ├── SecondFragment.kt │ │ │ │ ├── ThreeFragment.kt │ │ │ │ └── firstFragment.kt │ │ │ ├── home │ │ │ ├── ContentFragment.kt │ │ │ └── HomeFragment.kt │ │ │ ├── kmp │ │ │ └── KmpActivity.kt │ │ │ ├── markov │ │ │ ├── MarkovActivity.kt │ │ │ ├── MarkovTutorialActivity.kt │ │ │ ├── SuggestionsActivity.kt │ │ │ ├── TrainingDataKeeper.kt │ │ │ └── tutorial │ │ │ │ ├── Markov1Fragment.kt │ │ │ │ ├── Markov2Fragment.kt │ │ │ │ ├── Markov3Fragment.kt │ │ │ │ └── Markov4Fragment.kt │ │ │ ├── nQueen │ │ │ ├── ShowSolnActivity.kt │ │ │ ├── VisualizationActivity.kt │ │ │ ├── nQueenActivity.kt │ │ │ └── solutionMatrix.kt │ │ │ ├── pathfinder │ │ │ ├── PathFinderActivity.kt │ │ │ ├── TutorialActivity.kt │ │ │ ├── dijik.kt │ │ │ └── tutorialui │ │ │ │ ├── fiveFragment.kt │ │ │ │ ├── fourFragment.kt │ │ │ │ ├── oneFragment.kt │ │ │ │ ├── threeFragment.kt │ │ │ │ └── twoFragment.kt │ │ │ ├── searching │ │ │ └── SearchingActivity.kt │ │ │ └── sorting │ │ │ └── SortingActivity.kt │ └── res │ │ ├── drawable-hdpi │ │ ├── down.png │ │ ├── location.png │ │ └── up.png │ │ ├── drawable-mdpi │ │ ├── down.png │ │ ├── location.png │ │ └── up.png │ │ ├── drawable-v24 │ │ ├── background.jpeg │ │ ├── circuit.png │ │ ├── crown.png │ │ ├── edit.xml │ │ ├── grammar.png │ │ ├── ic_add.xml │ │ ├── ic_circle.xml │ │ ├── ic_circle_vol_1circle.xml │ │ ├── ic_criss_cross.xml │ │ ├── ic_crown.xml │ │ ├── ic_gps_fixed_24px.xml │ │ ├── ic_gymnastic.xml │ │ ├── ic_launcher_foreground.xml │ │ ├── ic_mathematics.xml │ │ ├── ic_mathematics_blue.xml │ │ ├── ic_mathematics_empty.xml │ │ ├── ic_mathematics_green.xml │ │ ├── ic_text.xml │ │ ├── ic_trending_flat_24px.xml │ │ ├── markov_pic.png │ │ ├── men.jpeg │ │ ├── one.jpeg │ │ ├── path.png │ │ ├── rectangle.xml │ │ ├── search.png │ │ ├── sort.png │ │ ├── text_border.xml │ │ ├── textborder.xml │ │ ├── two.jpeg │ │ └── work.png │ │ ├── drawable-xhdpi │ │ ├── down.png │ │ ├── location.png │ │ └── up.png │ │ ├── drawable-xxhdpi │ │ ├── down.png │ │ ├── location.png │ │ └── up.png │ │ ├── drawable-xxxhdpi │ │ ├── down.png │ │ ├── location.png │ │ └── up.png │ │ ├── drawable │ │ ├── home_page.xml │ │ ├── ic_baseline_favorite_24.xml │ │ └── ic_launcher_background.xml │ │ ├── font │ │ ├── audiowide.xml │ │ ├── lemon.xml │ │ └── patua_one.xml │ │ ├── layout │ │ ├── activity_graph.xml │ │ ├── activity_graph_tutorial.xml │ │ ├── activity_kmp.xml │ │ ├── activity_main.xml │ │ ├── activity_markov.xml │ │ ├── activity_markov_tutorial.xml │ │ ├── activity_n_queen.xml │ │ ├── activity_path_finder.xml │ │ ├── activity_searching.xml │ │ ├── activity_show_soln.xml │ │ ├── activity_sorting.xml │ │ ├── activity_splash_screen.xml │ │ ├── activity_suggestions.xml │ │ ├── activity_tutorial.xml │ │ ├── activity_visualization.xml │ │ ├── dummy_resource.xml │ │ ├── forks.xml │ │ ├── fragment_content.xml │ │ ├── fragment_fifth.xml │ │ ├── fragment_first.xml │ │ ├── fragment_five.xml │ │ ├── fragment_four.xml │ │ ├── fragment_fourth.xml │ │ ├── fragment_home.xml │ │ ├── fragment_markov1.xml │ │ ├── fragment_markov2.xml │ │ ├── fragment_markov3.xml │ │ ├── fragment_markov4.xml │ │ ├── fragment_one.xml │ │ ├── fragment_second.xml │ │ ├── fragment_three.xml │ │ ├── fragment_three2.xml │ │ ├── fragment_two.xml │ │ ├── issues.xml │ │ ├── nqueen_answer_layout.xml │ │ └── stars.xml │ │ ├── menu │ │ ├── graph_change.xml │ │ ├── path_menu.xml │ │ ├── searching_algo_name.xml │ │ └── sorting_name.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── raw │ │ ├── dijs.mp4 │ │ └── maze.mp4 │ │ ├── transition │ │ ├── change_image_transform.xml │ │ └── explode.xml │ │ └── values │ │ ├── SpinnerDetails.xml │ │ ├── colors.xml │ │ ├── font_certs.xml │ │ ├── preloaded_fonts.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── thelazypeople │ └── algorithmvisualizer │ └── ExampleUnitTest.kt ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Android Pull Request & Master CI 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - 'master' 7 | push: 8 | branches: 9 | - 'master' 10 | 11 | jobs: 12 | test: 13 | name: Run Unit Tests 14 | runs-on: ubuntu-18.04 15 | 16 | steps: 17 | - uses: actions/checkout@v1 18 | - name: set up JDK 1.8 19 | uses: actions/setup-java@v1 20 | with: 21 | java-version: 1.8 22 | - name: Unit tests 23 | run: bash ./gradlew test --stacktrace 24 | 25 | apk: 26 | name: Generate APK 27 | runs-on: ubuntu-18.04 28 | 29 | steps: 30 | - uses: actions/checkout@v1 31 | - name: set up JDK 1.8 32 | uses: actions/setup-java@v1 33 | with: 34 | java-version: 1.8 35 | - name: Build debug APK 36 | run: bash ./gradlew assembleDebug --stacktrace 37 | - name: Upload APK 38 | uses: actions/upload-artifact@v1 39 | with: 40 | name: app 41 | path: app/build/outputs/apk/debug/app-debug.apk 42 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | Algorithm Visualizer -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | xmlns:android 17 | 18 | ^$ 19 | 20 | 21 | 22 |
23 |
24 | 25 | 26 | 27 | xmlns:.* 28 | 29 | ^$ 30 | 31 | 32 | BY_NAME 33 | 34 |
35 |
36 | 37 | 38 | 39 | .*:id 40 | 41 | http://schemas.android.com/apk/res/android 42 | 43 | 44 | 45 |
46 |
47 | 48 | 49 | 50 | .*:name 51 | 52 | http://schemas.android.com/apk/res/android 53 | 54 | 55 | 56 |
57 |
58 | 59 | 60 | 61 | name 62 | 63 | ^$ 64 | 65 | 66 | 67 |
68 |
69 | 70 | 71 | 72 | style 73 | 74 | ^$ 75 | 76 | 77 | 78 |
79 |
80 | 81 | 82 | 83 | .* 84 | 85 | ^$ 86 | 87 | 88 | BY_NAME 89 | 90 |
91 |
92 | 93 | 94 | 95 | .* 96 | 97 | http://schemas.android.com/apk/res/android 98 | 99 | 100 | ANDROID_ATTRIBUTE_ORDER 101 | 102 |
103 |
104 | 105 | 106 | 107 | .* 108 | 109 | .* 110 | 111 | 112 | BY_NAME 113 | 114 |
115 |
116 |
117 |
118 | 119 | 121 |
122 |
-------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 20 | 21 | -------------------------------------------------------------------------------- /.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/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Images/1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/Images/1.jpeg -------------------------------------------------------------------------------- /Images/2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/Images/2.jpeg -------------------------------------------------------------------------------- /Images/3.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/Images/3.jpeg -------------------------------------------------------------------------------- /Images/4.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/Images/4.jpeg -------------------------------------------------------------------------------- /Images/5.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/Images/5.jpeg -------------------------------------------------------------------------------- /Images/6.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/Images/6.jpeg -------------------------------------------------------------------------------- /Images/Readme: -------------------------------------------------------------------------------- 1 | all images of our app 2 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | apply plugin: 'kotlin-android' 3 | apply plugin: 'kotlin-android-extensions' 4 | 5 | android { 6 | compileSdkVersion 29 7 | buildToolsVersion "29.0.3" 8 | 9 | defaultConfig { 10 | applicationId "com.thelazypeople.algorithmvisualizer" 11 | minSdkVersion 23 12 | targetSdkVersion 29 13 | versionCode 1 14 | versionName "1.0" 15 | 16 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 17 | } 18 | 19 | buildTypes { 20 | release { 21 | minifyEnabled false 22 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 23 | } 24 | } 25 | } 26 | 27 | dependencies { 28 | implementation fileTree(dir: "libs", include: ["*.jar"]) 29 | implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" 30 | implementation 'androidx.core:core-ktx:1.3.0' 31 | implementation 'androidx.appcompat:appcompat:1.1.0' 32 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3' 33 | implementation 'com.google.android.material:material:1.1.0' 34 | implementation 'androidx.legacy:legacy-support-v4:1.0.0' 35 | implementation 'androidx.cardview:cardview:1.0.0' 36 | testImplementation 'junit:junit:4.13' 37 | androidTestImplementation 'androidx.test.ext:junit:1.1.1' 38 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' 39 | 40 | //coroutines 41 | implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.7' 42 | implementation "com.airbnb.android:lottie:3.4.1" 43 | implementation 'com.google.code.gson:gson:2.8.6' 44 | implementation "com.squareup.okhttp3:okhttp:4.7.2" 45 | 46 | //Picasso 47 | implementation 'com.squareup.picasso:picasso:2.71828' 48 | 49 | //spark button 50 | implementation 'com.github.varunest:sparkbutton:1.0.6' 51 | 52 | //Croller 53 | implementation 'com.sdsmdg.harjot:croller:1.0.7' 54 | 55 | 56 | } -------------------------------------------------------------------------------- /app/build/outputs/apk/debug/app-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/build/outputs/apk/debug/app-debug.apk -------------------------------------------------------------------------------- /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/release/app-release.aab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/release/app-release.aab -------------------------------------------------------------------------------- /app/src/androidTest/java/com/thelazypeople/algorithmvisualizer/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer 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.thelazypeople.algorithmvisualizer", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /app/src/main/assets/scroll_down_animation.json: -------------------------------------------------------------------------------- 1 | {"v":"5.6.2","fr":30,"ip":0,"op":39,"w":16,"h":30,"nm":"Scroll down","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Layer 3 Outlines","sr":1,"ks":{"o":{"a":0,"k":30,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":0,"s":[8,5.75,0],"to":[0,0.5,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"t":15,"s":[8,8.75,0],"to":[0,0,0],"ti":[0,0.5,0]},{"t":30,"s":[8,5.75,0]}],"ix":2},"a":{"a":0,"k":[7.143,4.02,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-6.243,-3.12],[0,3.12],[6.243,-3.12]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0,0,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":1.8,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[7.143,4.02],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":45,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Layer 2 Outlines","sr":1,"ks":{"o":{"a":0,"k":50,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":3,"s":[8,13.75,0],"to":[0,0.5,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"t":18,"s":[8,16.75,0],"to":[0,0,0],"ti":[0,0.5,0]},{"t":33,"s":[8,13.75,0]}],"ix":2},"a":{"a":0,"k":[7.143,4.02,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-6.243,-3.12],[0,3.12],[6.243,-3.12]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0,0,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":1.8,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[7.143,4.02],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":45,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Layer 1 Outlines","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":6,"s":[8,21.75,0],"to":[0,0.5,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"t":21,"s":[8,24.75,0],"to":[0,0,0],"ti":[0,0.5,0]},{"t":36,"s":[8,21.75,0]}],"ix":2},"a":{"a":0,"k":[10.743,7.62,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-6.243,-3.12],[0,3.12],[6.243,-3.12]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0,0,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":1.8,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[10.743,7.62],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":45,"st":0,"bm":0}],"markers":[]} -------------------------------------------------------------------------------- /app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/FragmentAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer 2 | 3 | import androidx.fragment.app.Fragment 4 | import androidx.fragment.app.FragmentManager 5 | import androidx.fragment.app.FragmentStatePagerAdapter 6 | 7 | class FragmentAdapter(fm: FragmentManager) : FragmentStatePagerAdapter(fm){ 8 | val list = arrayListOf() 9 | 10 | fun addf(fragment:Fragment){ 11 | list.add(fragment) 12 | } 13 | 14 | override fun getItem(position: Int): Fragment = list[position] 15 | 16 | 17 | override fun getCount(): Int = list.size 18 | 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/GithubDetails.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer 2 | 3 | data class GithubDetails( 4 | val stargazersCount: Int? = null, 5 | val pushedAt: String? = null, 6 | val subscriptionUrl: String? = null, 7 | val language: String? = null, 8 | val branchesUrl: String? = null, 9 | val issueCommentUrl: String? = null, 10 | val labelsUrl: String? = null, 11 | val subscribersUrl: String? = null, 12 | val tempCloneToken: Any? = null, 13 | val releasesUrl: String? = null, 14 | val svnUrl: String? = null, 15 | val subscribersCount: Int? = null, 16 | val id: Int? = null, 17 | val forks: Int? = null, 18 | val archiveUrl: String? = null, 19 | val gitRefsUrl: String? = null, 20 | val forksUrl: String? = null, 21 | val statusesUrl: String? = null, 22 | val networkCount: Int? = null, 23 | val sshUrl: String? = null, 24 | val license: Any? = null, 25 | val fullName: String? = null, 26 | val size: Int? = null, 27 | val languagesUrl: String? = null, 28 | val htmlUrl: String? = null, 29 | val collaboratorsUrl: String? = null, 30 | val cloneUrl: String? = null, 31 | val name: String? = null, 32 | val pullsUrl: String? = null, 33 | val defaultBranch: String? = null, 34 | val hooksUrl: String? = null, 35 | val treesUrl: String? = null, 36 | val tagsUrl: String? = null, 37 | val jsonMemberPrivate: Boolean? = null, 38 | val contributorsUrl: String? = null, 39 | val hasDownloads: Boolean? = null, 40 | val notificationsUrl: String? = null, 41 | val openIssuesCount: Int? = null, 42 | val description: String? = null, 43 | val createdAt: String? = null, 44 | val watchers: Int? = null, 45 | val keysUrl: String? = null, 46 | val deploymentsUrl: String? = null, 47 | val hasProjects: Boolean? = null, 48 | val archived: Boolean? = null, 49 | val hasWiki: Boolean? = null, 50 | val updatedAt: String? = null, 51 | val commentsUrl: String? = null, 52 | val stargazersUrl: String? = null, 53 | val disabled: Boolean? = null, 54 | val gitUrl: String? = null, 55 | val hasPages: Boolean? = null, 56 | val owner: Owner? = null, 57 | val commitsUrl: String? = null, 58 | val compareUrl: String? = null, 59 | val gitCommitsUrl: String? = null, 60 | val blobsUrl: String? = null, 61 | val gitTagsUrl: String? = null, 62 | val mergesUrl: String? = null, 63 | val downloadsUrl: String? = null, 64 | val hasIssues: Boolean? = null, 65 | val url: String? = null, 66 | val contentsUrl: String? = null, 67 | val mirrorUrl: Any? = null, 68 | val milestonesUrl: String? = null, 69 | val teamsUrl: String? = null, 70 | val fork: Boolean? = null, 71 | val issuesUrl: String? = null, 72 | val eventsUrl: String? = null, 73 | val issueEventsUrl: String? = null, 74 | val organization: Organization? = null, 75 | val assigneesUrl: String? = null, 76 | val openIssues: Int? = null, 77 | val watchersCount: Int? = null, 78 | val nodeId: String? = null, 79 | val homepage: Any? = null, 80 | val forksCount: Int? = null 81 | ) 82 | 83 | data class Organization( 84 | val gistsUrl: String? = null, 85 | val reposUrl: String? = null, 86 | val followingUrl: String? = null, 87 | val starredUrl: String? = null, 88 | val login: String? = null, 89 | val followersUrl: String? = null, 90 | val type: String? = null, 91 | val url: String? = null, 92 | val subscriptionsUrl: String? = null, 93 | val receivedEventsUrl: String? = null, 94 | val avatarUrl: String? = null, 95 | val eventsUrl: String? = null, 96 | val htmlUrl: String? = null, 97 | val siteAdmin: Boolean? = null, 98 | val id: Int? = null, 99 | val gravatarId: String? = null, 100 | val nodeId: String? = null, 101 | val organizationsUrl: String? = null 102 | ) 103 | 104 | data class Owner( 105 | val gistsUrl: String? = null, 106 | val reposUrl: String? = null, 107 | val followingUrl: String? = null, 108 | val starredUrl: String? = null, 109 | val login: String? = null, 110 | val followersUrl: String? = null, 111 | val type: String? = null, 112 | val url: String? = null, 113 | val subscriptionsUrl: String? = null, 114 | val receivedEventsUrl: String? = null, 115 | val avatarUrl: String? = null, 116 | val eventsUrl: String? = null, 117 | val htmlUrl: String? = null, 118 | val siteAdmin: Boolean? = null, 119 | val id: Int? = null, 120 | val gravatarId: String? = null, 121 | val nodeId: String? = null, 122 | val organizationsUrl: String? = null 123 | ) 124 | 125 | -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer 2 | 3 | import androidx.appcompat.app.AppCompatActivity 4 | import android.os.Bundle 5 | import com.thelazypeople.algorithmvisualizer.home.ContentFragment 6 | import com.thelazypeople.algorithmvisualizer.home.HomeFragment 7 | import kotlinx.android.synthetic.main.activity_main.* 8 | 9 | class MainActivity : AppCompatActivity() { 10 | 11 | 12 | override fun onCreate(savedInstanceState: Bundle?) { 13 | super.onCreate(savedInstanceState) 14 | setContentView(R.layout.activity_main) 15 | 16 | val viewPagerAdapter =FragmentAdapter(supportFragmentManager) 17 | viewPagerAdapter.apply { 18 | addf(HomeFragment()) 19 | addf(ContentFragment()) 20 | } 21 | viewPager.adapter = viewPagerAdapter 22 | //viewPager.setPageTransformer(true, ZoomOutPageTransformer()) 23 | 24 | } 25 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/SplashScreen.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer 2 | 3 | import android.animation.Animator 4 | import android.content.Intent 5 | import androidx.appcompat.app.AppCompatActivity 6 | import android.os.Bundle 7 | import kotlinx.android.synthetic.main.activity_splash_screen.* 8 | 9 | class SplashScreen : AppCompatActivity() { 10 | override fun onCreate(savedInstanceState: Bundle?) { 11 | super.onCreate(savedInstanceState) 12 | setContentView(R.layout.activity_splash_screen) 13 | 14 | 15 | //window.statusBarColor = resources.getColor(R.color.cyan) 16 | 17 | lottie.setMinAndMaxFrame(0, 303) 18 | lottie.speed = 1f 19 | lottie.addAnimatorListener(object : Animator.AnimatorListener{ 20 | override fun onAnimationRepeat(p0: Animator?) {} 21 | 22 | override fun onAnimationEnd(p0: Animator?) { 23 | startActivity(Intent(baseContext, MainActivity::class.java)) 24 | finish() 25 | } 26 | 27 | override fun onAnimationCancel(p0: Animator?) {} 28 | 29 | override fun onAnimationStart(p0: Animator?) {} 30 | 31 | }) 32 | } 33 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/Transformations.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer 2 | 3 | import android.view.View 4 | import androidx.viewpager.widget.ViewPager 5 | 6 | private const val MIN_SCALE = 0.85f 7 | private const val MIN_ALPHA = 0.5f 8 | class ZoomOutPageTransformer : ViewPager.PageTransformer { 9 | 10 | override fun transformPage(view: View, position: Float) { 11 | view.apply { 12 | val pageWidth = width 13 | val pageHeight = height 14 | when { 15 | position < -1 -> { // [-Infinity,-1) 16 | // This page is way off-screen to the left. 17 | alpha = 0f 18 | } 19 | position <= 1 -> { // [-1,1] 20 | // Modify the default slide transition to shrink the page as well 21 | val scaleFactor = Math.max(MIN_SCALE, 1 - Math.abs(position)) 22 | val vertMargin = pageHeight * (1 - scaleFactor) / 2 23 | val horzMargin = pageWidth * (1 - scaleFactor) / 2 24 | translationX = if (position < 0) { 25 | horzMargin - vertMargin / 2 26 | } else { 27 | horzMargin + vertMargin / 2 28 | } 29 | 30 | // Scale the page down (between MIN_SCALE and 1) 31 | scaleX = scaleFactor 32 | scaleY = scaleFactor 33 | 34 | // Fade the page relative to its size. 35 | alpha = (MIN_ALPHA + 36 | (((scaleFactor - MIN_SCALE) / (1 - MIN_SCALE)) * (1 - MIN_ALPHA))) 37 | } 38 | else -> { // (1,+Infinity] 39 | // This page is way off-screen to the right. 40 | alpha = 0f 41 | } 42 | } 43 | } 44 | } 45 | } 46 | 47 | 48 | 49 | class DepthPageTransformer : ViewPager.PageTransformer { 50 | 51 | override fun transformPage(view: View, position: Float) { 52 | view.apply { 53 | val pageWidth = width 54 | when { 55 | position < -1 -> { // [-Infinity,-1) 56 | // This page is way off-screen to the left. 57 | alpha = 0f 58 | } 59 | position <= 0 -> { // [-1,0] 60 | // Use the default slide transition when moving to the left page 61 | alpha = 1f 62 | translationX = 0f 63 | scaleX = 1f 64 | scaleY = 1f 65 | } 66 | position <= 1 -> { // (0,1] 67 | // Fade the page out. 68 | alpha = 1 - position 69 | 70 | // Counteract the default slide transition 71 | translationX = pageWidth * -position 72 | 73 | // Scale the page down (between MIN_SCALE and 1) 74 | val scaleFactor = (MIN_SCALE + (1 - MIN_SCALE) * (1 - Math.abs(position))) 75 | scaleX = scaleFactor 76 | scaleY = scaleFactor 77 | } 78 | else -> { // (1,+Infinity] 79 | // This page is way off-screen to the right. 80 | alpha = 0f 81 | } 82 | } 83 | } 84 | } 85 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/VerticalViewPager.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer 2 | 3 | import android.content.Context 4 | import android.util.AttributeSet 5 | import android.view.MotionEvent 6 | import android.view.View 7 | import androidx.viewpager.widget.ViewPager 8 | 9 | //Class for Vertical View Paging. 10 | //Implemented by Google 11 | //https://android.googlesource.com/platform/packages/apps/DeskClock/+/master/src/com/android/deskclock/VerticalViewPager.java 12 | 13 | class VerticalViewPager(context: Context, attrs: AttributeSet?) : 14 | ViewPager(context, attrs) { 15 | constructor(context: Context) : this(context, null) {} 16 | 17 | /** 18 | * @return `false` since a vertical view pager can never be scrolled horizontally 19 | */ 20 | override fun canScrollHorizontally(direction: Int): Boolean { 21 | return false 22 | } 23 | 24 | /** 25 | * @return `true` iff a normal view pager would support horizontal scrolling at this time 26 | */ 27 | override fun canScrollVertically(direction: Int): Boolean { 28 | return super.canScrollHorizontally(direction) 29 | } 30 | 31 | private fun init() { 32 | // Make page transit vertical 33 | setPageTransformer(true, VerticalPageTransformer()) 34 | // Get rid of the overscroll drawing that happens on the left and right (the ripple) 35 | overScrollMode = View.OVER_SCROLL_NEVER 36 | } 37 | 38 | override fun onInterceptTouchEvent(ev: MotionEvent): Boolean { 39 | val toIntercept = super.onInterceptTouchEvent(flipXY(ev)) 40 | // Return MotionEvent to normal 41 | flipXY(ev) 42 | return toIntercept 43 | } 44 | 45 | override fun onTouchEvent(ev: MotionEvent): Boolean { 46 | val toHandle = super.onTouchEvent(flipXY(ev)) 47 | // Return MotionEvent to normal 48 | flipXY(ev) 49 | return toHandle 50 | } 51 | 52 | private fun flipXY(ev: MotionEvent): MotionEvent { 53 | val width = width.toFloat() 54 | val height = height.toFloat() 55 | val x = (ev.y / height * width ) 56 | val y = (ev.x / width * height ) 57 | ev.setLocation(x, y) 58 | return ev 59 | } 60 | 61 | private class VerticalPageTransformer : PageTransformer { 62 | override fun transformPage(view: View, position: Float) { 63 | val pageWidth: Int = view.width 64 | val pageHeight: Int = view.height 65 | when { 66 | position < -1 -> { 67 | // This page is way off-screen to the left. 68 | view.alpha = 0F 69 | } 70 | position <= 1 -> { 71 | view.alpha = 1F 72 | // Counteract the default slide transition 73 | view.translationX = pageWidth * -position 74 | // set Y position to swipe in from top 75 | val yPosition = position * pageHeight 76 | view.translationY = yPosition 77 | } 78 | else -> { 79 | // This page is way off-screen to the right. 80 | view.alpha = 0F 81 | } 82 | } 83 | } 84 | } 85 | 86 | init { 87 | init() 88 | } 89 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/ViewAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer 2 | 3 | import android.view.View 4 | import android.view.ViewGroup 5 | import androidx.viewpager.widget.PagerAdapter 6 | import androidx.viewpager.widget.ViewPager 7 | 8 | class ViewAdapter : PagerAdapter() { 9 | private var views = ArrayList() 10 | override fun getItemPosition(`object`: Any): Int { 11 | val index: Int =views.indexOf(`object`) 12 | return if(index == -1) 13 | POSITION_NONE 14 | else 15 | index 16 | } 17 | 18 | override fun instantiateItem(container: ViewGroup, position: Int): Any { 19 | val v = views[position] 20 | container.addView(v) 21 | return v 22 | } 23 | 24 | override fun destroyItem(container: ViewGroup, position: Int, `object`: Any) { 25 | container.removeView(views[position]) 26 | } 27 | 28 | override fun isViewFromObject(view: View, `object`: Any): Boolean { 29 | return view == `object` 30 | } 31 | 32 | override fun getCount(): Int = views.size 33 | 34 | //Adding Views 35 | public fun addView(v: View): Int { 36 | return addView(v,views.size) 37 | } 38 | public fun addView(v:View, position: Int) : Int{ 39 | views.add(position, v) 40 | return position 41 | } 42 | 43 | //Deleting views 44 | public fun removeView(pager: ViewPager, v:View): Int { 45 | return removeView(pager, views.indexOf(v)) 46 | } 47 | public fun removeView(pager: ViewPager,position: Int): Int { 48 | pager.adapter = null 49 | views.removeAt(position) 50 | pager.adapter = this 51 | return position 52 | } 53 | 54 | //getting Views 55 | public fun getView(position: Int): View { 56 | return views[position] 57 | } 58 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/graph/GraphTutorialActivity.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer.graph 2 | 3 | import android.content.Intent 4 | import android.graphics.Color 5 | import androidx.appcompat.app.AppCompatActivity 6 | import android.os.Bundle 7 | import android.view.View 8 | import android.widget.TextView 9 | import androidx.viewpager.widget.ViewPager 10 | import com.thelazypeople.algorithmvisualizer.FragmentAdapter 11 | import com.thelazypeople.algorithmvisualizer.R 12 | import com.thelazypeople.algorithmvisualizer.ZoomOutPageTransformer 13 | import com.thelazypeople.algorithmvisualizer.graph.tutorial.* 14 | import kotlinx.android.synthetic.main.activity_graph_tutorial.* 15 | 16 | class GraphTutorialActivity : AppCompatActivity() { 17 | var mDots = arrayOfNulls(5) 18 | var count :Int = 0 19 | 20 | override fun onCreate(savedInstanceState: Bundle?) { 21 | super.onCreate(savedInstanceState) 22 | setContentView(R.layout.activity_graph_tutorial) 23 | val viewPagerAdapter = FragmentAdapter(supportFragmentManager) 24 | viewPagerAdapter.apply { 25 | addf(firstFragment()) 26 | addf(SecondFragment()) 27 | addf(ThreeFragment()) 28 | addf(FourthFragment()) 29 | addf(FifthFragment()) 30 | } 31 | //dot initialisation 32 | DotStatus(0) 33 | viewPager.adapter = viewPagerAdapter 34 | viewPager.setPageTransformer(true, ZoomOutPageTransformer()) 35 | 36 | viewPager.addOnPageChangeListener(object : ViewPager.OnPageChangeListener { 37 | override fun onPageScrollStateChanged(state: Int) { 38 | } 39 | override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) { 40 | } 41 | 42 | override fun onPageSelected(position: Int) { 43 | DotStatus(position) 44 | count = position 45 | if(position == 0){ 46 | back.visibility = View.INVISIBLE 47 | back.isEnabled = false 48 | next.text = "Next" 49 | skip.visibility = View.VISIBLE 50 | skip.isEnabled = true 51 | }else if( position == mDots.size -1) { 52 | back.visibility = View.VISIBLE 53 | back.isEnabled = true 54 | next.text = "Finish" 55 | skip.visibility = View.INVISIBLE 56 | skip.isEnabled = false 57 | }else{ 58 | back.visibility = View.VISIBLE 59 | back.isEnabled = true 60 | next.text = "Next" 61 | skip.visibility = View.VISIBLE 62 | skip.isEnabled = true 63 | } 64 | } 65 | }) 66 | 67 | back.setOnClickListener { 68 | viewPager.currentItem = count -1 69 | } 70 | 71 | next.setOnClickListener { 72 | if(next.text == "Finish") 73 | { 74 | val it = Intent(this, GraphActivity::class.java) 75 | startActivity(it) 76 | finish() 77 | } 78 | else{ 79 | viewPager.currentItem = count +1 80 | } 81 | } 82 | 83 | skip.setOnClickListener { 84 | val it = Intent(this, GraphActivity::class.java) 85 | startActivity(it) 86 | finish() 87 | } 88 | } 89 | private fun DotStatus(pos: Int){ 90 | mDots = arrayOfNulls(5) 91 | dotsLayout.removeAllViews() 92 | for(i in mDots.indices){ 93 | mDots[i] = TextView(this) 94 | mDots[i]?.text = "•" 95 | mDots[i]?.textSize = 35F 96 | mDots[i]?.setTextColor(Color.parseColor("#50000000")) 97 | 98 | dotsLayout.addView(mDots[i]) 99 | } 100 | mDots[pos]?.setTextColor(Color.parseColor("#000000")) 101 | } 102 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/graph/LineView.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer.graph 2 | 3 | import android.content.Context 4 | import android.graphics.Canvas 5 | import android.graphics.Color 6 | import android.graphics.Paint 7 | import android.graphics.PointF 8 | import android.util.AttributeSet 9 | import android.view.View 10 | import android.widget.Toast 11 | 12 | class LineView : View { 13 | 14 | constructor(context: Context):super(context) 15 | constructor(context: Context,attributeSet: AttributeSet) :super(context,attributeSet) 16 | constructor(context: Context,attributeSet: AttributeSet,defStyleAttr:Int):super(context,attributeSet,defStyleAttr) 17 | 18 | 19 | var paint=Paint() 20 | var pointA:PointF = PointF(10f,10f) 21 | var pointB:PointF = PointF(10f,10f) 22 | 23 | override fun onDraw(canvas: Canvas?) { 24 | paint.setColor(Color.BLACK) 25 | paint.strokeWidth=5f 26 | if (canvas != null) { 27 | canvas.drawLine(pointA.x,pointA.y,pointB.x,pointB.y,paint) 28 | } 29 | else 30 | { 31 | Toast.makeText(context,"NULL",Toast.LENGTH_SHORT).show() 32 | } 33 | super.onDraw(canvas) 34 | } 35 | 36 | fun draw(){ 37 | invalidate() 38 | requestLayout() 39 | } 40 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/graph/tutorial/FifthFragment.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer.graph.tutorial 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.thelazypeople.algorithmvisualizer.R 9 | 10 | class FifthFragment : Fragment() { 11 | 12 | 13 | override fun onCreateView( 14 | inflater: LayoutInflater, container: ViewGroup?, 15 | savedInstanceState: Bundle? 16 | ): View? { 17 | // Inflate the layout for this fragment 18 | return inflater.inflate(R.layout.fragment_fifth, container, false) 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/graph/tutorial/FourthFragment.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer.graph.tutorial 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.thelazypeople.algorithmvisualizer.R 9 | 10 | class FourthFragment : Fragment() { 11 | 12 | override fun onCreateView( 13 | inflater: LayoutInflater, container: ViewGroup?, 14 | savedInstanceState: Bundle? 15 | ): View? { 16 | // Inflate the layout for this fragment 17 | return inflater.inflate(R.layout.fragment_fourth, container, false) 18 | } 19 | 20 | 21 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/graph/tutorial/SecondFragment.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer.graph.tutorial 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.thelazypeople.algorithmvisualizer.R 9 | 10 | class SecondFragment : Fragment() { 11 | 12 | override fun onCreateView( 13 | inflater: LayoutInflater, container: ViewGroup?, 14 | savedInstanceState: Bundle? 15 | ): View? { 16 | // Inflate the layout for this fragment 17 | return inflater.inflate(R.layout.fragment_second, container, false) 18 | } 19 | 20 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/graph/tutorial/ThreeFragment.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer.graph.tutorial 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.thelazypeople.algorithmvisualizer.R 9 | 10 | class ThreeFragment : Fragment() { 11 | 12 | override fun onCreateView( 13 | inflater: LayoutInflater, container: ViewGroup?, 14 | savedInstanceState: Bundle? 15 | ): View? { 16 | // Inflate the layout for this fragment 17 | return inflater.inflate(R.layout.fragment_three2, container, false) 18 | } 19 | 20 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/graph/tutorial/firstFragment.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer.graph.tutorial 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.thelazypeople.algorithmvisualizer.R 9 | 10 | class firstFragment : Fragment() { 11 | 12 | override fun onCreateView( 13 | inflater: LayoutInflater, container: ViewGroup?, 14 | savedInstanceState: Bundle? 15 | ): View? { 16 | // Inflate the layout for this fragment 17 | return inflater.inflate(R.layout.fragment_first, container, false) 18 | } 19 | 20 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/home/ContentFragment.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer.home 2 | 3 | import android.content.Intent 4 | import android.os.Bundle 5 | import androidx.fragment.app.Fragment 6 | import android.view.LayoutInflater 7 | import android.view.View 8 | import android.view.ViewGroup 9 | import com.thelazypeople.algorithmvisualizer.R 10 | import com.thelazypeople.algorithmvisualizer.graph.GraphActivity 11 | import com.thelazypeople.algorithmvisualizer.graph.GraphTutorialActivity 12 | import com.thelazypeople.algorithmvisualizer.kmp.KmpActivity 13 | import com.thelazypeople.algorithmvisualizer.markov.MarkovActivity 14 | import com.thelazypeople.algorithmvisualizer.markov.MarkovTutorialActivity 15 | import com.thelazypeople.algorithmvisualizer.nQueen.nQueenActivity 16 | import com.thelazypeople.algorithmvisualizer.pathfinder.TutorialActivity 17 | import com.thelazypeople.algorithmvisualizer.searching.SearchingActivity 18 | import com.thelazypeople.algorithmvisualizer.sorting.SortingActivity 19 | import kotlinx.android.synthetic.main.fragment_content.* 20 | 21 | class ContentFragment : Fragment() { 22 | 23 | override fun onCreateView( 24 | inflater: LayoutInflater, container: ViewGroup?, 25 | savedInstanceState: Bundle? 26 | ): View? { 27 | // Inflate the layout for this fragment 28 | activity!!.window.statusBarColor = resources.getColor(R.color.dark) 29 | return inflater.inflate(R.layout.fragment_content, container, false) 30 | } 31 | 32 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { 33 | super.onViewCreated(view, savedInstanceState) 34 | 35 | sorting.setOnClickListener { 36 | startActivity(Intent(context, SortingActivity::class.java)) 37 | } 38 | 39 | searching.setOnClickListener { 40 | startActivity(Intent(context, SearchingActivity::class.java)) 41 | } 42 | 43 | pathfinding.setOnClickListener { 44 | startActivity(Intent(context, TutorialActivity::class.java)) 45 | } 46 | 47 | nQueens.setOnClickListener { 48 | startActivity(Intent(context, nQueenActivity::class.java)) 49 | } 50 | 51 | kmp.setOnClickListener { 52 | startActivity(Intent(context, KmpActivity::class.java)) 53 | } 54 | 55 | graph.setOnClickListener { 56 | startActivity(Intent(context, GraphTutorialActivity::class.java)) 57 | } 58 | 59 | markov.setOnClickListener { 60 | startActivity(Intent(context, MarkovTutorialActivity::class.java)) 61 | } 62 | 63 | } 64 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/home/HomeFragment.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer.home 2 | 3 | import android.content.Context 4 | import android.net.ConnectivityManager 5 | import android.os.Bundle 6 | import android.text.method.LinkMovementMethod 7 | import android.view.LayoutInflater 8 | import android.view.View 9 | import android.view.ViewGroup 10 | import androidx.fragment.app.Fragment 11 | import com.google.gson.FieldNamingPolicy 12 | import com.google.gson.GsonBuilder 13 | import com.thelazypeople.algorithmvisualizer.GithubDetails 14 | import com.thelazypeople.algorithmvisualizer.R 15 | import kotlinx.android.synthetic.main.forks.* 16 | import kotlinx.android.synthetic.main.fragment_home.* 17 | import kotlinx.android.synthetic.main.issues.* 18 | import kotlinx.android.synthetic.main.stars.* 19 | import kotlinx.coroutines.Dispatchers 20 | import kotlinx.coroutines.GlobalScope 21 | import kotlinx.coroutines.launch 22 | import kotlinx.coroutines.withContext 23 | import okhttp3.OkHttpClient 24 | import okhttp3.Request 25 | 26 | 27 | class HomeFragment : Fragment() { 28 | 29 | override fun onCreateView( 30 | inflater: LayoutInflater, container: ViewGroup?, 31 | savedInstanceState: Bundle? 32 | ): View? { 33 | // Inflate the layout for this fragment 34 | return inflater.inflate(R.layout.fragment_home, container, false) 35 | } 36 | 37 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { 38 | super.onViewCreated(view, savedInstanceState) 39 | 40 | //checking internet connection. 41 | if(context?.let { isNetworkAvailable(it) }!!){ 42 | getDetails() 43 | }else{ //If wifi or mobile Network in not On, we will not show the badges. 44 | issues.visibility = View.INVISIBLE 45 | forks.visibility = View.INVISIBLE 46 | stars.visibility = View.INVISIBLE 47 | } 48 | thelazypeople.movementMethod = LinkMovementMethod.getInstance() 49 | adarsh.movementMethod = LinkMovementMethod.getInstance() 50 | abhishek.movementMethod = LinkMovementMethod.getInstance() 51 | ayushi.movementMethod = LinkMovementMethod.getInstance() 52 | 53 | } 54 | 55 | private fun isNetworkAvailable(context: Context): Boolean { 56 | val cm = 57 | context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager 58 | ?: return false 59 | val networkInfo = cm.activeNetworkInfo 60 | // if no network is available networkInfo will be null 61 | // otherwise check if we are connected 62 | return networkInfo != null && networkInfo.isConnected 63 | } 64 | 65 | private fun getDetails(){ 66 | val okHttpClient =OkHttpClient() 67 | val request = Request.Builder() 68 | .url("https://api.github.com/repos/The-Lazy-People/Algorithm-Visualizer") 69 | .build() 70 | val gson = GsonBuilder().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) 71 | .create() 72 | 73 | GlobalScope.launch(Dispatchers.Main) { 74 | var response = withContext(Dispatchers.IO){ 75 | okHttpClient.newCall(request).execute() 76 | } 77 | val job = withContext(Dispatchers.IO){ 78 | if(response.isSuccessful) { 79 | stars.visibility = View.VISIBLE 80 | forks.visibility = View.VISIBLE 81 | issues.visibility = View.VISIBLE 82 | 83 | val body = response.body?.string() 84 | val githubDetails = gson.fromJson(body, GithubDetails::class.java) 85 | val issues = "${githubDetails.openIssuesCount.toString()} OPEN" 86 | val work = withContext(Dispatchers.Main){ 87 | stars_result.text = githubDetails.stargazersCount.toString() 88 | forks_result.text = githubDetails.forksCount.toString() 89 | issues_result.text = issues 90 | } 91 | } 92 | else{ 93 | val work = withContext(Dispatchers.Main){ 94 | stars.visibility = View.INVISIBLE 95 | forks.visibility = View.INVISIBLE 96 | issues.visibility = View.INVISIBLE 97 | } 98 | } 99 | } 100 | } 101 | } 102 | 103 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/markov/MarkovActivity.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer.markov 2 | 3 | import android.content.Context 4 | import android.content.Intent 5 | import androidx.appcompat.app.AppCompatActivity 6 | import android.os.Bundle 7 | import android.text.method.ScrollingMovementMethod 8 | import android.widget.Toast 9 | import com.google.gson.Gson 10 | import com.thelazypeople.algorithmvisualizer.R 11 | import kotlinx.android.synthetic.main.activity_markov.* 12 | import kotlinx.coroutines.Dispatchers 13 | import kotlinx.coroutines.GlobalScope 14 | import kotlinx.coroutines.delay 15 | import kotlinx.coroutines.launch 16 | 17 | class MarkovActivity : AppCompatActivity() { 18 | var dataKeeper:TrainingDataKeeper= TrainingDataKeeper() 19 | var str="" 20 | var startTest=0 21 | var delayTimeShort:Long=20 22 | 23 | override fun onCreate(savedInstanceState: Bundle?) { 24 | super.onCreate(savedInstanceState) 25 | setContentView(R.layout.activity_markov) 26 | 27 | show.movementMethod= ScrollingMovementMethod() 28 | show.computeScroll() 29 | 30 | val sharedPreferences=this.getSharedPreferences("sharedPrefFile", Context.MODE_PRIVATE) 31 | val prefEditor=sharedPreferences.edit() 32 | 33 | start.setOnClickListener { 34 | 35 | str=train.text.toString() 36 | display.text="PREFIX" 37 | display2.text="SUFFIX" 38 | show2.movementMethod= ScrollingMovementMethod() 39 | markov(1, 2) 40 | startTest=1 41 | } 42 | 43 | test.setOnClickListener { 44 | if(startTest==0) 45 | { 46 | Toast.makeText(this,"Firstly Train the model", Toast.LENGTH_LONG).show() 47 | } 48 | else { 49 | val dataInString= Gson().toJson(dataKeeper) 50 | prefEditor.putString("Trainingset", str) 51 | prefEditor.putString("DataKeeper",dataInString) 52 | prefEditor.apply() 53 | prefEditor.commit() 54 | val intent = Intent(this, SuggestionsActivity::class.java) 55 | startActivity(intent) 56 | } 57 | } 58 | } 59 | fun markov(keySize: Int, outputSize: Int) { 60 | GlobalScope.launch(Dispatchers.Main) { 61 | //require(keySize >= 1) { "Key size can't be less than 1" } 62 | // val str="jump? asked the Scarecrow. Never. He sits day after day in the great fields. They kept on walking, however, and at night the moon came out and shone brightly. So they lay down among the sweet smelling yellow flowers and slept soundly until morning. When it was daylight, the girl bathed her face in her hands, and she set to work in one of the shelves as she passed; it was labelled 'ORANGE MARMALADE', but to her great delight it fitted! Alice opened the door and closer to one another, for the stillness of the empty room was more dreadful" 63 | 64 | val words = str.toLowerCase().trimEnd().split(' ',',','.','?','!','\n') 65 | 66 | 67 | //print(words) 68 | 69 | var prefix = "" 70 | var suffix = "" 71 | 72 | for (i in 0..(words.size - 1)) { 73 | 74 | prefix = words.subList(i, i + 1).joinToString(" ") 75 | show.text =show.text.toString()+ prefix+"\n" 76 | 77 | delay(delayTimeShort) 78 | var scrollAmount = show.getLayout().getLineTop(show.getLineCount()) - show.getHeight(); 79 | // if there is no need to scroll, scrollAmount will be <=0 80 | if (scrollAmount > 6) 81 | show.scrollTo(0, scrollAmount); 82 | else 83 | show.scrollTo(0, 0); 84 | 85 | suffix = if (i + 1 < words.size) words[i + 1] else "" 86 | show2.text =show2.text.toString()+ suffix+"\n" 87 | delay(delayTimeShort) 88 | var scrollAmount2 = show.getLayout().getLineTop(show2.getLineCount()) - show2.getHeight(); 89 | // if there is no need to scroll, scrollAmount will be <=0 90 | if (scrollAmount2 > 6) 91 | show2.scrollTo(0, scrollAmount2); 92 | else 93 | show2.scrollTo(0, 0); 94 | delay(delayTimeShort) 95 | 96 | lateinit var suffixes: MutableMap 97 | suffixes = dataKeeper.dictFutureWord.getOrPut(prefix) { mutableMapOf() } 98 | var prevVal=suffixes.getOrPut(suffix){0} 99 | suffixes.put(suffix,prevVal+1) 100 | for(j in 0..prefix.length-1){ 101 | val prefixWord = prefix.substring(0,j) 102 | val suffixWord = prefix 103 | lateinit var suffixes: MutableMap 104 | suffixes = dataKeeper.dictCompleteWord.getOrPut(prefixWord) { mutableMapOf() } 105 | var prevValWord=suffixes.getOrPut(suffixWord){0} 106 | suffixes.put(suffixWord,prevValWord+1) 107 | } 108 | } 109 | 110 | } 111 | } 112 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/markov/MarkovTutorialActivity.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer.markov 2 | 3 | import android.content.Intent 4 | import android.graphics.Color 5 | import androidx.appcompat.app.AppCompatActivity 6 | import android.os.Bundle 7 | import android.view.View 8 | import android.widget.TextView 9 | import androidx.viewpager.widget.ViewPager 10 | import com.thelazypeople.algorithmvisualizer.FragmentAdapter 11 | import com.thelazypeople.algorithmvisualizer.R 12 | import com.thelazypeople.algorithmvisualizer.ZoomOutPageTransformer 13 | import com.thelazypeople.algorithmvisualizer.markov.tutorial.Markov1Fragment 14 | import com.thelazypeople.algorithmvisualizer.markov.tutorial.Markov2Fragment 15 | import com.thelazypeople.algorithmvisualizer.markov.tutorial.Markov3Fragment 16 | import com.thelazypeople.algorithmvisualizer.markov.tutorial.Markov4Fragment 17 | import kotlinx.android.synthetic.main.activity_markov_tutorial.* 18 | 19 | class MarkovTutorialActivity : AppCompatActivity() { 20 | var mDots = arrayOfNulls(5) 21 | var count :Int = 0 22 | 23 | override fun onCreate(savedInstanceState: Bundle?) { 24 | super.onCreate(savedInstanceState) 25 | setContentView(R.layout.activity_markov_tutorial) 26 | val viewPagerAdapter = FragmentAdapter(supportFragmentManager) 27 | viewPagerAdapter.apply { 28 | addf(Markov1Fragment()) 29 | addf(Markov2Fragment()) 30 | addf(Markov3Fragment()) 31 | addf(Markov4Fragment()) 32 | } 33 | 34 | 35 | //dot initialisation 36 | DotStatus(0) 37 | viewPager.adapter = viewPagerAdapter 38 | viewPager.setPageTransformer(true, ZoomOutPageTransformer()) 39 | 40 | viewPager.addOnPageChangeListener(object : ViewPager.OnPageChangeListener { 41 | override fun onPageScrollStateChanged(state: Int) { 42 | } 43 | override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) { 44 | 45 | } 46 | override fun onPageSelected(position: Int) { 47 | DotStatus(position) 48 | count = position 49 | if(position == 0){ 50 | back.visibility = View.INVISIBLE 51 | back.isEnabled = false 52 | next.text = "Next" 53 | skip.visibility = View.VISIBLE 54 | skip.isEnabled = true 55 | }else if( position == mDots.size -1) { 56 | back.visibility = View.VISIBLE 57 | back.isEnabled = true 58 | next.text = "Finish" 59 | skip.visibility = View.INVISIBLE 60 | skip.isEnabled = false 61 | }else{ 62 | back.visibility = View.VISIBLE 63 | back.isEnabled = true 64 | next.text = "Next" 65 | skip.visibility = View.VISIBLE 66 | skip.isEnabled = true 67 | } 68 | } 69 | }) 70 | 71 | back.setOnClickListener { 72 | viewPager.currentItem = count -1 73 | } 74 | 75 | next.setOnClickListener { 76 | if(next.text == "Finish") 77 | { 78 | val it = Intent(this, MarkovActivity::class.java) 79 | startActivity(it) 80 | finish() 81 | } 82 | else{ 83 | viewPager.currentItem = count +1 84 | } 85 | } 86 | 87 | skip.setOnClickListener { 88 | val it = Intent(this, MarkovActivity::class.java) 89 | startActivity(it) 90 | finish() 91 | } 92 | } 93 | private fun DotStatus(pos: Int){ 94 | mDots = arrayOfNulls(4) 95 | dotsLayout.removeAllViews() 96 | for(i in 0 until mDots.size){ 97 | mDots[i] = TextView(this) 98 | mDots[i]?.text = "•" 99 | mDots[i]?.textSize = 35F 100 | mDots[i]?.setTextColor(Color.parseColor("#50000000")) 101 | 102 | dotsLayout.addView(mDots[i]) 103 | } 104 | mDots[pos]?.setTextColor(Color.parseColor("#000000")) 105 | } 106 | 107 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/markov/TrainingDataKeeper.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer.markov 2 | 3 | class TrainingDataKeeper { 4 | val dictFutureWord = mutableMapOf>() 5 | val dictCompleteWord = mutableMapOf>() 6 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/markov/tutorial/Markov1Fragment.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer.markov.tutorial 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.thelazypeople.algorithmvisualizer.R 9 | 10 | class Markov1Fragment : Fragment() { 11 | 12 | 13 | override fun onCreateView( 14 | inflater: LayoutInflater, container: ViewGroup?, 15 | savedInstanceState: Bundle? 16 | ): View? { 17 | // Inflate the layout for this fragment 18 | return inflater.inflate(R.layout.fragment_markov1, container, false) 19 | } 20 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/markov/tutorial/Markov2Fragment.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer.markov.tutorial 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.thelazypeople.algorithmvisualizer.R 9 | 10 | 11 | class Markov2Fragment : Fragment() { 12 | 13 | 14 | override fun onCreateView( 15 | inflater: LayoutInflater, container: ViewGroup?, 16 | savedInstanceState: Bundle? 17 | ): View? { 18 | // Inflate the layout for this fragment 19 | return inflater.inflate(R.layout.fragment_markov2, container, false) 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/markov/tutorial/Markov3Fragment.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer.markov.tutorial 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.thelazypeople.algorithmvisualizer.R 9 | 10 | class Markov3Fragment : Fragment() { 11 | 12 | override fun onCreateView( 13 | inflater: LayoutInflater, container: ViewGroup?, 14 | savedInstanceState: Bundle? 15 | ): View? { 16 | // Inflate the layout for this fragment 17 | return inflater.inflate(R.layout.fragment_markov3, container, false) 18 | } 19 | 20 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/markov/tutorial/Markov4Fragment.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer.markov.tutorial 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.thelazypeople.algorithmvisualizer.R 9 | 10 | class Markov4Fragment : Fragment() { 11 | 12 | 13 | override fun onCreateView( 14 | inflater: LayoutInflater, container: ViewGroup?, 15 | savedInstanceState: Bundle? 16 | ): View? { 17 | // Inflate the layout for this fragment 18 | return inflater.inflate(R.layout.fragment_markov4, container, false) 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/nQueen/nQueenActivity.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer.nQueen 2 | 3 | import android.content.Context 4 | import android.content.Intent 5 | import androidx.appcompat.app.AppCompatActivity 6 | import android.os.Bundle 7 | import com.sdsmdg.harjot.crollerTest.Croller 8 | import com.sdsmdg.harjot.crollerTest.OnCrollerChangeListener 9 | import com.thelazypeople.algorithmvisualizer.R 10 | import kotlinx.android.synthetic.main.activity_n_queen.* 11 | 12 | class nQueenActivity : AppCompatActivity(), OnCrollerChangeListener { 13 | var noOfQueens=0 14 | var boardSize=0 15 | 16 | override fun onCreate(savedInstanceState: Bundle?) { 17 | super.onCreate(savedInstanceState) 18 | setContentView(R.layout.activity_n_queen) 19 | setSupportActionBar(toolbar) 20 | supportActionBar?.setDisplayShowTitleEnabled(false) 21 | 22 | val sharedPreferences=this.getSharedPreferences("sharedPrefFile", Context.MODE_PRIVATE) 23 | val prefEditor=sharedPreferences.edit() 24 | 25 | boardSizeSB.setOnCrollerChangeListener(this) 26 | startVisualizationBTN.setOnClickListener { 27 | prefEditor.putInt("boardSize",boardSize) 28 | prefEditor.apply() 29 | prefEditor.commit() 30 | val intent = Intent(this,VisualizationActivity::class.java) 31 | startActivity(intent) 32 | finish() 33 | } 34 | } 35 | 36 | override fun onProgressChanged(croller: Croller?, progress: Int) { 37 | showBoardSizeTV.text = progress.toString() 38 | boardSize = progress 39 | } 40 | 41 | override fun onStartTrackingTouch(croller: Croller?) {} 42 | 43 | override fun onStopTrackingTouch(croller: Croller?) {} 44 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/nQueen/solutionMatrix.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer.nQueen 2 | 3 | class solutionMatrix { 4 | var data:MutableList>> = mutableListOf() 5 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/pathfinder/TutorialActivity.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer.pathfinder 2 | 3 | import android.content.Intent 4 | import android.graphics.Color 5 | import androidx.appcompat.app.AppCompatActivity 6 | import android.os.Bundle 7 | import android.view.View 8 | import android.widget.TextView 9 | import androidx.viewpager.widget.ViewPager 10 | import com.thelazypeople.algorithmvisualizer.FragmentAdapter 11 | import com.thelazypeople.algorithmvisualizer.R 12 | import com.thelazypeople.algorithmvisualizer.ZoomOutPageTransformer 13 | import com.thelazypeople.algorithmvisualizer.pathfinder.tutorialui.* 14 | import kotlinx.android.synthetic.main.activity_tutorial.* 15 | 16 | class TutorialActivity : AppCompatActivity() { 17 | var mDots = arrayOfNulls(5) 18 | var count :Int = 0 19 | 20 | override fun onCreate(savedInstanceState: Bundle?) { 21 | super.onCreate(savedInstanceState) 22 | setContentView(R.layout.activity_tutorial) 23 | window.statusBarColor = resources.getColor(R.color.dark) 24 | 25 | val viewPagerAdapter = FragmentAdapter(supportFragmentManager) 26 | viewPagerAdapter.apply { 27 | addf(oneFragment()) 28 | addf(twoFragment()) 29 | addf(threeFragment()) 30 | addf(fourFragment()) 31 | addf(fiveFragment()) 32 | } 33 | 34 | 35 | //dot initialisation 36 | DotStatus(0) 37 | pathviewPager.adapter = viewPagerAdapter 38 | pathviewPager.setPageTransformer(true, ZoomOutPageTransformer()) 39 | 40 | pathviewPager.addOnPageChangeListener(object : ViewPager.OnPageChangeListener { 41 | override fun onPageScrollStateChanged(state: Int) { 42 | } 43 | override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) { 44 | 45 | } 46 | override fun onPageSelected(position: Int) { 47 | DotStatus(position) 48 | count = position 49 | if(position == 0){ 50 | back.visibility = View.INVISIBLE 51 | back.isEnabled = false 52 | next.text = "Next" 53 | skip.visibility = View.VISIBLE 54 | skip.isEnabled = true 55 | }else if( position == mDots.size -1) { 56 | back.visibility = View.VISIBLE 57 | back.isEnabled = true 58 | next.text = "Finish" 59 | skip.visibility = View.INVISIBLE 60 | skip.isEnabled = false 61 | }else{ 62 | back.visibility = View.VISIBLE 63 | back.isEnabled = true 64 | next.text = "Next" 65 | skip.visibility = View.VISIBLE 66 | skip.isEnabled = true 67 | } 68 | } 69 | }) 70 | 71 | back.setOnClickListener { 72 | pathviewPager.currentItem = count -1 73 | } 74 | 75 | next.setOnClickListener { 76 | if(next.text == "Finish") 77 | { 78 | val it = Intent(this, PathFinderActivity::class.java) 79 | startActivity(it) 80 | finish() 81 | } 82 | else{ 83 | pathviewPager.currentItem = count +1 84 | } 85 | } 86 | 87 | skip.setOnClickListener { 88 | val it = Intent(this, PathFinderActivity::class.java) 89 | startActivity(it) 90 | finish() 91 | } 92 | } 93 | 94 | private fun DotStatus(pos: Int){ 95 | mDots = arrayOfNulls(5) 96 | dotsLayout.removeAllViews() 97 | for(i in 0 until mDots.size){ 98 | mDots[i] = TextView(this) 99 | mDots[i]?.text = "•" 100 | mDots[i]?.textSize = 35F 101 | mDots[i]?.setTextColor(Color.parseColor("#50000000")) 102 | 103 | dotsLayout.addView(mDots[i]) 104 | } 105 | mDots[pos]?.setTextColor(Color.parseColor("#000000")) 106 | } 107 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/pathfinder/dijik.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer.pathfinder 2 | 3 | import android.graphics.Color 4 | import android.os.Build 5 | import androidx.annotation.RequiresApi 6 | import java.util.* 7 | 8 | class Tuple2(var d:Int,var x:Int,var y:Int){ 9 | fun getx():Int{ 10 | return x 11 | } 12 | fun gety():Int{ 13 | return y 14 | } 15 | fun getd():Int{ 16 | return d 17 | } 18 | } 19 | class ComparatorTuple { 20 | 21 | companion object : Comparator { 22 | 23 | override fun compare(a: Tuple2, b: Tuple2): Int = when { 24 | a.d != b.d -> a.d - b.d 25 | else -> 1 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/pathfinder/tutorialui/fiveFragment.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer.pathfinder.tutorialui 2 | 3 | import android.net.Uri 4 | import android.os.Bundle 5 | import androidx.fragment.app.Fragment 6 | import android.view.LayoutInflater 7 | import android.view.View 8 | import android.view.ViewGroup 9 | import android.widget.MediaController 10 | import com.thelazypeople.algorithmvisualizer.R 11 | import kotlinx.android.synthetic.main.fragment_five.* 12 | import kotlinx.coroutines.CoroutineScope 13 | import kotlinx.coroutines.Dispatchers 14 | import kotlinx.coroutines.launch 15 | 16 | 17 | class fiveFragment : Fragment() { 18 | 19 | var visible=0 20 | override fun onCreateView( 21 | inflater: LayoutInflater, container: ViewGroup?, 22 | savedInstanceState: Bundle? 23 | ): View? { 24 | // Inflate the layout for this fragment 25 | return inflater.inflate(R.layout.fragment_five, container, false) 26 | } 27 | override fun setUserVisibleHint(isVisibleToUser: Boolean) { 28 | super.setUserVisibleHint(isVisibleToUser) 29 | if(isVisibleToUser) 30 | { 31 | visible=1 32 | video() 33 | } 34 | else{ 35 | visible=0 36 | } 37 | } 38 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { 39 | super.onViewCreated(view, savedInstanceState) 40 | } 41 | fun video(){ 42 | if(visible==1) { 43 | 44 | var job = CoroutineScope(Dispatchers.Main).launch { 45 | var mediaController = MediaController(activity) 46 | videoView2.setMediaController(mediaController) 47 | val path = "android.resource://com.thelazypeople.algorithmvisualizer/" + R.raw.dijs; 48 | val uri = Uri.parse(path) 49 | videoView2.setVideoURI(uri) 50 | videoView2.setMediaController(null) 51 | videoView2.start() 52 | } 53 | } 54 | } 55 | 56 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/pathfinder/tutorialui/fourFragment.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer.pathfinder.tutorialui 2 | 3 | import android.net.Uri 4 | import android.os.Bundle 5 | import androidx.fragment.app.Fragment 6 | import android.view.LayoutInflater 7 | import android.view.View 8 | import android.view.ViewGroup 9 | import android.widget.MediaController 10 | import com.thelazypeople.algorithmvisualizer.R 11 | import kotlinx.android.synthetic.main.fragment_four.* 12 | import kotlinx.coroutines.CoroutineScope 13 | import kotlinx.coroutines.Dispatchers 14 | import kotlinx.coroutines.launch 15 | 16 | 17 | class fourFragment : Fragment() { 18 | private var visible=0 19 | override fun onCreateView( 20 | inflater: LayoutInflater, container: ViewGroup?, 21 | savedInstanceState: Bundle? 22 | ): View? { 23 | // Inflate the layout for this fragment 24 | return inflater.inflate(R.layout.fragment_four, container, false) 25 | } 26 | 27 | override fun setUserVisibleHint(isVisibleToUser: Boolean) { 28 | super.setUserVisibleHint(isVisibleToUser) 29 | if(isVisibleToUser) 30 | { 31 | visible=1 32 | video() 33 | } 34 | else{ 35 | visible=0 36 | } 37 | } 38 | 39 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { 40 | super.onViewCreated(view, savedInstanceState) 41 | } 42 | 43 | fun video(){ 44 | if(visible==1) { 45 | CoroutineScope(Dispatchers.Main).launch { 46 | var mediaController = MediaController(activity) 47 | videoView.setMediaController(mediaController) 48 | val path = "android.resource://com.thelazypeople.algorithmvisualizer/" + R.raw.maze; 49 | val uri = Uri.parse(path) 50 | videoView.setVideoURI(uri) 51 | videoView.setMediaController(null) 52 | videoView.start() 53 | 54 | } 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/pathfinder/tutorialui/oneFragment.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer.pathfinder.tutorialui 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.thelazypeople.algorithmvisualizer.R 9 | 10 | class oneFragment : Fragment() { 11 | 12 | override fun onCreateView( 13 | inflater: LayoutInflater, container: ViewGroup?, 14 | savedInstanceState: Bundle? 15 | ): View? { 16 | // Inflate the layout for this fragment 17 | return inflater.inflate(R.layout.fragment_one, container, false) 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/pathfinder/tutorialui/threeFragment.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer.pathfinder.tutorialui 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.thelazypeople.algorithmvisualizer.R 9 | 10 | class threeFragment : Fragment() { 11 | 12 | 13 | override fun onCreateView( 14 | inflater: LayoutInflater, container: ViewGroup?, 15 | savedInstanceState: Bundle? 16 | ): View? { 17 | // Inflate the layout for this fragment 18 | return inflater.inflate(R.layout.fragment_three, container, false) 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /app/src/main/java/com/thelazypeople/algorithmvisualizer/pathfinder/tutorialui/twoFragment.kt: -------------------------------------------------------------------------------- 1 | package com.thelazypeople.algorithmvisualizer.pathfinder.tutorialui 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.thelazypeople.algorithmvisualizer.R 9 | 10 | class twoFragment : Fragment() { 11 | 12 | override fun onCreateView( 13 | inflater: LayoutInflater, container: ViewGroup?, 14 | savedInstanceState: Bundle? 15 | ): View? { 16 | // Inflate the layout for this fragment 17 | return inflater.inflate(R.layout.fragment_two, container, false) 18 | } 19 | 20 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-hdpi/down.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-hdpi/location.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-hdpi/up.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-mdpi/down.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-mdpi/location.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-mdpi/up.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/background.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-v24/background.jpeg -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/circuit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-v24/circuit.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/crown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-v24/crown.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/edit.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/grammar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-v24/grammar.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_add.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_circle.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_circle_vol_1circle.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_criss_cross.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_crown.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 15 | 18 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_gps_fixed_24px.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_gymnastic.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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/ic_mathematics.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_mathematics_blue.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_mathematics_empty.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_mathematics_green.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_text.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 15 | 18 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_trending_flat_24px.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/markov_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-v24/markov_pic.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/men.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-v24/men.jpeg -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/one.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-v24/one.jpeg -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/path.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-v24/path.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/rectangle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-v24/search.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/sort.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-v24/sort.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/text_border.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/textborder.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/two.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-v24/two.jpeg -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/work.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-v24/work.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-xhdpi/down.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-xhdpi/location.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-xhdpi/up.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-xxhdpi/down.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-xxhdpi/location.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-xxhdpi/up.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-xxxhdpi/down.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-xxxhdpi/location.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Lazy-People/Algorithm-Visualizer/fe8350894460c432c1a488dceba8303d2c704a77/app/src/main/res/drawable-xxxhdpi/up.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/home_page.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_favorite_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 26 | 28 | 30 | 32 | 34 | 36 | 38 | 40 | 42 | 44 | 46 | 48 | 50 | 52 | 54 | 56 | 58 | 60 | 62 | 64 | 66 | 68 | 70 | 72 | 74 | 75 | -------------------------------------------------------------------------------- /app/src/main/res/font/audiowide.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/font/lemon.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/font/patua_one.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_graph_tutorial.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 19 | 20 | 24 | 25 | 29 | 30 | 31 | 32 | 42 | 43 |