TextView
クリックしたらウェブサイトを開く
<TextView
android:textColor="@android:color/holo_blue_light"
android:text="利用規約及びプライバシーポリシーに同意する"
andriod:clickable="true"
android:focusable="true" />
tvPolicy.setOnClickKsitener {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://yahoo.co.jp/"))
startActivity()
}
表示・非表示を切り替える
<TextView
andriod:text="チェックされていません"
android:visibility="gone" />
if ( name.isEmpty() ) {
tvNameError.visibility = View.VISIBLE
return@setOnClickListener
}
※逆にView.GONEによって非表示にすることも出来ます
BACK