Last active
August 18, 2018 19:36
-
-
Save saurabharora90/cede480e8a778488aae33da8d23cc941 to your computer and use it in GitHub Desktop.
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
private val customTabActivityHelper: CustomTabActivityHelper = | |
CustomTabActivityHelper(this, lifecycle, this) | |
override fun onClick(view: View) { | |
val viewId = view.id | |
val uri = Uri.parse(urlEditText.text.toString()) | |
when (viewId) { | |
R.id.button_may_launch_url -> customTabActivityHelper.mayLaunchUrl(uri) | |
R.id.start_custom_tab -> { | |
val customTabsIntent = CustomTabsIntent.Builder(customTabActivityHelper.session) | |
.build() | |
customTabsIntent.launchWithFallback( | |
this, uri, WebviewFallback()) | |
} | |
}//Unkown View Clicked | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment