0

i got 2 java files app.java and gallaery.java

App.java public class App extends Activity implements OnClickListener {

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);


    Button Listvideo = (Button) findViewById(R.id.Listvideo);
    Listvideo.setOnClickListener(this); 

public void onClick(View view) {

if (view == findViewById(R.id.Listvideo)) {

   // i have to call gallery.java here which executes list of images in the android pone 

  }

}

Srikanth Naidu
  • 787
  • 5
  • 16
  • 28
  • Duplicate of the question you asked 30 min ago? [how do i call a java file on click in another java class?](http://stackoverflow.com/questions/2865238/how-do-i-call-a-java-file-on-click-in-another-java-class) – aioobe May 19 '10 at 15:37
  • remormatted the question to understand it better – Srikanth Naidu May 19 '10 at 15:37

1 Answers1

0

Assuming Gallery.java also extends Activity you should call:

Intent mIntent = new Intent(this, Gallery.class);
startActivity(mIntent);
bdls
  • 4,578
  • 6
  • 24
  • 30