タイトル | : 7日目:ボタンで表示文字を変える (TextView)のキャスト |
記事No | : 5604 |
投稿日 | : 2020/02/15(Sat) 18:41 |
投稿者 | : Tomo |
private TextView txt; txt = (TextView)this.findViewById(ID);
の TextView にリソースIDからオブジェクトをセットで、
(TextView) に 「Casting 'this.findViewById(...)' to 'TextView' is redundant less Ispection info: Reports unnesessary cast expressions. 」 などというキャスト不要のメッセージボックスが出てきます。
でも(TextView) あったほうがいいですよね?
|