-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
45 additions
and
38 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
25 changes: 13 additions & 12 deletions
25
app/src/main/java/com/madrat/abiturhelper/ui/result/ResultPresenter.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 |
---|---|---|
@@ -1,19 +1,20 @@ | ||
package com.madrat.abiturhelper.ui.result | ||
|
||
class ResultPresenter(private var rv: ResultVP.View) : ResultVP.Presenter { | ||
import android.content.Context | ||
import android.os.Bundle | ||
|
||
lateinit var maths : String | ||
class ResultPresenter (private var rv: ResultVP.View, private val arguments: Bundle) : ResultVP.Presenter { | ||
|
||
/*val maths = arguments?.getString("maths") | ||
maths_value.text = maths | ||
val russian = arguments?.getString("russian") | ||
val physics = arguments?.getString("physics") | ||
val computerScience = arguments?.getString("computerScience") | ||
val socialScience = arguments?.getString("socialScience")*/ | ||
override fun returnString(key: String?):String? { | ||
return arguments.getInt(key).toString() | ||
} | ||
|
||
override fun addEgeScore(): String { | ||
return rv.setEgeScore() | ||
override fun returnSum():String? { | ||
val maths = arguments.getInt("maths") | ||
val russian = arguments.getInt("russian") | ||
val physics = arguments.getInt("physics") | ||
val computerScience = arguments.getInt("computerScience") | ||
val socialScience = arguments.getInt("socialScience") | ||
return (maths + russian + physics + computerScience + socialScience).toString() | ||
} | ||
} |
12 changes: 7 additions & 5 deletions
12
app/src/main/java/com/madrat/abiturhelper/ui/result/ResultVP.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 |
---|---|---|
@@ -1,15 +1,17 @@ | ||
package com.madrat.abiturhelper.ui.result | ||
|
||
import android.os.Bundle | ||
import android.widget.LinearLayout | ||
import android.widget.TextView | ||
|
||
interface ResultVP { | ||
interface View { | ||
fun setMVP() | ||
|
||
fun setEgeScore(): String | ||
fun setupMVP() | ||
fun checkField(linearLayout: LinearLayout, textViewValue: TextView, key: String) | ||
fun setupFields() | ||
} | ||
|
||
interface Presenter { | ||
fun addEgeScore(): String | ||
fun returnSum():String? | ||
fun returnString(key: String?):String? | ||
} | ||
} |
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
2 changes: 0 additions & 2 deletions
2
app/src/main/java/com/madrat/abiturhelper/ui/setup_score/SetupScoreVP.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
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