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
| package com.kekyazilim.mvpblog | |
| import com.kekyazilim.mvpblog.util.DateCalculationManager | |
| class MainActivityPresenter(dateCalculationManager: DateCalculationManager) : MainActivityContract.Presenter { | |
| private lateinit var mView: MainActivityContract.View | |
| private var mDateCalculationManager = dateCalculationManager | |
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"?> | |
| <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:tools="http://schemas.android.com/tools" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| tools:context=".MainActivity"> | |
| <LinearLayout | |
| 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
| package com.kekyazilim.mvpblog | |
| interface MainActivityContract { | |
| interface View { | |
| fun showDate(date: String) | |
| fun bindViews() |
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
| package com.kekyazilim.mvpblog | |
| import com.kekyazilim.mvpblog.util.DateCalculationManager | |
| class MainActivityPresenter(dateCalculationManager: DateCalculationManager) : MainActivityContract.Presenter { | |
| private lateinit var mView: MainActivityContract.View | |
| private var mDateCalculationManager = dateCalculationManager | |
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
| package com.kekyazilim.mvpblog | |
| import android.support.v7.app.AppCompatActivity | |
| import android.os.Bundle | |
| import android.widget.Button | |
| import android.widget.TextView | |
| import com.kekyazilim.mvpblog.util.DateCalculationManager | |
| class MainActivity : AppCompatActivity(), MainActivityContract.View { |
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
| package com.kekyazilim.mvpblog.util | |
| import java.sql.Date | |
| import java.text.DateFormat | |
| import java.util.* | |
| /** | |
| * Responsible to manage date calculation process | |
| * @author ismailgungor | |
| * @since 1.0 |
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
| fun lookIntoUnknownClass(sample: Any) { | |
| val sampleClass = sample.javaClass | |
| Log.d("Ref_Name", sampleClass.name) | |
| Log.d("Ref_SimpleName", sampleClass.simpleName) | |
| Log.d("Ref_IsArray", "${sampleClass.isArray}") | |
| Log.d("Ref_IsInterface", "${sampleClass.isInterface}") |
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( | |
| @KBindTranslateView(value = R.id.tv_fail_message, key = "fail_message") holder: View | |
| ) : AppCompatActivity() { | |
| @KBindTranslateView(value = R.id.tv_fail_message, key = "fail_message") | |
| lateinit var tvFail: TextView | |
| @KBindTranslateView(value = R.id.btn_try, key = "try") | |
| lateinit var btnTry: Button |
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
| package com.kekyazilim.annotationreflectionexample.translator.kotlin | |
| import kotlin.annotation.Retention | |
| @Retention(AnnotationRetention.RUNTIME) | |
| @Target(AnnotationTarget.FIELD) | |
| annotation class KBindTranslateView( | |
| val value: Int, | |
| val key: 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
| package com.kekyazilim.annotationreflectionexample.translator.fakes | |
| import org.json.JSONObject | |
| class FakeTranslatorJson { | |
| private fun provideFakeJson(): String { | |
| return "{\n" + | |
| " \"try\": {\n" + | |
| " \"tr\": \"Dene\",\n" + |
OlderNewer