【Android】AlertDialogでダイアログを表示する【Java/Kotlin】

今回はダイアログを表示してみようと思います。

ダイアログはエラー時やユーザに操作をしてほしい際によく使用します。

知っておくと便利です。

ダイアログを表示する

まずダイアログを表示します。(筆者はAcitivtyクラスで記述しています)

// ダイアログを表示する
new AlertDialog.Builder(this)
    .setTitle("タイトル")
    .setMessage("メッセージ")
    .create()
    .show();
// ダイアログを表示する
AlertDialog.Builder(this)
    .setTitle("タイトル")
    .setMessage("メッセージ")
    .create()
    .show()

setTitle()の説明

setTitleに指定した文字列がAlertDialogのタイトル部分に表示されます。

※ちなみに文字列が3行以上になると強制的に2行になります。(2行目以降は...表示)

setMessage()の説明

setMessageに指定した文字列がAlertDialogのメッセージ部分に表示されます。

show()の説明

showメソッドをコールするとAlertDialogが画面に表示されます。

ダイアログにOKボタンを表示する

ダイアログが表示できれば次はOKボタンも表示してみましょう

ユーザに処理を続けて良いか受け入れてもらうためにOKボタンを表示します。

// ダイアログを表示する
new AlertDialog.Builder(this)
        .setTitle("タイトル")
        .setMessage("メッセージ")
        .setPositiveButton("OK", (dialog, which) -> {
            // OKボタン押下時に実行したい処理を記述
        })
        .create()
        .show();
// ダイアログを表示する
AlertDialog.Builder(this)
    .setTitle("タイトル")
    .setMessage("メッセージ")
    .setPositiveButton("OK") { dialog, which ->
        // OKボタン押下時に実行したい処理を記述
    }
    .create()
    .show()

setPositiveButton()の説明

引数の型説明
第一引数CharSequenceボタンに表示する文字列
第二引数DialogInterface.OnClickListenerボタン押下時に実行する処理

これでOKボタンが表示できましたね!

ダイアログにキャンセルボタンを表示する

続いてはキャンセルボタンも表示しましょう!

ユーザが許可 or 拒否を選択できるようになります。

// ダイアログを表示する
new AlertDialog.Builder(this)
        .setTitle("タイトル")
        .setMessage("メッセージ")
        .setPositiveButton("OK", (dialog, which) -> {
            // OKボタン押下時に実行したい処理を記述
        })
        .setNegativeButton("キャンセル", (dialog, which) -> {
            // キャンセルボタン押下時に実行したい処理を記述
        })
        .create()
        .show();
// ダイアログを表示する
AlertDialog.Builder(this)
    .setTitle("タイトル")
    .setMessage("メッセージ")
    .setPositiveButton("OK") { dialog, which ->
        // OKボタン押下時に実行したい処理を記述
    }
    .setNegativeButton("キャンセル") { dialog, which ->
        // キャンセルボタン押下時に実行したい処理を記述
    }
    .create()
    .show()

setNegativeButton()の説明

引数の型説明
第一引数CharSequenceボタンに表示する文字列
第二引数DialogInterface.OnClickListenerボタン押下時に実行する処理

ダイアログにまた後でボタンを表示する

ユーザに許可 or 拒否が選択できるようになりましたが

許可も拒否も選択したくない場合があります。

そういう場合はまた後でボタンを表示して回避しましょう!

// ダイアログを表示する
new AlertDialog.Builder(this)
        .setTitle("タイトル")
        .setMessage("メッセージ")
        .setPositiveButton("OK", (dialog, which) -> {
            // OKボタン押下時に実行したい処理を記述
        })
        .setNegativeButton("キャンセル", (dialog, which) -> {
            // キャンセルボタン押下時に実行したい処理を記述
        })
        .setNeutralButton("また後で", (dialog, which) -> {
            // また後でボタン押下時に実行したい処理を記述
        })
        .create()
        .show();
// ダイアログを表示する
AlertDialog.Builder(this)
    .setTitle("タイトル")
    .setMessage("メッセージ")
    .setPositiveButton("OK") { dialog, which ->
        // OKボタン押下時に実行したい処理を記述
    }
    .setNegativeButton("キャンセル") { dialog, which ->
        // キャンセルボタン押下時に実行したい処理を記述
    }
    .setNeutralButton("また後で") { dialog, which ->
        // また後でボタン押下時に実行したい処理を記述
    }
    .create()
    .show()

setNeutralButton()の説明

引数の型説明
第一引数CharSequenceボタンに表示する文字列
第二引数DialogInterface.OnClickListenerボタン押下時に実行する処理

ダイアログ外タップ、バックキーでダイアログを閉じないようにする

AlertDialogはデフォルトでダイアログ外タップ、バックキーでが閉じてしまいます。

アプリの仕様によって閉じたくない場合は下記の処理を記述します。

// ダイアログを表示する
new AlertDialog.Builder(this)
        .setTitle("タイトル")
        .setMessage("メッセージ")
        .setPositiveButton("OK", (dialog, which) -> {
            // OKボタン押下時に実行したい処理を記述
        })
        .setCancelable(false)  <- ダイアログ外タップ、バックキーでダイアログを閉じないようにする
        .create()
        .show();
    }
// ダイアログを表示する
AlertDialog.Builder(this)
    .setTitle("タイトル")
    .setMessage("メッセージ")
    .setPositiveButton("OK") { dialog, which ->
        // OKボタン押下時に実行したい処理を記述
    }
    .setCancelable(false)
    .create()
    .show()

setCancelable()の説明

引数型説明
第一引数Booleanfalseにするとダイアログ外タップ、バックキーでダイアログを閉じないようになる

最後に

いかがでしたでしょうか

AlertDialogでダイアログが表示できるようになります。

それでは!

コメント

  1. […] 前回は、AlertDialogを表示する事を実施しました。 […]

タイトルと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

Warning: Undefined array key 107 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 108 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 109 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 110 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 111 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 112 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 113 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 114 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 115 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 116 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 117 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 118 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 119 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 120 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 121 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 122 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 123 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 124 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 125 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 126 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 127 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 128 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 129 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 130 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 131 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 132 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 133 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 134 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 135 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 136 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 137 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 138 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 139 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 140 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 141 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 142 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 143 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 144 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 145 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 146 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 147 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 148 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 149 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 150 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 151 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 152 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 153 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 154 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 155 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 156 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 157 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', 158) #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, 158) #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, 158) #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