Android Open Source - movie-db Main Activity






From Project

Back to project page movie-db.

License

The source code is released under:

MIT License

If you think the Android project movie-db listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.example.my_movie_db;
/*ww  w .j  av  a  2 s .  c  o m*/
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class MainActivity extends Activity implements OnClickListener{
  
  EditText EtMvName;
  Button BtSearch;
  Bundle bundle = new Bundle();

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    
    EtMvName = (EditText)findViewById(R.id.et_mvname);
    BtSearch = (Button)findViewById(R.id.bt_search);
    
    BtSearch.setOnClickListener(this);
    
    
    
  }

  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.main, menu);
    return true;
  }

  @Override
  public void onClick(View v) {
    // TODO Auto-generated method stub
    String mv_name = EtMvName.getText().toString();
    
    Intent i = new Intent(MainActivity.this,MvResult.class);
    bundle.putString("movie", mv_name);
    i.putExtras(bundle);
    startActivity(i);
  }

}




Java Source Code List

com.example.my_movie_db.MainActivity.java
com.example.my_movie_db.MvResult.java
com.example.my_movie_db.OurViewClient.java
com.example.my_movie_db.ShowDialog.java