HI全通值, 这是我的A级,其中上按一下按钮,即时发送一个int变量B类如何通过意向
Intent bgIntent = new Intent(Background.this, MainScreen.class);
bgIntent.putExtra("background", bgColor);
startActivity(bgIntent);
和B类
Intent bgIntent = getIntent();
bgGlobal = bgIntent.getIntExtra("background",-1);
if(bgGlobal == 0)
{
DetailsTextView.setBackgroundResource(R.color.a0);
}
else
if(bgGlobal == 1)
{
DetailsTextView.setBackgroundResource(R.color.a1);
}
但问题是,我得到一个空白view.My的观点并没有想出的TextView。 是这个正确设置背景
“DetailsTextView.setBackgroundResource” ???
请编辑您的问题,正确的格式德代码,以便它是可读的。 – Maragues 2010-08-11 11:25:41