Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@ public interface FensterPlayerController {

void setVisibilityListener(FensterPlayerControllerVisibilityListener visibilityListener);

boolean isShowing();

boolean isFirstTimeLoading();

}
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,12 @@ private void showBottomArea() {
bottomControlsArea.setVisibility(View.VISIBLE);
}

@Override
public boolean isShowing() {
return mShowing;
}

@Override
public boolean isFirstTimeLoading() {
return mFirstTimeLoading;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package com.malmstein.fenster.controller;

import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.ColorStateList;
import android.os.Build;
import android.os.Handler;
import android.os.Message;
import android.util.AttributeSet;
Expand Down Expand Up @@ -171,6 +174,7 @@ public void show(final int timeInMilliSeconds) {

}

@Override
public boolean isShowing() {
return mShowing;
}
Expand All @@ -179,6 +183,7 @@ public boolean isLoading() {
return mLoading;
}

@Override
public boolean isFirstTimeLoading() {
return mFirstTimeLoading;
}
Expand All @@ -203,6 +208,28 @@ public void hide() {
}
}

/**
* hides the next/prev buttons
*/
public void disableNavigationButtons() {
mNextButton.setVisibility(View.GONE);
mPrevButton.setVisibility(View.GONE);
}

/**
* set a custom color for the progress view
* works for android >= 21 only
*/
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public void setSeekbarColor(ColorStateList color) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP)
return;

SeekBar seekbar = (SeekBar) mProgress;
seekbar.setThumbTintList(color);
seekbar.setProgressTintList(color);
}

private String stringForTime(final int timeMs) {
int totalSeconds = timeMs / 1000;

Expand Down Expand Up @@ -484,5 +511,4 @@ public void onControllerUiTouched() {
show();
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,20 @@
<TextView
android:id="@+id/fen__media_controller_time_current"
style="@style/MediaText"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>

<SeekBar
android:id="@+id/fen__media_controller_progress"
android:layout_width="0dip"
android:layout_height="@dimen/fen__media_controller_seekbar_height"
android:layout_weight="8" />
android:layout_weight="1" />

<TextView
android:id="@+id/fen__media_controller_time"
style="@style/MediaText"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>

</LinearLayout>

Expand Down