Remove question to see folder with exported sessions

Instead of asking the user if they want to see the folder with the exported sessions file, it will just show a toast with "Sessions exported" (translated if possible)
This commit is contained in:
MovingEarth 2021-02-06 18:33:27 +01:00
parent 1d2d6a5c5a
commit e6d7861855
15 changed files with 14 additions and 99 deletions

View File

@ -2309,44 +2309,7 @@ public class MeditationAssistant extends Application {
Log.e("MeditationAssistant", "Error exporting sessions to " + uri.toString(), e);
return;
}
View exp = LayoutInflater.from(activity).inflate(
R.layout.sessions_exported,
activity.findViewById(R.id.sessionsExported_root));
TextView txtSessionsExportedPath = exp.findViewById(R.id.txtSessionsExportedPath);
txtSessionsExportedPath.setText(uri.toString());
AlertDialog sessionsExportedDialog = new AlertDialog.Builder(activity)
.setIcon(getResources().getDrawable(getTheme().obtainStyledAttributes(getMATheme(true), new int[]{R.attr.actionIconSignOut}).getResourceId(0, 0)))
.setTitle(getString(R.string.exportSessions))
.setView(exp)
.setPositiveButton(getString(R.string.yes), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface,
int which) {
Uri selectedUri = Uri.parse(uri.getPath());
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(selectedUri, "resource/folder");
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
if (intent.resolveActivityInfo(getPackageManager(), 0) != null) {
startActivity(intent);
} else {
longToast(getString(R.string.installFileManager));
}
dialogInterface.dismiss();
}
})
.setNegativeButton(getString(R.string.no), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface,
int which) {
dialogInterface.dismiss();
}
})
.create();
sessionsExportedDialog.show();
longToast(getString(R.string.sessionExportWasSuccessful));
}
public void updateWidgets() {

View File

@ -1,48 +0,0 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/sessionsExported_root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:descendantFocusability="beforeDescendants"
android:focusableInTouchMode="true">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:orientation="vertical"
android:padding="10dp">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:clickable="false"
android:includeFontPadding="true"
android:paddingBottom="4dp"
android:text="@string/showExportedSessions"
android:textAppearance="?android:attr/textAppearanceMedium"
tools:ignore="RtlSymmetry" />
<TextView
android:id="@+id/txtSessionsExportedPath"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:clickable="false"
android:includeFontPadding="true"
android:text=""
android:textAppearance="?android:attr/textAppearanceSmall"
tools:ignore="RtlSymmetry" />
</LinearLayout>
</RelativeLayout>
</RelativeLayout>

View File

@ -110,7 +110,7 @@
<string name="edit">Bearbeiten</string>
<string name="exportSessions">Sitzungen exportieren</string>
<string name="sessionExportFailed">Exportieren der Sitzungen nicht möglich</string>
<string name="showExportedSessions">Sitzungen exportiert. Möchten Sie das Verzeichnis öffnen, in das der Export gespeichert wurde?</string>
<string name="sessionExportWasSuccessful">Sitzungen exportiert.</string>
<string name="sessionStartedAt">Begonnen um %s</string>
<string name="started">Begonnen</string>
<string name="completed">Abgeschlossen</string>

View File

@ -107,7 +107,7 @@
<string name="add">Πρόσθεσε</string>
<string name="exportSessions">Εξήγαγε συνεδρίες</string>
<string name="sessionExportFailed">Αδυνατόν να εξαγάγει συνεδρίες</string>
<string name="showExportedSessions">Συνεδρίες εξήχθησαν. Θα θέλατε να περιηγηθείτε στον φάκελο που περιέχει την εξαγωγή;</string>
<string name="sessionExportWasSuccessful">Συνεδρίες εξήχθησαν.</string>
<string name="sessionStartedAt">Ξεκίνησε στις %s</string>
<string name="started">Ξεκίνησε</string>
<string name="completed">Ολοκληρώθηκε</string>

View File

@ -105,7 +105,7 @@
<string name="add">Añadir</string>
<string name="exportSessions">Exportar sesiones </string>
<string name="sessionExportFailed">No se puede exportar sesiones </string>
<string name="showExportedSessions">Sesiones exportadas. ¿Quiere navegar a la carpeta conteniendo la exportación?</string>
<string name="sessionExportWasSuccessful">Sesiones exportadas.</string>
<string name="sessionStartedAt">Iniciada a las %s</string>
<string name="started">Iniciada</string>
<string name="completed">Completada</string>

View File

@ -300,7 +300,7 @@
<string name="editSessionMeditating">Incapaz de editar una sesión mientras se medita</string>
<string name="invalidLength">Duración inválida</string>
<string name="length">Duración</string>
<string name="showExportedSessions">Sesiones exportadas. Desearía usted elegir la observar la carpeta que contiene lo exportado\?</string>
<string name="sessionExportWasSuccessful">Sesiones exportadas.</string>
<string name="sessionExportFailed">Incapaz de exportar sesiones</string>
<string name="exportSessions">Exportar sesiones</string>
<string name="edit">Editar</string>

View File

@ -107,7 +107,7 @@
<string name="add">Ajouter</string>
<string name="exportSessions">Exporter les séances</string>
<string name="sessionExportFailed">Impossible d\'exporter les séances</string>
<string name="showExportedSessions">Les séances ont été exportées. Voulez-vous ouvrir le dossier contenant le fichier exporté \?</string>
<string name="sessionExportWasSuccessful">Les séances ont été exportées.</string>
<string name="sessionStartedAt">Démarré à %s</string>
<string name="started">Démarrée</string>
<string name="completed">Terminée</string>

View File

@ -98,7 +98,7 @@
<string name="add">Aggiungi</string>
<string name="exportSessions">Esporta sessione</string>
<string name="sessionExportFailed">Impossibile esportare le sessione</string>
<string name="showExportedSessions">Sessioni esportate. Vuoi visitare la cartella con i file esportati?</string>
<string name="sessionExportWasSuccessfull">Sessioni esportate.</string>
<string name="sessionStartedAt">Iniziata alle %s</string>
<string name="started">Iniziata</string>
<string name="completed">Completata</string>

View File

@ -110,7 +110,7 @@
<string name="edit">編集</string>
<string name="exportSessions">セッションをエクスポート</string>
<string name="sessionExportFailed">セッションをエクスポートできません</string>
<string name="showExportedSessions">セッションをエクスポートしました。エクスポートしたファイルを含むフォルダーを表示しますか?</string>
<string name="sessionExportWasSuccessful">セッションをエクスポートしました。</string>
<string name="sessionStartedAt">開始 %s</string>
<string name="started">開始しました</string>
<string name="completed">完了しました</string>

View File

@ -114,7 +114,7 @@
<string name="edit">Rediger</string>
<string name="exportSessions">Eksporter økter</string>
<string name="sessionExportFailed">Kunne ikke eksportere økter</string>
<string name="showExportedSessions">Økter eksportert. Ønsker du å utforske mappen inneholdende eksporten\?</string>
<string name="sessionExportWasSuccessful">Økter eksportert.</string>
<string name="sessionStartedAt">Startet klokken %s</string>
<string name="started">Startet</string>
<string name="completed">Fullført</string>

View File

@ -110,7 +110,7 @@
<string name="edit">Edytuj</string>
<string name="exportSessions">Eksportuj sesje</string>
<string name="sessionExportFailed">Nie można eksportować sesji</string>
<string name="showExportedSessions">Sesje wyeksportowane. Chciał(a)byś przejrzeć folder je zawierający?</string>
<string name="sessionExportWasSuccessful">Sesje wyeksportowane.</string>
<string name="sessionStartedAt">Rozpoczęto o %s</string>
<string name="started">Rozpoczęto</string>
<string name="completed">Ukończono</string>

View File

@ -116,7 +116,7 @@ Segure para escolher valor predefinido</string>
<string name="edit">Editar</string>
<string name="exportSessions">Exportar sessões</string>
<string name="sessionExportFailed">Não foi possível exportar as sessões</string>
<string name="showExportedSessions">Sessões exportadas. Quer localizar a pasta contendo os arquivos?</string>
<string name="sessionExportWasSuccessful">Sessões exportadas.</string>
<string name="sessionStartedAt">Iniciada em %s</string>
<string name="started">Iniciada</string>
<string name="completed">Completo</string>

View File

@ -167,7 +167,7 @@
<string name="edit">Editar</string>
<string name="exportSessions">Exportar sessões</string>
<string name="sessionExportFailed">Não foi possível exportar as sessões</string>
<string name="showExportedSessions">Sessões exportadas. Quer localizar a pasta contendo os exportados\?</string>
<string name="sessionExportWasSuccessful">Sessões exportadas.</string>
<string name="length">Duração</string>
<string name="invalidLength">Duração inválida</string>
<string name="editSessionMeditating">Impossível editar uma sessão enquanto medita</string>

View File

@ -236,7 +236,7 @@
<string name="edit">Изменить</string>
<string name="exportSessions">Экспорт сеансов</string>
<string name="sessionExportFailed">Невозможно экспортировать сеансы</string>
<string name="showExportedSessions">Сеансы экспортированы. Вы хотите открыть папку с ними\?</string>
<string name="sessionExportWasSuccessful">Сеансы экспортированы.</string>
<string name="length">Продолжительность</string>
<string name="invalidLength">Неверная продолжительность</string>
<string name="editSessionMeditating">Невозможно изменить сеанс во время медитации</string>

View File

@ -132,7 +132,7 @@
<string name="edit">Edit</string>
<string name="exportSessions">Export sessions</string>
<string name="sessionExportFailed">Unable to export sessions</string>
<string name="showExportedSessions">Sessions exported. Would you like to browse the folder containing the export?</string>
<string name="sessionExportWasSuccessful">Sessions exported.</string>
<string name="sessionStartedAt">Started at %s</string>
<string name="started">Started</string>
<string name="completed">Completed</string>