mirror of https://github.com/M66B/FairEmail.git
Added title
This commit is contained in:
parent
c1b89c8655
commit
1aaee98738
|
@ -38,6 +38,7 @@ import android.widget.Toast;
|
|||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.constraintlayout.widget.Group;
|
||||
import androidx.core.content.FileProvider;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.Lifecycle;
|
||||
|
@ -346,17 +347,19 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
|
|||
View view = LayoutInflater.from(context).inflate(R.layout.dialog_virus_total, null);
|
||||
final TextView tvName = view.findViewById(R.id.tvName);
|
||||
final ProgressBar pbAnalysis = view.findViewById(R.id.pbAnalysis);
|
||||
final TextView tvAnalysis = view.findViewById(R.id.tvAnalysis);
|
||||
final TextView tvCount = view.findViewById(R.id.tvCount);
|
||||
final TextView tvLabel = view.findViewById(R.id.tvLabel);
|
||||
final TextView tvUnknown = view.findViewById(R.id.tvUnknown);
|
||||
final Group grpAnalysis = view.findViewById(R.id.grpAnalysis);
|
||||
|
||||
tvName.setText(attachment.name);
|
||||
pbAnalysis.setMax(count);
|
||||
pbAnalysis.setProgress(malicious);
|
||||
tvAnalysis.setText(malicious + "/" + count);
|
||||
tvCount.setText(malicious + "/" + count);
|
||||
tvLabel.setText(label);
|
||||
tvLabel.setVisibility(TextUtils.isEmpty(label) ? View.GONE : View.VISIBLE);
|
||||
tvUnknown.setVisibility(count == 0 ? View.VISIBLE : View.GONE);
|
||||
grpAnalysis.setVisibility(count == 0 ? View.GONE : View.VISIBLE);
|
||||
|
||||
AlertDialog dialog = new AlertDialog.Builder(context)
|
||||
.setView(view)
|
||||
|
|
|
@ -31,6 +31,16 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTitle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAnalysis"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:text="@string/title_vt_count"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvName" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pbAnalysis"
|
||||
style="@style/Base.Widget.AppCompat.ProgressBar.Horizontal"
|
||||
|
@ -40,12 +50,12 @@
|
|||
android:layout_marginEnd="6dp"
|
||||
android:progress="50"
|
||||
android:scaleY="3"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tvAnalysis"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tvCount"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvName" />
|
||||
app:layout_constraintTop_toBottomOf="@id/tvAnalysis" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAnalysis"
|
||||
android:id="@+id/tvCount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
|
@ -62,7 +72,7 @@
|
|||
android:text="Label"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvAnalysis" />
|
||||
app:layout_constraintTop_toBottomOf="@id/pbAnalysis" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUnknown"
|
||||
|
@ -73,5 +83,11 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvLabel" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/grpAnalysis"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:constraint_referenced_ids="tvAnalysis,pbAnalysis,tvCount" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</eu.faircode.email.ScrollViewEx>
|
||||
|
|
|
@ -1467,6 +1467,7 @@
|
|||
<string name="title_send_dsn">Status report</string>
|
||||
<string name="title_send_receipt">Request receipt</string>
|
||||
<string name="title_send_receipt_remark">Most providers and email clients ignore receipt requests</string>
|
||||
<string name="title_vt_count">Number of virus scanners that flag this file as malicious:</string>
|
||||
<string name="title_vt_unknown">This file hasn\'t been seen by VirusTotal before, so it has not been scanned yet</string>
|
||||
|
||||
<string name="title_from_missing">Sender missing</string>
|
||||
|
|
Loading…
Reference in New Issue