示例#1
0
 @Override
 public void onPause() {
   super.onPause();
   if (mediaSource != null) {
     mediaSource.getSource().removeListener(this);
   }
 }
示例#2
0
 @Override
 public void onResume() {
   super.onResume();
   if (mediaSource != null) {
     mediaSource.getSource().addListener(this);
     onSourceDataChanged();
     onSourceStateChanged();
   }
 }
示例#3
0
  @Override
  public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    super.onCreateOptionsMenu(menu, inflater);

    if (peerType == PeerType.PEER_CHAT) {
      getSherlockActivity()
          .getSupportActionBar()
          .setTitle(highlightTitleText(R.string.st_media_title_group));
    } else if (peerType == PeerType.PEER_USER) {
      getSherlockActivity()
          .getSupportActionBar()
          .setTitle(highlightTitleText(R.string.st_media_title_user));
    } else {
      getSherlockActivity()
          .getSupportActionBar()
          .setTitle(highlightTitleText(R.string.st_media_title_all));
    }
    getSherlockActivity().getSupportActionBar().setSubtitle(null);
    getSherlockActivity().getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    getSherlockActivity().getSupportActionBar().setDisplayShowHomeEnabled(false);
  }
示例#4
0
 @Override
 public void onConfigurationChanged(Configuration newConfig) {
   super.onConfigurationChanged(newConfig);
   updateOrientation();
 }
示例#5
0
 @Override
 public void onDestroyView() {
   super.onDestroyView();
   gridView = null;
 }
示例#6
0
 @Override
 public void onSaveInstanceState(Bundle outState) {
   super.onSaveInstanceState(outState);
   outState.putInt("peerType", peerType);
   outState.putInt("peerId", peerId);
 }