Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
1,595 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package com.example.puyadaily | ||
|
||
import android.content.Intent | ||
import android.net.Uri | ||
import androidx.appcompat.app.AppCompatActivity | ||
import android.os.Bundle | ||
import android.view.View | ||
|
||
class MainActivity : AppCompatActivity() { | ||
|
||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.activity_main) | ||
} | ||
|
||
|
||
|
||
fun wiseManPuya(view: View) | ||
{ | ||
intent = Intent(this, Wise::class.java) | ||
startActivity(intent) | ||
} | ||
fun SongPuya(view: View) | ||
{ | ||
intent = Intent(this, Song::class.java) | ||
startActivity(intent) | ||
} | ||
|
||
fun quizFunc(view: View) | ||
{ | ||
intent = Intent(this, PlmQuiz::class.java) | ||
startActivity(intent) | ||
} | ||
fun mixYt(view: View) { | ||
val url = "https://www.youtube.com/watch?v=A-ESOXaVDYw" | ||
intent = Intent(Intent.ACTION_VIEW) | ||
intent.data = Uri.parse(url) | ||
startActivity(intent) | ||
} | ||
} |
177
PlmQuiz.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
package com.example.puyadaily | ||
|
||
import android.graphics.Color | ||
import android.os.Build | ||
import androidx.appcompat.app.AppCompatActivity | ||
import android.os.Bundle | ||
import android.view.View | ||
import android.widget.HorizontalScrollView | ||
import android.widget.ScrollView | ||
import android.widget.TextView | ||
import androidx.annotation.RequiresApi | ||
import androidx.core.view.isVisible | ||
import kotlinx.android.synthetic.main.activity_plm_quiz.* | ||
|
||
class PlmQuiz : AppCompatActivity() { | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.activity_plm_quiz) | ||
} | ||
|
||
var res1=0; | ||
var res2=0; | ||
var res3=0; | ||
|
||
|
||
fun chose11(view: View) | ||
{ | ||
res1++; | ||
layout1.setBackgroundColor(Color.GRAY) | ||
btn_1_1.setBackgroundColor(Color.TRANSPARENT) | ||
btn_1_2.setBackgroundColor(Color.TRANSPARENT) | ||
btn_1_3.setBackgroundColor(Color.TRANSPARENT) | ||
|
||
|
||
} | ||
|
||
fun chose12(view: View) | ||
{ | ||
res2++; | ||
layout1.setBackgroundColor(Color.GRAY) | ||
btn_1_1.setBackgroundColor(Color.TRANSPARENT) | ||
btn_1_2.setBackgroundColor(Color.TRANSPARENT) | ||
btn_1_3.setBackgroundColor(Color.TRANSPARENT) | ||
} | ||
|
||
fun chose13(view: View) | ||
{ | ||
res3++; | ||
layout1.setBackgroundColor(Color.GRAY) | ||
btn_1_1.setBackgroundColor(Color.TRANSPARENT) | ||
btn_1_2.setBackgroundColor(Color.TRANSPARENT) | ||
btn_1_3.setBackgroundColor(Color.TRANSPARENT) | ||
} | ||
|
||
|
||
|
||
|
||
fun chose21(view: View) | ||
{ | ||
res1++; | ||
layout2.setBackgroundColor(Color.GRAY) | ||
btn_2_1.setBackgroundColor(Color.TRANSPARENT) | ||
btn_2_2.setBackgroundColor(Color.TRANSPARENT) | ||
btn_2_3.setBackgroundColor(Color.TRANSPARENT) | ||
|
||
} | ||
|
||
fun chose22(view: View) | ||
{ | ||
res2++; | ||
layout2.setBackgroundColor(Color.GRAY) | ||
btn_2_2.setBackgroundColor(Color.TRANSPARENT) | ||
btn_2_2.setBackgroundColor(Color.TRANSPARENT) | ||
btn_2_3.setBackgroundColor(Color.TRANSPARENT) | ||
} | ||
|
||
fun chose23(view: View) | ||
{ | ||
res3++; | ||
layout2.setBackgroundColor(Color.GRAY) | ||
btn_2_1.setBackgroundColor(Color.TRANSPARENT) | ||
btn_2_2.setBackgroundColor(Color.TRANSPARENT) | ||
btn_2_3.setBackgroundColor(Color.TRANSPARENT) | ||
} | ||
|
||
|
||
|
||
|
||
fun chose31(view: View) | ||
{ | ||
res1++; | ||
layout3.setBackgroundColor(Color.GRAY) | ||
btn_3_1.setBackgroundColor(Color.TRANSPARENT) | ||
btn_3_2.setBackgroundColor(Color.TRANSPARENT) | ||
btn_3_3.setBackgroundColor(Color.TRANSPARENT) | ||
|
||
} | ||
|
||
fun chose32(view: View) | ||
{ | ||
res2++; | ||
layout3.setBackgroundColor(Color.GRAY) | ||
btn_3_2.setBackgroundColor(Color.TRANSPARENT) | ||
btn_3_2.setBackgroundColor(Color.TRANSPARENT) | ||
btn_3_3.setBackgroundColor(Color.TRANSPARENT) | ||
} | ||
|
||
fun chose33(view: View) | ||
{ | ||
res3++; | ||
layout3.setBackgroundColor(Color.GRAY) | ||
btn_3_1.setBackgroundColor(Color.TRANSPARENT) | ||
btn_3_2.setBackgroundColor(Color.TRANSPARENT) | ||
btn_3_3.setBackgroundColor(Color.TRANSPARENT) | ||
} | ||
|
||
|
||
fun chose41(view: View) | ||
{ | ||
res1++; | ||
layout4.setBackgroundColor(Color.GRAY) | ||
btn_4_1.setBackgroundColor(Color.TRANSPARENT) | ||
btn_4_2.setBackgroundColor(Color.TRANSPARENT) | ||
btn_4_3.setBackgroundColor(Color.TRANSPARENT) | ||
|
||
} | ||
|
||
fun chose42(view: View) | ||
{ | ||
res2++; | ||
layout4.setBackgroundColor(Color.GRAY) | ||
btn_4_1.setBackgroundColor(Color.TRANSPARENT) | ||
btn_4_2.setBackgroundColor(Color.TRANSPARENT) | ||
btn_4_3.setBackgroundColor(Color.TRANSPARENT) | ||
} | ||
|
||
fun chose43(view: View) | ||
{ | ||
res3++; | ||
layout4.setBackgroundColor(Color.GRAY) | ||
btn_4_1.setBackgroundColor(Color.TRANSPARENT) | ||
btn_4_2.setBackgroundColor(Color.TRANSPARENT) | ||
btn_4_3.setBackgroundColor(Color.TRANSPARENT) | ||
} | ||
|
||
fun resFun(view: View) | ||
{ | ||
scroll.visibility = View.INVISIBLE | ||
|
||
if(res1>=res2) | ||
{ | ||
if(res1>=res3) { | ||
results.setBackgroundResource(R.drawable.unu) | ||
|
||
} | ||
else | ||
results.setBackgroundResource(R.drawable.trei) | ||
|
||
} | ||
|
||
else{ | ||
if(res2>=res3) { | ||
results.setBackgroundResource(R.drawable.doi) | ||
} | ||
else | ||
results.setBackgroundResource(R.drawable.trei) | ||
|
||
} | ||
|
||
} | ||
|
||
|
||
|
||
|
||
|
||
} |
Oops, something went wrong.