package prem.firstApp;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;
public class FirstAppActivity extends Activity implements OnClickListener
{
Button b1;
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
b1=(Button)findViewById(R.id.b1id);
b1.setOnClickListener(this);
}
@Override
public void onClick(View v)
{
Toast.makeText(this, "Hello, This is my First App", Toast.LENGTH_LONG).show();
}
}
No comments:
Post a Comment