LoginSignup
3
3

More than 5 years have passed since last update.

Androidでblinkタグを使う

Posted at

AndroidのUIのレイアウトはXMLで記述しますが、実はここで<blink>タグが使用できます!!

MainActivity.kt
class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
    }
}
layout/activity_main
<?xml version="1.0" encoding="utf-8"?>
<blink xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:text="Hello World!" />

</blink>

ピカピカ点滅します。

AndroidのLayoutInflaterのソースを読んでいたら発見しました。761行目付近です。

LayoutInflater
if (name.equals(TAG_1995)) {
    // Let's party like it's 1995!
    return new BlinkLayout(context, attrs);
}
3
3
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
3
3