Show download percentage also in the title
This commit is contained in:
parent
4787924fcc
commit
467df602ec
|
@ -1375,8 +1375,7 @@ public class PlayerFragment extends Fragment implements GestureDetector.OnGestur
|
||||||
switch (playerState)
|
switch (playerState)
|
||||||
{
|
{
|
||||||
case DOWNLOADING:
|
case DOWNLOADING:
|
||||||
final long bytes = currentPlaying != null ? currentPlaying.getPartialFile().length() : 0;
|
String downloadStatus = getResources().getString(R.string.download_playerstate_downloading, Util.formatPercentage(currentPlaying.getProgress().getValue()));
|
||||||
String downloadStatus = getResources().getString(R.string.download_playerstate_downloading, Util.formatLocalizedBytes(bytes, getContext()));
|
|
||||||
FragmentTitle.Companion.setTitle(PlayerFragment.this, downloadStatus);
|
FragmentTitle.Companion.setTitle(PlayerFragment.this, downloadStatus);
|
||||||
break;
|
break;
|
||||||
case PREPARING:
|
case PREPARING:
|
||||||
|
|
Loading…
Reference in New Issue