Added rule executing feedback

This commit is contained in:
M66B
2020-02-02 20:22:41 +01:00
parent 6904ec6b2d
commit db5df4e358
2 changed files with 11 additions and 0 deletions

View File

@@ -34,6 +34,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.appcompat.widget.PopupMenu;
@@ -275,6 +276,11 @@ public class AdapterRule extends RecyclerView.Adapter<AdapterRule.ViewHolder> {
args.putLong("id", rule.id);
new SimpleTask<Integer>() {
@Override
protected void onPreExecute(Bundle args) {
ToastEx.makeText(context, R.string.title_executing, Toast.LENGTH_LONG).show();
}
@Override
protected Integer onExecute(Context context, Bundle args) throws JSONException, MessagingException, IOException {
long id = args.getLong("id");

View File

@@ -1143,6 +1143,11 @@ public class FragmentRule extends FragmentBase {
@Override
public void onClick(View v) {
new SimpleTask<Integer>() {
@Override
protected void onPreExecute(Bundle args) {
ToastEx.makeText(getContext(), R.string.title_executing, Toast.LENGTH_LONG).show();
}
@Override
protected Integer onExecute(Context context, Bundle args) throws Throwable {
EntityRule rule = new EntityRule();