Android Open Source - android-full-screen-player App Home Activity






From Project

Back to project page android-full-screen-player.

License

The source code is released under:

MIT License

If you think the Android project android-full-screen-player 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.android.fullscreen;
/*from  w  w w .ja  v  a 2s . c  om*/
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.util.Log;
import android.view.Menu;
import android.view.View;

public class AppHomeActivity extends Activity {

  /**
   * Log tag for logcat.
   */
  private static final String LOG_TAG = AppHomeActivity.class.getSimpleName();

  /**
   * Big Buck Bunny Trailer Video - Licese: Creative Commons Attribution 3.0 <br>
   * Credits: Blender.org, see more info at - http://www.bigbuckbunny.org/
   */
  private static final String PLAYABLE_CONTENT_URL = "http://mirror.cessen.com/blender.org/peach/trailer/trailer_iphone.m4v";

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_app_home);
  }

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

  public void onViewClicked(View view) {
    switch (view.getId()) {
    case R.id.btn_launch_player:
      Log.d(LOG_TAG, "onViewClicked() : btn_launch_player.");
      // Launch the player activity
      Intent intent = new Intent(this, MyPlayerActivity.class);
      intent.putExtra(MyPlayerActivity.BUNDLE_KEY_CONTENT_URL,
          PLAYABLE_CONTENT_URL);
      startActivity(intent);
      break;

    default:
      Log.d(LOG_TAG, "onViewClicked() : Not handled.");
      break;
    }
  }
}




Java Source Code List

com.example.android.fullscreen.AppHomeActivity.java
com.example.android.fullscreen.FullscreenActivity.java
com.example.android.fullscreen.MyPlayerActivity.java
com.example.android.fullscreen.util.SystemUiHiderBase.java
com.example.android.fullscreen.util.SystemUiHiderHoneycomb.java
com.example.android.fullscreen.util.SystemUiHider.java