0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

autolinkの使い方

Posted at

autolinkをはじめて使用したので使い方をメモする。

android:autoLink="web"
android:text="詳しくは https://www.google.com/ よりご確認ください。"
android:textColorLink="#0095d9"
<!-- 青色 -->

上記コードのようにautoLinkと1行書くだけで自動でリンク化することができる。
リンクの色はtextColorLinkで指定することができる。
リンクの前後で半角スペースなどを入れておいて、他の文字までリンク化するのを防ぐ。
複数をリンクかしたいときはandroid:autoLink="web|email"などと書くことによって自動で判別してくれる。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?