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
/** | |
* Кастомное вью для реализации индикатора загрузки в виде тени, покрывающей изображение и уменьшающейся | |
* сверху вниз по мере увеличения прогресса | |
*/ | |
public final class RoundedRectProgress extends View { | |
private static final String DEF_COLOR = "#b2000000"; | |
private static final int DEF_CORNER = 10; | |
private int cornerSize; | |
private Paint shadowPaint = new Paint(Paint.ANTI_ALIAS_FLAG); |
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
public void addPhotoToList(String path) { | |
if (photoInfoList.size() > 0 | |
&& photoInfoList.get(photoInfoList.size() - 1).getImageFilePath().equals(path)) { | |
// может получиться так, что новая фотография уже | |
// попала в список во время пересоздания активити | |
// в таком случае повторно добавлять её туда не нужно | |
return; | |
} | |
if (photoInfoList.size() == 0) { | |
photoInfoList.add(new PhotoInfo(path)); |