下記ソースコードですと、「TextView01」に2回文字列を指定していることになっています。
おそらくやりたいこととしては、以下のようになるのではないでしょうか。
import sample.Sc.R;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class Firesc2 extends Activity {
@Override protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.show);
TextView tv = ( TextView ) findViewById (R.id. TextView01 );
tv. setText ("テスト1");
findViewById (R.id. TextView02 );
tv = ( TextView ) findViewById (R.id. TextView02 );
tv. setText (" テスト2");
}
または、
TextView tv = ( TextView ) findViewById (R.id. TextView01 );
tv. setText ("テスト1");
findViewById (R.id. TextView02 );
TextView tv2 = ( TextView ) findViewById (R.id. TextView02 );
tv2. setText (" テスト2");
以上です。
2010年7月12日11:12 160yen <160...@gmail.com>:
> --
> このメールは Google グループのグループ「日本Androidの会」の登録者に送られています。
> このグループに投稿するには、android-g...@googlegroups.com にメールを送信してください。
> このグループから退会するには、android-group-j...@googlegroups.com にメールを送信してください。
> 詳細については、http://groups.google.com/group/android-group-japan?hl=ja からこのグループにアクセスしてください。
>
>
--
☆゜・*:.。. .。.:*・゜☆゜・*:.。. .。.:*・゜☆゜・*:.。. .。.:*・゜☆゜・*:.。. .。.:*・゜☆
Digital Rabbit - てんき
Mail:tenki...@gmail.com
ditital....@gmail.com
☆゜・*:.。. .。.:*・゜☆゜・*:.。. .。.:*・゜☆゜・*:.。. .。.:*・゜☆゜・*:.。. .。.:*・゜☆
以下、修正です。
import sample.Sc.R;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class Firesc2 extends Activity {
@Override protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.show);
TextView tv = ( TextView ) findViewById (R.id. TextView01 );
tv. setText ("テスト1");
tv = ( TextView ) findViewById (R.id. TextView02 );
tv. setText (" テスト2");
}
または、
TextView tv = ( TextView ) findViewById (R.id. TextView01 );
tv. setText ("テスト1");
TextView tv2 = ( TextView ) findViewById (R.id. TextView02 );
tv2. setText (" テスト2");
これで行けるはずです。
2010年7月12日11:21 てんき <tenki...@gmail.com>: