Пример #1
0
  @Override
  protected void onResume() {

    super.onResume();
    if (!mConfigurationChangedToLandscape) {
      FileDetailFragment fragment =
          (FileDetailFragment)
              getSupportFragmentManager().findFragmentByTag(FileDetailFragment.FTAG);
      fragment.updateFileDetails(false);
    }
  }
Пример #2
0
 @Override
 public void onServiceConnected(ComponentName component, IBinder service) {
   if (component.equals(new ComponentName(FileDetailActivity.this, FileDownloader.class))) {
     Log.d(TAG, "Download service connected");
     mDownloaderBinder = (FileDownloaderBinder) service;
   } else if (component.equals(new ComponentName(FileDetailActivity.this, FileUploader.class))) {
     Log.d(TAG, "Upload service connected");
     mUploaderBinder = (FileUploaderBinder) service;
   } else {
     return;
   }
   FileDetailFragment fragment =
       (FileDetailFragment)
           getSupportFragmentManager().findFragmentByTag(FileDetailFragment.FTAG);
   if (fragment != null)
     fragment.updateFileDetails(
         false); // let the fragment gets the mDownloadBinder through getDownloadBinder() (see
                 // FileDetailFragment#updateFileDetais())
 }
Пример #3
0
 @Override
 public void onClick(View view) {
   switch (view.getId()) {
     case R.id.ok:
       {
         mNewFilename =
             ((TextView) getView().findViewById(R.id.user_input)).getText().toString();
         mResult = true;
       }
     case R.id.cancel:
       { // fallthought
         dismiss();
         mListener.onDismiss(this);
       }
   }
 }