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
| @Component(modules = [NetworkModule::class]) | |
| @Singleton | |
| interface AppComponent : ActivityDepsProvider { | |
| @Component.Builder | |
| interface Builder { | |
| fun build(): AppComponent | |
| } | |
| } |
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
| @Component(modules = [NetworkModule::class]) | |
| @Singleton | |
| interface AppComponent : ActivityDepsProvider { | |
| @Component.Builder | |
| interface Builder { | |
| fun build(): AppComponent | |
| } | |
| } |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:app="http://schemas.android.com/apk/res-auto" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent"> | |
| <androidx.recyclerview.widget.RecyclerView | |
| android:id="@+id/recyclerView" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:app="http://schemas.android.com/apk/res-auto" | |
| xmlns:tools="http://schemas.android.com/tools" | |
| android:layout_width="match_parent" | |
| android:layout_height="wrap_content" | |
| android:layout_marginTop="12dp"> | |
| <com.google.android.material.card.MaterialCardView | |
| android:layout_width="match_parent" |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:app="http://schemas.android.com/apk/res-auto" | |
| xmlns:tools="http://schemas.android.com/tools" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| tools:context=".view.MovieActivity"> | |
| <include | |
| android:id="@+id/errorView" |
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 |
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
| 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 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 LoginRepository @Inject constructor(private val loggedinApi : LoggedInApi) { | |
| fun isUserLoggedIn() : Boolean { | |
| return loggedInApi.isUserLoggedIn() | |
| } | |
| } |