mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Add explicit TargetApi annotation to remove lint error
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=136597149
This commit is contained in:
parent
3a5cb43541
commit
586e6257cd
1 changed files with 7 additions and 1 deletions
|
|
@ -15,6 +15,7 @@
|
|||
*/
|
||||
package com.google.android.exoplayer2.ui;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.os.SystemClock;
|
||||
|
|
@ -351,13 +352,18 @@ public class PlaybackControlView extends FrameLayout {
|
|||
private void setButtonEnabled(boolean enabled, View view) {
|
||||
view.setEnabled(enabled);
|
||||
if (Util.SDK_INT >= 11) {
|
||||
view.setAlpha(enabled ? 1f : 0.3f);
|
||||
setViewAlphaV11(view, enabled ? 1f : 0.3f);
|
||||
view.setVisibility(VISIBLE);
|
||||
} else {
|
||||
view.setVisibility(enabled ? VISIBLE : INVISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@TargetApi(11)
|
||||
private void setViewAlphaV11(View view, float alpha) {
|
||||
view.setAlpha(alpha);
|
||||
}
|
||||
|
||||
private String stringForTime(long timeMs) {
|
||||
if (timeMs == C.TIME_UNSET) {
|
||||
timeMs = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue