Modified information file dialog to show unknown uploader

This commit is contained in:
Helena Rodriguez 2012-12-07 13:38:19 +01:00
parent 862811903a
commit 77d747079b
3 changed files with 10 additions and 2 deletions

View File

@ -265,5 +265,6 @@ Seleccione: Sesiones de prácticas - Nueva</string>
<string name="downloadProblemTitle">Problema en descarga</string> <string name="downloadProblemTitle">Problema en descarga</string>
<string name="downloadProblemMsg">Lo sentimos. La descarga fue interrumpida. Inténtelo de nuevo</string> <string name="downloadProblemMsg">Lo sentimos. La descarga fue interrumpida. Inténtelo de nuevo</string>
<string name="downloadCompletedTitle"> Descarga completa </string> <string name="downloadCompletedTitle"> Descarga completa </string>
<string name="unknown">Desconocido</string>
</resources> </resources>

View File

@ -276,4 +276,5 @@ configuration anytime using the "Clean Database" option\n\nDo you want to contin
<string name="downloadProblemTitle">Download problem</string> <string name="downloadProblemTitle">Download problem</string>
<string name="downloadProblemMsg">Sorry. The download of file was interrupted. Try again</string> <string name="downloadProblemMsg">Sorry. The download of file was interrupted. Try again</string>
<string name="downloadCompletedTitle"> Download completed </string> <string name="downloadCompletedTitle"> Download completed </string>
<string name="unknown">Unknown</string>
</resources> </resources>

View File

@ -453,8 +453,14 @@ public class DownloadsManager extends MenuActivity {
Date d = new Date(time * 1000); Date d = new Date(time * 1000);
java.text.DateFormat dateShortFormat = android.text.format.DateFormat.getDateFormat(this); java.text.DateFormat dateShortFormat = android.text.format.DateFormat.getDateFormat(this);
java.text.DateFormat timeFormat = android.text.format.DateFormat.getTimeFormat(this); java.text.DateFormat timeFormat = android.text.format.DateFormat.getTimeFormat(this);
//TODO show size in appropriate measure
String message =this.getResources().getString(R.string.uploaderTitle) +" " + uploader+ '\n' + String uploaderName;
if(uploader.compareTo("") != 0)
uploaderName = uploader;
else
uploaderName = this.getResources().getString(R.string.unknown);
String message =this.getResources().getString(R.string.uploaderTitle) +" " + uploaderName+ '\n' +
this.getResources().getString(R.string.sizeFileTitle) +" " + humanReadableByteCount(size, true) + '\n'+ this.getResources().getString(R.string.sizeFileTitle) +" " + humanReadableByteCount(size, true) + '\n'+
this.getResources().getString(R.string.creationTimeTitle) +" " + dateShortFormat.format(d)+ " "+(timeFormat.format(d)); this.getResources().getString(R.string.creationTimeTitle) +" " + dateShortFormat.format(d)+ " "+(timeFormat.format(d));
builder.setTitle(name); builder.setTitle(name);