Back to project page LyricHere.
The source code is released under:
Apache License
If you think the Android project LyricHere listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package cn.zhaiyifan.lyrichere.ui; //from w w w. j a va2 s . co m import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.view.Menu; import android.view.MenuItem; import android.widget.Toast; import cn.zhaiyifan.lyrichere.Constants; import cn.zhaiyifan.lyrichere.R; public class LyricPlayerActivity extends ActionBarActivity implements LyricPlayerFragment.OnFragmentInteractionListener { private static final String TAG = LyricPlayerActivity.class.getSimpleName(); @Override public void onBackPressed() { //super.onBackPressed(); moveTaskToBack(true); } /** * Override onNewIntent to get new intent when re-entering * * @param intent */ @Override protected void onNewIntent(Intent intent) { super.onNewIntent(intent); setIntent(intent); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); String path = getIntent().getStringExtra(Constants.Column.PATH); String encoding = getIntent().getStringExtra(Constants.Column.ENCODING); setContentView(R.layout.activity_lyric_player); if (savedInstanceState == null) { getSupportFragmentManager().beginTransaction() .add(R.id.container, LyricPlayerFragment.newInstance(path, encoding)) .commit(); } } @Override protected void onStop() { super.onStop(); } @Override protected void onResume() { super.onResume(); } @Override public boolean onCreateOptionsMenu(Menu menu) { return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { return super.onOptionsItemSelected(item); } public void onFragmentInteraction(Uri uri) { Toast toast = Toast.makeText(this, "Ya!", Toast.LENGTH_SHORT); toast.show(); } }