This file contains hidden or 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
| new |
This file contains hidden or 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
| finalize |
This file contains hidden or 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
| <meta-data | |
| android:name="com.google.android.actions" | |
| android:resource="@xml/actions" /> |
This file contains hidden or 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
| data class(val playerName:String, val playerScore:Double, val playerId:Int, val sex:String) |
This file contains hidden or 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
| class PlayersRepository @Inject constructor(val playersApi:PlayersApi) { | |
| fun getPlayersData():Players { | |
| return playersApi.getPlayersData() | |
| } | |
| } |
This file contains hidden or 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
| class LoginRepository @Inject constructor(private val loggedinApi : LoggedInApi) { | |
| fun isUserLoggedIn() : Boolean { | |
| return loggedInApi.isUserLoggedIn() | |
| } | |
| } |
This file contains hidden or 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
| class PlayersUseCase @Inject constructor(private val loginRepository : LoginRepository, | |
| private val playersRepository : PlayersRepository) { | |
| fun getPlayersData() : PlayersData? { | |
| if(loginRepository.isUserLoggedIn() { | |
| return playersRepository.getPlayersData() | |
| } | |
| return null | |
| } | |
| } |
This file contains hidden or 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
| class PlayersPresenter { | |
| lateinit var playersUseCase:PlayersUseCase | |
| fun getPlayersList() : Players? { | |
| return playersUseCase.getPlayersData() | |
| } | |
| //ui manipulating | |
| fun addPrefixToPlayerName(private val sex:String, private val playersName:String) { | |
| if(sex.equals("Male"){ | |
| return "Mr"+ playersName |
This file contains hidden or 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
| class ViewDelegate{ | |
| private View view; | |
| public void draw(){ | |
| view.draw() | |
| } | |
| } |
This file contains hidden or 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
| plugins { | |
| id 'com.android.application' | |
| id 'kotlin-android' | |
| id "kotlin-android-extensions" | |
| id 'kotlin-kapt' | |
| } | |
| android { | |
| compileSdk 31 |
OlderNewer