请问我这个程序的错误如何改写?还有警告如何改写?谢谢

[复制链接]
查看11 | 回复1 | 2010-10-21 08:34:16 | 显示全部楼层 |阅读模式
package wei.guess;
import android.app.Activity;
import android.content.Intent;
import android.location.GpsStatus.Listener;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
public class First_guess extends Activity {

/** Called when the activity is first created. */

//@Override
private Button key,next,prior,home;

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.first_guess);

key=(Button)findViewById(R.id.key);

next=(Button)findViewById(R.id.next);

prior=(Button)findViewById(R.id.prior);

home=(Button)findViewById(R.id.home);

home.setOnClickListener(new homeListener());



}


public class homeListener implements Listener, OnClickListener{
public void OnClick(View v){
if(v.getId()==R.id.home)
{
Intent intent=new Intent(First_guess.this,Activity_guess.class);
startActivity(intent);
}

}
}
}


回复

使用道具 举报

千问 | 2010-10-21 08:34:16 | 显示全部楼层
抱歉,走错门了,【JAVA相关】在隔壁!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行