Downloads : Show filename along with path in download manager

This commit is contained in:
Mr. Dragon
2019-07-28 02:41:58 +05:30
parent 857ac5b05b
commit b60fc88204
2 changed files with 14 additions and 10 deletions

View File

@@ -112,6 +112,7 @@ public class DownloadsAdapter extends RecyclerView.Adapter<DownloadsAdapter.View
viewHolder.txtTitle.setText(displayName);
viewHolder.txtStatus.setText(Util.getStatus(status));
viewHolder.txtPath.setText(downloadData.download.getFile());
viewHolder.txtSize.setText(new StringBuilder()
.append(Util.humanReadableByteValue(downloadData.download.getDownloaded(), true))
.append("/")
@@ -246,6 +247,8 @@ public class DownloadsAdapter extends RecyclerView.Adapter<DownloadsAdapter.View
TextView txtTitle;
@BindView(R.id.txt_status)
TextView txtStatus;
@BindView(R.id.txt_path)
TextView txtPath;
@BindView(R.id.txt_size)
TextView txtSize;
@BindView(R.id.txt_progress)
@@ -261,13 +264,5 @@ public class DownloadsAdapter extends RecyclerView.Adapter<DownloadsAdapter.View
super(itemView);
ButterKnife.bind(this, itemView);
}
void clearStatus() {
txtProgress.setText("");
progressBar.setProgress(0);
txtSpeed.setText("--/s");
txtETA.setText("N/A");
txtSize.setText("--");
}
}
}

View File

@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
~ Aurora Store
~ Copyright (C) 2019, Rahul Kumar Patel <whyorean@gmail.com>
~
@@ -59,6 +58,16 @@
android:textAppearance="?android:textAppearanceListItem"
android:textSize="12sp" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/txt_path"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ellipsize="start"
android:singleLine="true"
android:textAlignment="viewStart"
android:textAppearance="?android:textAppearanceListItem"
android:textSize="12sp" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/txt_size"
android:layout_width="fill_parent"