Hey guys
im trying to create a image button app but it always comes up with source code not found?
i have tryed it using diffrent project bases ( 2.1 and 1.6)
why wont it work?
my code is below
im trying to create a image button app but it always comes up with source code not found?
i have tryed it using diffrent project bases ( 2.1 and 1.6)
why wont it work?
my code is below
Code:
package com.ryanteck.buttontest;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class easybutton extends Activity {
/** Called when the activity is first created. */
@SuppressWarnings("unused")
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button button = (Button)findViewById(R.id.ImageButton01);
TextView text = (TextView)findViewById(R.string.hello);
button.setOnClickListener(new View.OnClickListener() {
@SuppressWarnings("null")
public void onClick(View v) {
TextView text = null;
text.setText("button pressed");
}
});
}
}