Android开发,点击按钮跳转页面时,能跳转,但不显示布局,只有空白

2025-03-22 09:25:54
推荐回答(2个)
回答(1):

public void onCreat(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.one);//载入one.xml
button3=(Button)findViewById(R.id.button3);
button3.setOnClickListener(button3Listener);
}你的这个和
@Override
protected void onCreate(Bundle savedInstanceState)是两个东西

回答(2):

你的one.xml文件有布局吗