【Android】TextViewで文字を表示する方法【Java/Kotlin】

Androidで文字を表示したい場合は、基本TextViewを使用します。

TextViewは文字を表示するユーザーインターフェースです。

文字の大きさや色、フォント等のテキストに関する設定等できます

文字を表示する

TextViewをインスタンス生成しても文字はデフォルトで表示されません。

自身で設定しましょう!

// TextViewのインスタンスを取得
TextView textView = findViewById(R.id.textView);
// 表示文字を設定する
textView.setText("Hello World!!");
// TextViewのインスタンスを取得
val textView = findViewById<TextView>(R.id.textView)
// 表示文字を設定する
textView.text = "Hello World!!"
    <TextView
        android:id="@+id/textView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!" /> <- 表示文字を設定する

文字の色を変更する

文字色はデフォルト(初期色)は黒です。

他の色を設定したい場合は変更しましょう!

// TextViewのインスタンスを取得
TextView textView = findViewById(R.id.textView);
// 文字の色を変更する
textView.setTextColor(Color.BLUE);
// TextViewのインスタンスを取得
val textView = findViewById<TextView>(R.id.textView)
// 文字の色を変更する
textView.setTextColor(Color.BLUE)
    <TextView
        android:id="@+id/textView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!!"
        android:textColor="#0000FF" /> <- 文字の色を変更する

文字の大きさを変更する

文字の大きさのデフォルトは端末ごとに異なります。(だいたい14spが設定されています)

端末間で統一できるように設定しましょう!

// TextViewのインスタンスを取得
TextView textView = findViewById(R.id.textView);
// 文字の大きさを変更する
textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 24);
// TextViewのインスタンスを取得
val textView = findViewById<TextView>(R.id.textView)
// 文字の大きさを変更する
textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 24f)
    <TextView
        android:id="@+id/textView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!!"
        android:textSize="24dp" /> <- 文字の大きさを変更する

文字を太字にする

TextViewでは文字を強調することも可能です!

// TextViewのインスタンスを取得
TextView textView = findViewById(R.id.textView);
// 文字を太字にする
textView.setTypeface(Typeface.DEFAULT_BOLD);
// TextViewのインスタンスを取得
val textView = findViewById<TextView>(R.id.textView)
// 文字を太字にする
textView.typeface = Typeface.DEFAULT_BOLD
    <TextView
        android:id="@+id/textView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!!"
        android:textStyle="bold" /> <- 文字を太字にする

最後に

TextViewはAndroid開発に携わる上でほぼ必須と思います。

上記で紹介した機能はごく一部ですが上記方法を知っていると

だいたいのAndroid開発は乗り越えれられると思います!

コメント

タイトルとURLをコピーしました

Warning: Undefined array key 0 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 1 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 2 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 3 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 4 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 5 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 6 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 7 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 8 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 9 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 10 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 11 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 12 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 13 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 14 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 15 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 16 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 17 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 18 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 19 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 20 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 21 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 22 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 23 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 24 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 25 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 26 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 27 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 28 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 29 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 30 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 31 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 32 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 33 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 34 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 35 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 36 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 37 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 38 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 39 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 40 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 41 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 42 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 43 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 44 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 45 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 46 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 47 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 48 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 49 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 50 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 51 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 52 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 53 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 54 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 55 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 56 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 57 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 58 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 59 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 60 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 61 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 62 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 63 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 64 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 65 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 66 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 67 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 68 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 69 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 70 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 71 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 72 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 73 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 74 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 75 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 76 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 77 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 78 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 79 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 80 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 81 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 82 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 83 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 84 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 85 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 86 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 87 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 88 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 89 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 90 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 91 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 92 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 93 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 94 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 95 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 96 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 97 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 98 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 99 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 100 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 101 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 102 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 103 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 104 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 105 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Warning: Undefined array key 106 in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/DomFormatter.php on line 54

Fatal error: Uncaught Error: Call to a member function getWord() on null in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Util/JsonUtil.php:55 Stack trace: #0 /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Formatter/JsonFormatter.php(59): Weglot\Util\JsonUtil::set(Object(Weglot\Client\Api\WordCollection), Array, 'headline', 107) #1 /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Parser.php(604): Weglot\Parser\Formatter\JsonFormatter->handle(Array, 107) #2 /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Parser.php(615): Weglot\Parser\Parser->formatters('\n{\n "@context"...', Object(Weglot\Client\Api\TranslateEntry), Array, 107) #3 /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Parser/Parser.php(394): Weglot\Parser\Parser->formatters('<!doctype html>...', Object(Weglot\Client\Api\TranslateEntry), Array) #4 /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/src/services/class-translate-service-weglot.php(259): Weglot\Parser\Parser->translate('<!doctype html>...', 'ja', 'en', Array, 'https://android...') #5 [internal function]: WeglotWP\Services\Translate_Service_Weglot->weglot_treat_page('<!doctype html>...', 9) #6 /home/androidtech/android-tech.jp/public_html/wp-includes/functions.php(5471): ob_end_flush() #7 /home/androidtech/android-tech.jp/public_html/wp-includes/class-wp-hook.php(324): wp_ob_end_flush_all('') #8 /home/androidtech/android-tech.jp/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #9 /home/androidtech/android-tech.jp/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #10 /home/androidtech/android-tech.jp/public_html/wp-includes/load.php(1304): do_action('shutdown') #11 [internal function]: shutdown_action_hook() #12 {main} thrown in /home/androidtech/android-tech.jp/public_html/wp-content/plugins/weglot/vendor/weglot/weglot-php/src/Util/JsonUtil.php on line 55