Back to project page misound.
The source code is released under:
Apache License
If you think the Android project misound 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 com.xiaomi.mitv.soundbarapp; //w ww. j a v a 2s . c om import android.media.AudioManager; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentActivity; import com.xiaomi.mitv.soundbarapp.player.PlayerFragment; /** * Created by chenxuetong on 9/24/14. */ public class TestActivity extends FragmentActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setVolumeControlStream(AudioManager.STREAM_MUSIC); Fragment f = getSupportFragmentManager().findFragmentByTag("player"); if(f == null){ f = new PlayerFragment(); getSupportFragmentManager().beginTransaction() .add(android.R.id.content, f, "player") .commit(); } } }