Available Methods
- SDK_INT
- areEqual ( )
- constrainValue ( )
- binarySearchFloor ( )
- closeQuietly ( )
- getUserAgent ( )
- scaleLargeTimestamp ( )
- toLowerInvariant ( )
- ceilDivide ( )
- split ( )
- castNonNull ( )
- writeBoolean ( )
- binarySearchCeil ( )
- splitAtFirst ( )
- fromUtf8Bytes ( )
- inferContentType ( )
- isLinebreak ( )
- compareLong ( )
- getPcmFrameSize ( )
- EMPTY_BYTE_ARRAY
- toByteArray ( )
- parseXsDateTime ( )
- isEncodingHighResolutionIntegerPcm ( )
- readBoolean ( )
- createHandler ( )
- isLocalFileUri ( )
- getCodecsOfType ( )
- getLooper ( )
- startForegroundService ( )
- getRemainderDataSpec ( )
- removeRange ( )
- getRendererCapabilities ( )
- newSingleThreadExecutor ( )
- normalizeLanguageCode ( )
- getBytesFromHexString ( )
- inflate ( )
- crc ( )
- isEncodingLinearPcm ( )
- getMediaDurationForPlayoutDuration ( )
- parseXsDuration ( )
- getPcmEncoding ( )
- getUtf8Bytes ( )
- nullSafeArrayCopy ( )
- getStreamTypeForAudioUsage ( )
- toArray ( )
- DEVICE
- getNetworkType ( )
- scaleLargeTimestamps ( )
- nullSafeArrayConcatenation ( )
- getIntegerCodeForString ( )
- getPlayoutDurationForMediaDuration ( )
- resolveSeekPositionUs ( )
- getStringForTime ( )
Related Classes
- java.util.Arrays
- java.util.Collections
- java.io.InputStream
- android.content.Context
- android.view.View
- android.util.Log
- android.content.Intent
- java.util.UUID
- android.os.Handler
- android.net.Uri
- java.nio.ByteBuffer
- android.text.TextUtils
- android.annotation.TargetApi
- android.os.Looper
- androidx.annotation.Nullable
- android.util.Pair
- org.xmlpull.v1.XmlPullParser
- com.google.android.exoplayer2.upstream.DefaultDataSourceFactory
- com.google.android.exoplayer2.source.MediaSource
- com.google.android.exoplayer2.ExoPlayerFactory
- com.google.android.exoplayer2.trackselection.DefaultTrackSelector
- com.google.android.exoplayer2.ExoPlaybackException
- com.google.android.exoplayer2.upstream.DataSource
- com.google.android.exoplayer2.source.ExtractorMediaSource
- com.google.android.exoplayer2.C
Java Code Examples for com.google.android.exoplayer2.util.Util#getStringForTime()
The following examples show how to use
com.google.android.exoplayer2.util.Util#getStringForTime() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ExoVideoPlaybackControlView.java From ExoVideoView with Apache License 2.0 | 6 votes |
private CharSequence generateFastForwardOrRewindTxt(long changingTime) { long duration = player == null ? 0 : player.getDuration(); String result = Util.getStringForTime(formatBuilder, formatter, changingTime); result = result + "/"; result = result + Util.getStringForTime(formatBuilder, formatter, duration); int index = result.indexOf("/"); SpannableString spannableString = new SpannableString(result); TypedValue typedValue = new TypedValue(); TypedArray a = getContext().obtainStyledAttributes(typedValue.data, new int[]{R.attr.colorAccent}); int color = a.getColor(0, 0); a.recycle(); spannableString.setSpan(new ForegroundColorSpan(color), 0, index, Spanned.SPAN_INCLUSIVE_EXCLUSIVE); spannableString.setSpan(new ForegroundColorSpan(Color.WHITE), index, result.length(), Spanned.SPAN_INCLUSIVE_EXCLUSIVE); return spannableString; }
Example 2
Source File: DefaultTimeBar.java From tysq-android with GNU General Public License v3.0 | 4 votes |
private String getProgressText() { return Util.getStringForTime(formatBuilder, formatter, position); }