Commit b73268e2 authored by Donald's avatar Donald

added progress deleting media

parent f6401cae
......@@ -551,9 +551,9 @@ public class MainActivity extends SharedMediaActivity {
((TextView) findViewById(R.id.nothing_to_show_text_emoji_easter_egg)).setTextColor(getSubTextColor());
findViewById(R.id.ll_emoji_easter_egg).setVisibility(
albumsMode && getAlbums().albums.size() == 0
|| !albumsMode && getAlbum().getMedia().size() == 0
&& SP.getInt("emoji_easter_egg", 0)==1
? View.VISIBLE : View.GONE);
|| !albumsMode && getAlbum().getMedia().size() == 0
&& SP.getInt("emoji_easter_egg", 0)==1
? View.VISIBLE : View.GONE);
findViewById(R.id.nothing_to_show_placeholder).setVisibility(
albumsMode && getAlbums().albums.size() == 0
|| !albumsMode && getAlbum().getMedia().size() == 0
......@@ -784,10 +784,13 @@ public class MainActivity extends SharedMediaActivity {
case R.id.delete_action:
class DeletePhotos extends AsyncTask<String, Integer, Boolean> {
private AlertDialog dialog;
@Override
protected void onPreExecute() {
swipeRefreshLayout.setRefreshing(true);
super.onPreExecute();
dialog = AlertDialogsHelper.getProgressDialog(MainActivity.this, getString(R.string.delete), getString(R.string.deleting_images));
dialog.show();
}
@Override
......@@ -823,7 +826,7 @@ public class MainActivity extends SharedMediaActivity {
supportInvalidateOptionsMenu();
checkNothing();
swipeRefreshLayout.setRefreshing(false);
dialog.dismiss();
}
}
......
......@@ -25,7 +25,6 @@ import org.horaapps.leafpic.model.Album;
import org.horaapps.leafpic.model.HandlingAlbums;
import org.horaapps.leafpic.util.ColorPalette;
import org.horaapps.leafpic.util.PermissionUtils;
import org.horaapps.leafpic.util.PreferenceUtil;
import org.horaapps.leafpic.util.StringUtils;
import java.io.File;
......@@ -51,13 +50,10 @@ public class SplashScreen extends SharedMediaActivity {
private Album tmpAlbum;
private PreferenceUtil SP;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(org.horaapps.leafpic.R.layout.activity_splash);
SP = PreferenceUtil.getInstance(getApplicationContext());
getWindow().getDecorView().setSystemUiVisibility(
......
......@@ -80,9 +80,9 @@
and this could make the media inaccessible from other apps. Use the exclude option to avoid this.
</string>
<string name="delete_album_message">Are you sure you want to delete this album?</string>
<string name="delete_albums_message">Are you sure you want to delete the selected albums?</string>
<string name="delete_albums_message">Are you sure you want to delete the all selected albums?</string>
<string name="delete_photo_message">Are you sure you want to delete this media?</string>
<string name="delete_photos_message">Are you sure you want to delete the selected media?</string>
<string name="delete_photos_message">Are you sure you want to delete all the selected media?</string>
<string name="hide_albums_message">Are you sure you want to hide the selected albums?</string>
<string name="unhide_album_message">Un-hiding this album you will also make the media available for other apps.</string>
......@@ -357,4 +357,5 @@ and this could make the media inaccessible from other apps. Use the exclude opti
<string name="error_occured_open_media">An error occurred opening this media.</string>
<string name="error_thumbnail">Unable to find a thumbnail for the album!</string>
<string name="no_app_to_perform">Unable to found an app to perform this action.</string>
<string name="deleting_images">We are thorwing away all your media!</string>
</resources>
......@@ -6,7 +6,7 @@ buildscript {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0-beta3'
classpath 'com.android.tools.build:gradle:2.3.0-beta4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment