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 PicassoImageHelper: IImageProcess { | |
| private val mPicassoInstance = Picasso.get() | |
| override fun loadUrl(url: String, targetView: ImageView) { | |
| mPicassoInstance.load(url).into(targetView) | |
| } | |
| override fun loadUri(uri: Uri, targetView: ImageView) { | |
| mPicassoInstance.load(uri).into(targetView) |
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 GlideImageHelper(context: Context) : IImageProcess { | |
| private val mGlideInstance = Glide.with(context) | |
| override fun loadUrl(url: String, targetView: ImageView) { | |
| mGlideInstance.load(url).into(targetView) | |
| } | |
| override fun loadUri(uri: Uri, targetView: ImageView) { | |
| mGlideInstance.load(uri).into(targetView) |
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 MainActivity : AppCompatActivity() { | |
| private lateinit var ivEvent: ImageView | |
| private lateinit var ivOwner: ImageView | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| setContentView(R.layout.activity_main) | |
| ivEvent = findViewById(R.id.iv_event) |
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
| interface BasePresenter<T : BaseView> { | |
| fun setView(view: T) | |
| fun create() | |
| } |
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
| interface BaseView { | |
| fun bindViews() | |
| fun showProgress() {} | |
| fun hideProgress() {} | |
| } |
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
| interface SplashActivityContract { | |
| interface View : BaseView{ | |
| fun finishActivity() | |
| } | |
| interface Presenter: BasePresenter<View>{ | |
| //Silence is golden |
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
| /** | |
| * Responsible to manage Handler Process | |
| * | |
| * @author ismailgungor | |
| * @since 1.0 | |
| */ | |
| class HandlerProcessManagement { | |
| companion object { | |
| const val DEFAULT_HANDLER_DURATION = 2000L |
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
| interface HandlerCallback { | |
| fun onCompleted() | |
| } |
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
| /** | |
| * Responsible to manage intent process | |
| * | |
| * @author ismailgungor | |
| * @since 1.0 | |
| */ | |
| class IntentHelper(private val context: Context) { | |
| /** | |
| * This method provides an intent which opens Main Activity |
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
| @Module | |
| class AppModule(val context: Context) { | |
| @Provides | |
| fun provideContext(): Context{ | |
| return context | |
| } | |
| } |