@Override
 public void onFragmentDestroy() {
   super.onFragmentDestroy();
   NotificationCenter.getInstance().removeObserver(this, NotificationCenter.contactsDidLoaded);
   NotificationCenter.getInstance().removeObserver(this, NotificationCenter.updateInterfaces);
   NotificationCenter.getInstance().removeObserver(this, NotificationCenter.chatDidCreated);
 }
 @Override
 public void onResume() {
   super.onResume();
   if (listAdapter != null) {
     listAdapter.notifyDataSetChanged();
   }
 }
 @Override
 public void onFragmentDestroy() {
   super.onFragmentDestroy();
   NotificationCenter.getInstance().removeObserver(this, MessagesController.updateInterfaces);
   NotificationCenter.getInstance().removeObserver(this, MessagesController.contactsDidLoaded);
   NotificationCenter.getInstance().removeObserver(this, MessagesController.mediaCountDidLoaded);
   NotificationCenter.getInstance().removeObserver(this, MessagesController.encryptedChatCreated);
   NotificationCenter.getInstance().removeObserver(this, MessagesController.encryptedChatUpdated);
 }
 @Override
 public void onFragmentDestroy() {
   super.onFragmentDestroy();
   NotificationCenter.getInstance().removeObserver(this, NotificationCenter.FileDidFailedLoad);
   NotificationCenter.getInstance().removeObserver(this, NotificationCenter.FileDidLoaded);
   NotificationCenter.getInstance()
       .removeObserver(this, NotificationCenter.FileLoadProgressChanged);
   NotificationCenter.getInstance().removeObserver(this, NotificationCenter.wallpapersDidLoaded);
 }
 @Override
 public void onResume() {
   super.onResume();
   if (listAdapter != null) {
     listAdapter.notifyDataSetChanged();
   }
   processSelectedBackground();
   fixLayout();
 }
Exemple #6
0
 @Override
 public void onFragmentDestroy() {
   super.onFragmentDestroy();
   for (SlideView v : views) {
     if (v != null) {
       v.onDestroyActivity();
     }
   }
   Utilities.HideProgressDialog(getParentActivity());
 }
  @Override
  public boolean onFragmentCreate() {
    super.onFragmentCreate();

    NotificationCenter.getInstance().addObserver(this, NotificationCenter.FileDidFailedLoad);
    NotificationCenter.getInstance().addObserver(this, NotificationCenter.FileDidLoaded);
    NotificationCenter.getInstance().addObserver(this, NotificationCenter.FileLoadProgressChanged);
    NotificationCenter.getInstance().addObserver(this, NotificationCenter.wallpapersDidLoaded);

    SharedPreferences preferences =
        ApplicationLoader.applicationContext.getSharedPreferences(
            "mainconfig", Activity.MODE_PRIVATE);
    selectedBackground = preferences.getInt("selectedBackground", 1000001);
    selectedColor = preferences.getInt("selectedColor", 0);
    MessagesStorage.getInstance().getWallpapers();
    File toFile =
        new File(ApplicationLoader.applicationContext.getFilesDir(), "wallpaper-temp.jpg");
    toFile.delete();
    return true;
  }
 @Override
 public void onFragmentDestroy() {
   super.onFragmentDestroy();
   NotificationCenter.getInstance()
       .removeObserver(this, MessagesController.notificationsSettingsUpdated);
 }
 @Override
 public void onConfigurationChanged(Configuration newConfig) {
   super.onConfigurationChanged(newConfig);
   fixLayout();
 }