This repository has been archived by the owner on Nov 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from stanfy/sasha/ui-images-deps
Move 'images' dependency from 'ui' module to 'assist'
- Loading branch information
Showing
7 changed files
with
55 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...c/main/java/com/stanfy/enroscar/assist/util/ImagesManagerCrucialGUIOperationListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package com.stanfy.enroscar.assist.util; | ||
|
||
import com.stanfy.enroscar.activities.CrucialGUIOperationManager; | ||
import com.stanfy.enroscar.beans.BeansContainer; | ||
import com.stanfy.enroscar.beans.EnroscarBean; | ||
import com.stanfy.enroscar.beans.InitializingBean; | ||
import com.stanfy.enroscar.images.ImagesManager; | ||
|
||
/** | ||
* Pause image loading on crucial GUI operations. | ||
* @author Olexandr Tereshchuk - "Stanfy" | ||
* @since 28.05.14 | ||
*/ | ||
@EnroscarBean(value = ImagesManagerCrucialGUIOperationListener.BEAN_NAME) | ||
public class ImagesManagerCrucialGUIOperationListener implements CrucialGUIOperationManager.CrucialGUIOperationListener, InitializingBean { | ||
|
||
/** Bean name. */ | ||
public static final String BEAN_NAME = "ImagesManagerCrucialGUIOperationListener"; | ||
|
||
/** Images manager. */ | ||
private ImagesManager imagesManager; | ||
|
||
@Override | ||
public void onStartCrucialGUIOperation() { | ||
if (imagesManager != null) { | ||
imagesManager.pauseLoading(); | ||
} | ||
} | ||
|
||
@Override | ||
public void onFinishCrucialGUIOperation() { | ||
if (imagesManager != null) { | ||
imagesManager.resumeLoading(); | ||
} | ||
} | ||
|
||
@Override | ||
public void onInitializationFinished(final BeansContainer beansContainer) { | ||
imagesManager = beansContainer.getBean(ImagesManager.class); | ||
final CrucialGUIOperationManager manager = beansContainer.getBean(CrucialGUIOperationManager.class); | ||
if (manager != null) { | ||
manager.addCrucialGUIOperationListener(this); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters