Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/sample kotlin #155

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

Feature/sample kotlin #155

wants to merge 5 commits into from

Conversation

Andrer757
Copy link
Member

@Andrer757 Andrer757 commented Mar 2, 2018

I was challenged by @NunoSSilva to create an kotlin sample for adal, so here it is. I add kotlin examples to readmes too.

Copy link
Member

@jzeferino jzeferino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have the time to fully review and test PR this weekend, but will do it ASAP.

override fun doOnCreated() {
findViewById<View>(R.id.btnDismiss)!!.setOnClickListener({ dismiss() })
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty line here.

}

override fun onStopRequestUpdate() {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency this method should have comment, has the others.

}

override fun onStopRequestUpdate() {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency this method should have comment, has the others.

disable 'InvalidPackage'
}
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty line


val btnAnalyticsSendEvent = findViewById<Button>(R.id.btnAnalyticsSendEvent)
btnAnalyticsSendEvent!!.setOnClickListener {
/*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment is mal formatted.

}

override fun onStopRequestUpdate() {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

miss the comment.

when (locationError) {
LocationError.DISABLED -> mTxtInfoUpdates!!.text = "Error: Location disabled"
LocationError.TIMEOUT -> mTxtInfoUpdates!!.text = "Error: Timeout getting location"
else -> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the else is mandatory here?

fun setOnErrorClickListener(listener: View.OnClickListener) {
mListener = listener
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty line

mRclItems!!.visibility = View.VISIBLE
mBtnTryAgain!!.visibility = View.GONE
mTxtMessage!!.visibility = View.GONE

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty line

override fun doOnCreated() {
activity!!.setTitle(R.string.sample_utils)

mBtnCheckPlayServicesExists = findViewById(R.id.btnCheckPlayservicesExists)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe join the lines that has findViewById

@jzeferino
Copy link
Member

@extmkv would like to hear your opinion on this since Im not fluent with the language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants