Skip to content

Commit

Permalink
Words App and Quizime App Added
Browse files Browse the repository at this point in the history
Issues :
Words App -> NO ISSUES YET
Quizime -> There's some logical error that I am skipping in the submit button of quizactivity . I checked alot and tried to implement a lot of changes. Snr. Dev's help will be appericiated .
  • Loading branch information
theyashgrover committed Aug 19, 2021
1 parent 211db83 commit e99dd5a
Show file tree
Hide file tree
Showing 171 changed files with 4,101 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Quizime/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
3 changes: 3 additions & 0 deletions Quizime/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Quizime/.idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions Quizime/.idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions Quizime/.idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions Quizime/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions Quizime/.idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Quizime/app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
47 changes: 47 additions & 0 deletions Quizime/app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-android-extensions'
}

android {
compileSdkVersion 30
buildToolsVersion "30.0.3"

defaultConfig {
applicationId "com.example.quizime"
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}

dependencies {

implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.6.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
testImplementation 'junit:junit:4.+'
implementation 'com.google.android.material:material:1.1.0-alpha06'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
21 changes: 21 additions & 0 deletions Quizime/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.example.quizime

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.example.quizime", appContext.packageName)
}
}
29 changes: 29 additions & 0 deletions Quizime/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.quizime">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Quizime">
<activity android:name=".ResultActivity"></activity>
<activity
android:name=".QuizQuestionsActivity"
android:screenOrientation="portrait" />
<activity
android:name=".MainActivity"
android:screenOrientation="portrait"
android:theme="@style/NoActionBarTheme"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
48 changes: 48 additions & 0 deletions Quizime/app/src/main/java/com/example/quizime/Constants.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package com.example.quizime

object Constants {

const val USER_NAME : String = "user_name"
const val TOTAL_QUESTIONS : String = "total_questions"
const val CORRECT_ANSWERS : String = "correct_answers"

fun getQuestions(): ArrayList<Question>{
val questionsList = ArrayList<Question>()

//questions start here

val que1 = Question(1,"Which Anime Character is this ?" ,
R.drawable.img_1 ,
"Monkey D. Luffy" , "Usopp" , "Marshal D. Teech" ,
"Gol D. Roger" ,1)
questionsList.add(que1)

val que2 = Question(2,"Which Anime show does this Character belongs to ?" ,
R.drawable.img_2 ,
"One Piece" , "Naruto" , "Tokyo Revengers" ,
"Tokyo Ghoul" ,4)
questionsList.add(que2)

val que3 = Question(3,"Which legendary show does this Character belongs to ?" ,
R.drawable.img_3,
"One Piece" , "Naruto" , "Tokyo Revengers" ,
"Dragon Ball" ,4)
questionsList.add(que3)

val que4 = Question(4,"Is he Light Yagami ?" ,
R.drawable.img_4,
"Yes" , "definiteLy" , "You're wrong , he's awesome" ,
"He's L" ,3)
questionsList.add(que4)

val que5 = Question(5,"Which fruit this guy ate ?" ,
R.drawable.img_5,
"Gumo Gumo ni" , "Mera Mera no Mi" , "Fire-Fire fruit" ,
"Flame-Fist fruit" ,2)
questionsList.add(que5)

return questionsList
}


}
27 changes: 27 additions & 0 deletions Quizime/app/src/main/java/com/example/quizime/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.example.quizime

import android.content.Intent
import android.os.Bundle
import android.view.View
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)

window.decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_FULLSCREEN
submitbtn.setOnClickListener{
if (eett_name.text.toString().isEmpty()){
Toast.makeText(this,"Please Enter A Valid Name",Toast.LENGTH_SHORT).show()
}else{
val intent = Intent(this , QuizQuestionsActivity::class.java)
intent.putExtra(Constants.USER_NAME , eett_name.text.toString())
startActivity(intent)
finish()
}
}
}
}
4 changes: 4 additions & 0 deletions Quizime/app/src/main/java/com/example/quizime/Question.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.example.quizime

data class Question (val id: Int , val question :String , val image: Int , val optionOne : String ,
val optionTwo : String , val optionThree : String , val optionFour : String , val correctAnswer : Int)
Loading

0 comments on commit e99dd5a

Please sign in to comment.