Show downloading folders

pull/147/head
M66B 6 years ago
parent 988973135d
commit a51fd94a68

@ -73,6 +73,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
private ImageView ivUnified;
private TextView tvType;
private TextView tvAfter;
private ImageView ivDownload;
private ImageView ivSync;
private TextView tvKeywords;
private TextView tvError;
@ -95,6 +96,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
ivUnified = itemView.findViewById(R.id.ivUnified);
tvType = itemView.findViewById(R.id.tvType);
tvAfter = itemView.findViewById(R.id.tvAfter);
ivDownload = itemView.findViewById(R.id.ivDownload);
ivSync = itemView.findViewById(R.id.ivSync);
tvKeywords = itemView.findViewById(R.id.tvKeywords);
tvError = itemView.findViewById(R.id.tvError);
@ -174,8 +176,10 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
if (folder.account == null) {
tvAfter.setText(null);
ivDownload.setVisibility(View.GONE);
ivSync.setImageResource(R.drawable.baseline_sync_24);
} else {
ivDownload.setVisibility(folder.download ? View.VISIBLE : View.GONE);
if (folder.keep_days == Integer.MAX_VALUE)
tvAfter.setText(String.format("%d/∞", folder.sync_days));
else

@ -108,10 +108,20 @@
android:minHeight="24dp"
android:text="type"
android:textAppearance="@android:style/TextAppearance.Small"
app:layout_constraintEnd_toStartOf="@+id/tvAfter"
app:layout_constraintEnd_toStartOf="@+id/ivDownload"
app:layout_constraintStart_toEndOf="@id/vwLevel"
app:layout_constraintTop_toBottomOf="@id/tvName" />
<ImageView
android:id="@+id/ivDownload"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="6dp"
android:src="@drawable/baseline_cloud_download_24"
app:layout_constraintBottom_toBottomOf="@id/tvType"
app:layout_constraintEnd_toStartOf="@+id/tvAfter"
app:layout_constraintTop_toTopOf="@+id/tvType" />
<TextView
android:id="@+id/tvAfter"
android:layout_width="wrap_content"

Loading…
Cancel
Save