当前位置:编程学习 > wap >>

新手求助

package com.Activity01;

import android.app.Activity;
import android.os.Bundle;
import android.widget.Button;
import android.widget.TextView;
public class Activity01<Button> extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        TextView myTextview = (TextView)findViewById(R.id.myTextView);
        @SuppressWarnings("unchecked")
Button myButton = (Button)findViewById(R.id.myButton);
        myTextview.setText("我的第一个textview");
        myButton.setText("我的第一个button");
    }

}
想知道哪里出了错误  --------------------编程问答-------------------- R.layout.main中定义了吗 --------------------编程问答-------------------- 求助你个大头鬼,错在哪不会自己执行一下? --------------------编程问答-------------------- <Button> 要干嘛
补充:移动开发 ,  Android
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,