├── app
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── code_h.png
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── code_s.png
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── code_x.png
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── code_xx.png
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── code_xxx.png
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ ├── colors.xml
│ │ │ │ └── themes.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ ├── drawable
│ │ │ │ ├── ic_baseline_add_24.xml
│ │ │ │ ├── ic_baseline_delete_24.xml
│ │ │ │ └── ic_launcher_background.xml
│ │ │ ├── values-night
│ │ │ │ └── themes.xml
│ │ │ ├── layout
│ │ │ │ ├── popup_home.xml
│ │ │ │ ├── upload_popup.xml
│ │ │ │ ├── homepage.xml
│ │ │ │ ├── activity_programme_page.xml
│ │ │ │ ├── programme_card.xml
│ │ │ │ ├── topic_card.xml
│ │ │ │ └── activity_code_screen.xml
│ │ │ └── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── temp
│ │ │ │ ├── Models
│ │ │ │ ├── TopicData.kt
│ │ │ │ └── ProgrameData.kt
│ │ │ │ ├── Database
│ │ │ │ ├── Constants.kt
│ │ │ │ └── Database.kt
│ │ │ │ ├── Activities
│ │ │ │ ├── CodeScreen.kt
│ │ │ │ ├── HomePage.kt
│ │ │ │ └── ProgrammePage.kt
│ │ │ │ └── Adapters
│ │ │ │ ├── Adapter1.kt
│ │ │ │ └── Adapter0.kt
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── temp
│ │ │ └── ExampleUnitTest.kt
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── example
│ │ └── temp
│ │ └── ExampleInstrumentedTest.kt
├── proguard-rules.pro
└── build.gradle
├── settings.gradle
├── .idea
├── .gitignore
├── compiler.xml
├── vcs.xml
├── misc.xml
├── gradle.xml
└── jarRepositories.xml
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .gitignore
├── README.md
├── gradle.properties
├── gradlew.bat
└── gradlew
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 | rootProject.name = "temp"
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vishalx4/CodeOrganizer/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/code_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vishalx4/CodeOrganizer/HEAD/app/src/main/res/mipmap-hdpi/code_h.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/code_s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vishalx4/CodeOrganizer/HEAD/app/src/main/res/mipmap-mdpi/code_s.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/code_x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vishalx4/CodeOrganizer/HEAD/app/src/main/res/mipmap-xhdpi/code_x.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/code_xx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vishalx4/CodeOrganizer/HEAD/app/src/main/res/mipmap-xxhdpi/code_xx.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vishalx4/CodeOrganizer/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vishalx4/CodeOrganizer/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vishalx4/CodeOrganizer/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/code_xxx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vishalx4/CodeOrganizer/HEAD/app/src/main/res/mipmap-xxxhdpi/code_xxx.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vishalx4/CodeOrganizer/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vishalx4/CodeOrganizer/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vishalx4/CodeOrganizer/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vishalx4/CodeOrganizer/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vishalx4/CodeOrganizer/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vishalx4/CodeOrganizer/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vishalx4/CodeOrganizer/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/java/com/example/temp/Models/TopicData.kt:
--------------------------------------------------------------------------------
1 | package com.example.temp.Models
2 |
3 | class TopicData(var topicName:String, var topicDescription:String)
4 | {
5 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/example/temp/Models/ProgrameData.kt:
--------------------------------------------------------------------------------
1 | package com.example.temp.Models
2 |
3 | class ProgrameData(var programeName:String,var programmeCode:String) {}
4 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Code Organizer
3 | TopicName
4 | TopicDescription
5 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sun Nov 29 15:30:14 IST 2020
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
7 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 | local.properties
16 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_add_24.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_delete_24.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
--------------------------------------------------------------------------------
/app/src/test/java/com/example/temp/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.example.temp
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/example/temp/Database/Constants.kt:
--------------------------------------------------------------------------------
1 | package com.example.temp.Database
2 |
3 | val DATABASE_VERSION :Int = 1
4 | val DATABASE_NAME : String = "topic.db"
5 | val TABLE_NAME :String = "topics"
6 | val _ID:String = "_id"
7 | val TOPIC_NAME:String = "topic_name"
8 | val TOPIC_DESCRIPTION:String = "topic_description"
9 |
10 |
11 | val PROGRAMME_ID:String = "programme_id"
12 | val PROGRAMME_NAME:String = "programme_name"
13 | val PROGRAME_CODE:String = "programme_code"
14 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/example/temp/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.example.temp
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("com.example.temp", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/values-night/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CodeOrganizer
2 | Code Organizer an android app that helps you to organize your codes
3 |
4 |
5 | ## Features
6 | * offline usage
7 | * local database (use's your phones storage)
8 | * Categorization
9 | * User Friendly
10 |
11 | ## Stack
12 | * Android Studio with kotlin
13 | * Sqlite database (free database , stores content locally )
14 |
15 |
16 | ## App Screenshots
17 | 
18 | 
19 | 
20 | 
21 | 
22 |
23 |
24 | ## App Link
25 | [click hear to download app](https://drive.google.com/file/d/1MsxpEnL3gvJHXLjKpLLj8aFEtOcT9Rt6/view?usp=sharing)
26 |
27 |
--------------------------------------------------------------------------------
/.idea/jarRepositories.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app"s APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
20 | # Kotlin code style for this project: "official" or "obsolete":
21 | kotlin.code.style=official
--------------------------------------------------------------------------------
/app/src/main/res/layout/popup_home.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
17 |
18 |
19 |
28 |
29 |
36 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/upload_popup.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
15 |
16 |
25 |
26 |
36 |
37 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.application'
3 | id 'kotlin-android'
4 | }
5 |
6 | android {
7 | compileSdkVersion 30
8 | buildToolsVersion "30.0.2"
9 |
10 | defaultConfig {
11 | applicationId "com.example.temp"
12 | minSdkVersion 16
13 | targetSdkVersion 30
14 | versionCode 1
15 | versionName "1.0"
16 |
17 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
18 | }
19 |
20 | buildTypes {
21 | release {
22 | minifyEnabled false
23 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
24 | }
25 | }
26 | compileOptions {
27 | sourceCompatibility JavaVersion.VERSION_1_8
28 | targetCompatibility JavaVersion.VERSION_1_8
29 | }
30 | kotlinOptions {
31 | jvmTarget = '1.8'
32 | }
33 | }
34 |
35 | dependencies {
36 |
37 | implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
38 | implementation 'androidx.core:core-ktx:1.2.0'
39 | implementation 'androidx.appcompat:appcompat:1.1.0'
40 | implementation 'com.google.android.material:material:1.1.0'
41 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
42 | testImplementation 'junit:junit:4.+'
43 | androidTestImplementation 'androidx.test.ext:junit:1.1.1'
44 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
45 | }
--------------------------------------------------------------------------------
/app/src/main/res/layout/homepage.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
19 |
20 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_programme_page.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
18 |
19 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/programme_card.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 |
14 |
18 |
19 |
28 |
29 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/temp/Activities/CodeScreen.kt:
--------------------------------------------------------------------------------
1 | package com.example.temp.Activities
2 |
3 | import android.content.ClipData
4 | import android.content.ClipboardManager
5 | import android.content.Context
6 | import android.os.Bundle
7 | import android.widget.Button
8 | import android.widget.TextView
9 | import android.widget.Toast
10 | import androidx.appcompat.app.AppCompatActivity
11 | import com.example.temp.R
12 |
13 | class CodeScreen : AppCompatActivity() {
14 |
15 | private lateinit var codeTV:TextView
16 | private lateinit var programmeNameTV : TextView
17 | private lateinit var copyButton : TextView
18 |
19 | override fun onCreate(savedInstanceState: Bundle?) {
20 | super.onCreate(savedInstanceState)
21 | setContentView(R.layout.activity_code_screen)
22 |
23 |
24 | var programmeName = intent.getStringExtra("programmeName").toString()
25 | var code = intent.getStringExtra("code").toString()
26 |
27 | title = programmeName
28 |
29 |
30 | codeTV = findViewById(R.id.code)
31 | programmeNameTV = findViewById(R.id.programmeNameTV)
32 | copyButton = findViewById(R.id.copyCode)
33 |
34 | codeTV.text = code
35 | programmeNameTV.text = programmeName
36 |
37 |
38 | copyButton.setOnClickListener{
39 | copyTextToClipboard(code)
40 | }
41 |
42 | }
43 |
44 | private fun copyTextToClipboard(textToCopy: String) {
45 | val clipboard = getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
46 | val clipData = ClipData.newPlainText("text", textToCopy)
47 | clipboard.setPrimaryClip(clipData)
48 | Toast.makeText(this, "Text copied to clipboard", Toast.LENGTH_LONG).show()
49 | }
50 | }
--------------------------------------------------------------------------------
/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/layout/topic_card.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
18 |
19 |
30 |
31 |
41 |
42 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/temp/Adapters/Adapter1.kt:
--------------------------------------------------------------------------------
1 | package com.example.temp.Adapters
2 |
3 | import android.content.Context
4 | import android.content.Intent
5 | import android.view.LayoutInflater
6 | import android.view.View
7 | import android.view.ViewGroup
8 | import android.widget.Button
9 | import android.widget.ImageView
10 | import android.widget.TextView
11 | import android.widget.Toast
12 | import androidx.appcompat.view.menu.ActionMenuItemView
13 | import androidx.recyclerview.widget.RecyclerView
14 | import com.example.temp.Activities.CodeScreen
15 | import com.example.temp.Database.Database
16 | import com.example.temp.Models.ProgrameData
17 | import com.example.temp.Models.TopicData
18 | import com.example.temp.R
19 |
20 | class Adapter1(val context: Context,val programmeList:ArrayList,val tableName:String):RecyclerView.Adapter()
21 | {
22 | inner class ViewHolder(itemView: View):RecyclerView.ViewHolder(itemView)
23 | {
24 | fun bindItems(programme: ProgrameData, position: Int)
25 | {
26 | var ProgrammeName = itemView.findViewById(R.id.programeName)
27 | var deleteBTN = itemView.findViewById(R.id.deleteProgrammeBtn)
28 | ProgrammeName.text = "$position) " + programme.programeName
29 |
30 |
31 | deleteBTN.setOnClickListener {
32 | val database = Database(context)
33 | database.deleteProgramme(programme.programeName,tableName)
34 | programmeList.removeAt(position)
35 | notifyItemRemoved(position)
36 | Toast.makeText(context,"${programme.programeName} deleted successfully ",Toast.LENGTH_SHORT).show()
37 | }
38 |
39 | itemView.setOnClickListener {
40 |
41 | val intent = Intent(context,CodeScreen::class.java)
42 | intent.putExtra("programmeName",programme.programeName)
43 | intent.putExtra("code",programme.programmeCode)
44 | context.startActivity(intent)
45 | }
46 |
47 | }
48 | }
49 |
50 | override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
51 | val v = LayoutInflater.from(context).inflate(R.layout.programme_card,parent,false)
52 | return ViewHolder(v)
53 | }
54 |
55 | override fun onBindViewHolder(holder: ViewHolder, position: Int) {
56 | holder.bindItems(programmeList[position],position)
57 | }
58 |
59 | override fun getItemCount(): Int {
60 | return programmeList.size
61 | }
62 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/example/temp/Adapters/Adapter0.kt:
--------------------------------------------------------------------------------
1 | package com.example.temp.Adapters
2 |
3 | import android.app.Activity
4 | import android.content.Context
5 | import android.content.Intent
6 | import android.view.LayoutInflater
7 | import android.view.View
8 | import android.view.ViewGroup
9 | import android.widget.ImageView
10 | import android.widget.TextView
11 | import android.widget.Toast
12 | import androidx.recyclerview.widget.RecyclerView
13 | import com.example.temp.Activities.ProgrammePage
14 | import com.example.temp.Database.Database
15 | import com.example.temp.Models.TopicData
16 | import com.example.temp.R
17 |
18 |
19 | class Adapter0(val context: Context, val topicList: ArrayList):RecyclerView.Adapter()
20 | {
21 |
22 | inner class ViewHolder(itemView: View):RecyclerView.ViewHolder(itemView)
23 | {
24 |
25 | fun bindItems(topic: TopicData, position: Int)
26 | {
27 | var topicName = itemView.findViewById(R.id.topicName)
28 | var topicDescription = itemView.findViewById(R.id.topicDescription)
29 | var deleteButton = itemView.findViewById(R.id.deleteTopicBtn)
30 |
31 | topicName.text = "TOPIC : " + topic.topicName
32 | topicDescription.text = "Description : "+topic.topicDescription
33 |
34 | deleteButton.setOnClickListener{
35 | val db = Database(context)
36 | db.deleteTopic(topic.topicName)
37 | //startActivity(context,Intent(context,HomePage::class.java),null)
38 | topicList.removeAt(position)
39 | notifyItemRemoved(position)
40 | Toast.makeText(context,"${topic.topicName} deleted successfully ",Toast.LENGTH_SHORT).show()
41 | }
42 |
43 |
44 | itemView.setOnClickListener {
45 | val intent = Intent(context, ProgrammePage::class.java)
46 | intent.putExtra("tableName", topic.topicName)
47 | context.startActivity(intent)
48 | // (context as Activity).finish()
49 | }
50 | }
51 | }
52 |
53 | override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
54 | val v = LayoutInflater.from(context).inflate(R.layout.topic_card, parent, false)
55 | return ViewHolder(v)
56 | }
57 |
58 | override fun onBindViewHolder(holder: ViewHolder, position: Int)
59 | {
60 | holder.bindItems(topicList[position], position)
61 | }
62 |
63 | override fun getItemCount(): Int {
64 | return topicList.size
65 | }
66 | }
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_code_screen.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
18 |
19 |
27 |
37 |
38 |
39 |
40 |
41 |
42 |
50 |
55 |
70 |
71 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/temp/Activities/HomePage.kt:
--------------------------------------------------------------------------------
1 | package com.example.temp.Activities
2 |
3 | import android.content.Intent
4 | import androidx.appcompat.app.AppCompatActivity
5 | import android.os.Bundle
6 | import android.text.TextUtils
7 | import android.util.Log
8 | import android.view.View
9 | import android.widget.Button
10 | import android.widget.EditText
11 | import androidx.appcompat.app.AlertDialog
12 | import androidx.recyclerview.widget.LinearLayoutManager
13 | import androidx.recyclerview.widget.RecyclerView
14 | import com.example.temp.Adapters.Adapter0
15 | import com.example.temp.Database.Database
16 | import com.example.temp.Models.TopicData
17 | import com.example.temp.R
18 | import com.google.android.material.floatingactionbutton.FloatingActionButton
19 |
20 | class HomePage : AppCompatActivity()
21 | {
22 | private lateinit var adapter : RecyclerView.Adapter<*>
23 | private lateinit var rv: RecyclerView
24 | private lateinit var lm :RecyclerView.LayoutManager
25 |
26 | private lateinit var databaseTopicList : ArrayList
27 | private lateinit var topicList:ArrayList
28 |
29 | private lateinit var fab:FloatingActionButton
30 | private lateinit var database: Database
31 | private lateinit var programmeTableName:String
32 |
33 | private var dialogBuilder:AlertDialog.Builder? = null
34 | private var dialog:AlertDialog? = null
35 |
36 | override fun onCreate(savedInstanceState: Bundle?) {
37 | super.onCreate(savedInstanceState)
38 | setContentView(R.layout.homepage)
39 |
40 | title = "CODE ORGANIZER"
41 |
42 | database = Database(this)
43 |
44 | topicList = ArrayList()
45 | databaseTopicList = ArrayList()
46 |
47 | adapter = Adapter0(this,topicList)
48 | rv = findViewById(R.id.homeRv)
49 | lm = LinearLayoutManager(this)
50 | rv.adapter = adapter
51 | rv.layoutManager = lm
52 |
53 |
54 | if(database.getTopicCount() != 0)
55 | {
56 | databaseTopicList = database.getAllTopics()
57 |
58 | for( topic in databaseTopicList.iterator())
59 | {
60 |
61 | var t = TopicData(topic.topicName,topic.topicDescription)
62 | topicList.add(t);
63 | }
64 | adapter.notifyDataSetChanged()
65 | }
66 | adapter.notifyDataSetChanged()
67 |
68 | fab = findViewById(R.id.topicAddFab)
69 | }
70 |
71 |
72 |
73 |
74 | fun addTopic(view: View)
75 | {
76 | var pop = layoutInflater.inflate(R.layout.popup_home,null)
77 |
78 | var topicName = pop.findViewById(R.id.editTopicNameET).text
79 | var topicDes = pop.findViewById(R.id.editTopicDescriptionET).text
80 | var btn = pop.findViewById