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 SimpleListActivity : BaseActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_simple_list) | |
ButterKnife.bind(this) | |
} | |
companion object { | |
val SIMPLE_LIST_KEY = "SIMPLE_LIST_KEY" |
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 SimpleListActivity : BaseActivity() { | |
@BindView(R.id.back) | |
lateinit var back: AppCompatImageView | |
@BindView(R.id.listViewMore) | |
lateinit var listView: ListView | |
@BindView(R.id.moreToolbar) | |
lateinit var toolbar: RelativeLayout |
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 SimpleListActivity : BaseActivity() { | |
@BindView(R.id.back_IV) | |
lateinit var backMore: AppCompatImageView | |
@BindView(R.id.recyclerViewMore) | |
lateinit var recyclerView: RecyclerView | |
@BindView(R.id.moreBannerImage) | |
lateinit var bannerImage: ImageView |
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 SimpleListActivityViewPresenter { | |
fun loadBanner() | |
fun configureRecyclerView() | |
fun refreshView() | |
fun setOnClickListeners() | |
fun getActivity(): FragmentActivity | |
} |
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 SimpleListActivityPresenter { | |
fun onCreate() | |
fun onResume() | |
fun setOnBackPressed(backMore: AppCompatImageView) | |
fun setOnSignInClicked(moreSignInButton: Button) | |
fun setOnRegisterClicked(moreRegisterButton: Button) | |
fun refreshView(notLoggedInArea: View, recyclerView: RecyclerView) | |
fun configureRecyclerView(recyclerView: RecyclerView) | |
fun loadBannerImage(bannerImage: ImageView) |
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 SimpleListActivityViewPresenterLogic constructor(private val simpleListActivityViewPresenter: SimpleListActivityViewPresenter) : | |
SimpleListActivityPresenter { | |
/** | |
* Lifecycle functions | |
*/ | |
override fun onCreate() { | |
simpleListActivityViewPresenter.setOnClickListeners() | |
simpleListActivityViewPresenter.loadBannerImage() |
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 SimpleListActivity : | |
BaseActivity(), SimpleListActivityViewPresenter { | |
@BindView(R.id.back_IV) | |
lateinit var backMore: AppCompatImageView | |
@BindView(R.id.recyclerViewMore) | |
lateinit var recyclerView: RecyclerView | |
@BindView(R.id.moreBannerImage) |
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
/** | |
* o1----------------------o | |
* | | | |
* | | | |
* | | | |
* o-----------------------o2 | |
* | |
* @param topLeftPoint would be o1 | |
* @param bottomleftPoint would be o2 | |
*/ |
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
@RunWith(Parameterized::class) | |
class RectangleModelTestConstructorBased constructor( | |
private val o1: Point, | |
private val o2: Point, | |
private val expected: Boolean) { | |
companion object { | |
@JvmStatic | |
@Parameterized.Parameters | |
fun data(): MutableList<Array<out Any?>>? { |
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
@RunWith(Parameterized::class) | |
class RectangleModelTestWeakAccesses { | |
@JvmField | |
@Parameterized.Parameter(0) | |
var o1: Point? = null | |
@JvmField | |
@Parameterized.Parameter(1) | |
var o2: Point? = null | |
@JvmField |
OlderNewer