mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-25 09:30:32 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
47646e1c62
@ -24,6 +24,11 @@ Project status:
|
||||
[<img src="screenshots/screenshot_3.png" width=160>](screenshots/screenshot_3.png)
|
||||
[<img src="screenshots/screenshot_4.png" width=160>](screenshots/screenshot_4.png)
|
||||
[<img src="screenshots/screenshot_5.png" width=160>](screenshots/screenshot_5.png)
|
||||
[<img src="screenshots/screenshot_6.png" width=160>](screenshots/screenshot_6.png)
|
||||
[<img src="screenshots/screenshot_7.png" width=160>](screenshots/screenshot_7.png)
|
||||
[<img src="screenshots/screenshot_8.png" width=160>](screenshots/screenshot_8.png)
|
||||
[<img src="screenshots/screenshot_9.png" width=160>](screenshots/screenshot_9.png)
|
||||
|
||||
|
||||
## Description
|
||||
|
||||
|
@ -8,8 +8,8 @@ android {
|
||||
applicationId "org.schabi.newpipe"
|
||||
minSdkVersion 15
|
||||
targetSdkVersion 25
|
||||
versionCode 31
|
||||
versionName "0.9.4"
|
||||
versionCode 32
|
||||
versionName "0.9.5"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
|
@ -1,28 +0,0 @@
|
||||
package org.schabi.newpipe;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
|
||||
public class ThemableActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
if (PreferenceManager.getDefaultSharedPreferences(this)
|
||||
.getString("theme", getResources().getString(R.string.light_theme_title)).
|
||||
equals(getResources().getString(R.string.dark_theme_title))) {
|
||||
setTheme(R.style.DarkTheme);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
if (PreferenceManager.getDefaultSharedPreferences(this)
|
||||
.getString("theme", getResources().getString(R.string.light_theme_title)).
|
||||
equals(getResources().getString(R.string.dark_theme_title))) {
|
||||
setTheme(R.style.DarkTheme);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,5 @@
|
||||
package org.schabi.newpipe.fragments;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Rect;
|
||||
@ -28,6 +26,8 @@ import org.schabi.newpipe.R;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import static org.schabi.newpipe.util.AnimationUtils.animateView;
|
||||
|
||||
public abstract class BaseFragment extends Fragment {
|
||||
protected final String TAG = "BaseFragment@" + Integer.toHexString(hashCode());
|
||||
protected static final boolean DEBUG = MainActivity.DEBUG;
|
||||
@ -130,70 +130,6 @@ public abstract class BaseFragment extends Fragment {
|
||||
// Utils
|
||||
//////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
public void animateView(final View view, final boolean enterOrExit, long duration) {
|
||||
animateView(view, enterOrExit, duration, 0, null);
|
||||
}
|
||||
|
||||
public void animateView(final View view, final boolean enterOrExit, long duration, final Runnable execOnEnd) {
|
||||
animateView(view, enterOrExit, duration, 0, execOnEnd);
|
||||
}
|
||||
|
||||
public void animateView(final View view, final boolean enterOrExit, long duration, long delay) {
|
||||
animateView(view, enterOrExit, duration, delay, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Animate the view
|
||||
*
|
||||
* @param view view that will be animated
|
||||
* @param enterOrExit true to enter, false to exit
|
||||
* @param duration how long the animation will take, in milliseconds
|
||||
* @param delay how long the animation will take to start, in milliseconds
|
||||
* @param execOnEnd runnable that will be executed when the animation ends
|
||||
*/
|
||||
public void animateView(final View view, final boolean enterOrExit, long duration, long delay, final Runnable execOnEnd) {
|
||||
if (DEBUG) Log.d(TAG, "animateView() called with: view = [" + view + "], enterOrExit = [" + enterOrExit + "], duration = [" + duration + "], execOnEnd = [" + execOnEnd + "]");
|
||||
if (view == null) return;
|
||||
|
||||
if (view.getVisibility() == View.VISIBLE && enterOrExit) {
|
||||
view.animate().setListener(null).cancel();
|
||||
view.setVisibility(View.VISIBLE);
|
||||
view.setAlpha(1f);
|
||||
if (execOnEnd != null) execOnEnd.run();
|
||||
return;
|
||||
} else if ((view.getVisibility() == View.GONE || view.getVisibility() == View.INVISIBLE) && !enterOrExit) {
|
||||
view.animate().setListener(null).cancel();
|
||||
view.setVisibility(View.GONE);
|
||||
view.setAlpha(0f);
|
||||
if (execOnEnd != null) execOnEnd.run();
|
||||
return;
|
||||
}
|
||||
|
||||
view.animate().setListener(null).cancel();
|
||||
view.setVisibility(View.VISIBLE);
|
||||
|
||||
if (enterOrExit) {
|
||||
view.animate().alpha(1f).setDuration(duration).setStartDelay(delay)
|
||||
.setListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
if (execOnEnd != null) execOnEnd.run();
|
||||
}
|
||||
}).start();
|
||||
} else {
|
||||
view.animate().alpha(0f)
|
||||
.setDuration(duration).setStartDelay(delay)
|
||||
.setListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
view.setVisibility(View.GONE);
|
||||
if (execOnEnd != null) execOnEnd.run();
|
||||
}
|
||||
})
|
||||
.start();
|
||||
}
|
||||
}
|
||||
|
||||
protected void setErrorMessage(String message, boolean showRetryButton) {
|
||||
if (errorTextView == null || activity == null) return;
|
||||
|
||||
|
@ -36,6 +36,8 @@ import java.io.Serializable;
|
||||
import java.text.NumberFormat;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import static org.schabi.newpipe.util.AnimationUtils.animateView;
|
||||
|
||||
public class ChannelFragment extends BaseFragment implements ChannelExtractorWorker.OnChannelInfoReceive {
|
||||
private final String TAG = "ChannelFragment@" + Integer.toHexString(hashCode());
|
||||
|
||||
|
@ -19,6 +19,7 @@ import android.text.TextUtils;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.util.Log;
|
||||
import android.util.TypedValue;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
@ -39,7 +40,6 @@ import com.nostra13.universalimageloader.core.assist.FailReason;
|
||||
import com.nostra13.universalimageloader.core.listener.SimpleImageLoadingListener;
|
||||
|
||||
import org.schabi.newpipe.ImageErrorLoadingListener;
|
||||
import org.schabi.newpipe.Localization;
|
||||
import org.schabi.newpipe.R;
|
||||
import org.schabi.newpipe.ReCaptchaActivity;
|
||||
import org.schabi.newpipe.download.DownloadDialog;
|
||||
@ -55,6 +55,8 @@ import org.schabi.newpipe.player.MainVideoPlayer;
|
||||
import org.schabi.newpipe.player.PlayVideoActivity;
|
||||
import org.schabi.newpipe.player.PopupVideoPlayer;
|
||||
import org.schabi.newpipe.report.ErrorActivity;
|
||||
import org.schabi.newpipe.util.Constants;
|
||||
import org.schabi.newpipe.util.Localization;
|
||||
import org.schabi.newpipe.util.NavigationHelper;
|
||||
import org.schabi.newpipe.util.PermissionHelper;
|
||||
import org.schabi.newpipe.util.Utils;
|
||||
@ -64,6 +66,8 @@ import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Stack;
|
||||
|
||||
import static org.schabi.newpipe.util.AnimationUtils.animateView;
|
||||
|
||||
public class VideoDetailFragment extends BaseFragment implements StreamExtractorWorker.OnStreamInfoReceivedListener, SharedPreferences.OnSharedPreferenceChangeListener, View.OnClickListener {
|
||||
private final String TAG = "VideoDetailFragment@" + Integer.toHexString(hashCode());
|
||||
|
||||
@ -71,9 +75,6 @@ public class VideoDetailFragment extends BaseFragment implements StreamExtractor
|
||||
private static final int INITIAL_RELATED_VIDEOS = 8;
|
||||
|
||||
private static final String KORE_PACKET = "org.xbmc.kore";
|
||||
private static final String SERVICE_ID_KEY = "service_id_key";
|
||||
private static final String VIDEO_URL_KEY = "video_url_key";
|
||||
private static final String VIDEO_TITLE_KEY = "video_title_key";
|
||||
private static final String STACK_KEY = "stack_key";
|
||||
private static final String INFO_KEY = "info_key";
|
||||
private static final String WAS_RELATED_EXPANDED_KEY = "was_related_expanded_key";
|
||||
@ -170,9 +171,9 @@ public class VideoDetailFragment extends BaseFragment implements StreamExtractor
|
||||
if (DEBUG) Log.d(TAG, "onCreate() called with: savedInstanceState = [" + savedInstanceState + "]");
|
||||
|
||||
if (savedInstanceState != null) {
|
||||
videoTitle = savedInstanceState.getString(VIDEO_TITLE_KEY);
|
||||
videoUrl = savedInstanceState.getString(VIDEO_URL_KEY);
|
||||
serviceId = savedInstanceState.getInt(SERVICE_ID_KEY, 0);
|
||||
videoTitle = savedInstanceState.getString(Constants.KEY_TITLE);
|
||||
videoUrl = savedInstanceState.getString(Constants.KEY_URL);
|
||||
serviceId = savedInstanceState.getInt(Constants.KEY_SERVICE_ID, 0);
|
||||
wasRelatedStreamsExpanded = savedInstanceState.getBoolean(WAS_RELATED_EXPANDED_KEY, false);
|
||||
Serializable serializable = savedInstanceState.getSerializable(STACK_KEY);
|
||||
if (serializable instanceof Stack) {
|
||||
@ -289,9 +290,9 @@ public class VideoDetailFragment extends BaseFragment implements StreamExtractor
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
if (DEBUG) Log.d(TAG, "onSaveInstanceState() called with: outState = [" + outState + "]");
|
||||
outState.putString(VIDEO_URL_KEY, videoUrl);
|
||||
outState.putString(VIDEO_TITLE_KEY, videoTitle);
|
||||
outState.putInt(SERVICE_ID_KEY, serviceId);
|
||||
outState.putString(Constants.KEY_URL, videoUrl);
|
||||
outState.putString(Constants.KEY_TITLE, videoTitle);
|
||||
outState.putInt(Constants.KEY_SERVICE_ID, serviceId);
|
||||
outState.putSerializable(STACK_KEY, stack);
|
||||
|
||||
int nextCount = currentStreamInfo != null && currentStreamInfo.next_video != null ? 2 : 0;
|
||||
@ -420,7 +421,10 @@ public class VideoDetailFragment extends BaseFragment implements StreamExtractor
|
||||
if (isLoading.get()) return;
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !PermissionHelper.checkSystemAlertWindowPermission(activity)) {
|
||||
Toast.makeText(activity, R.string.msg_popup_permission, Toast.LENGTH_LONG).show();
|
||||
Toast toast = Toast.makeText(activity, R.string.msg_popup_permission, Toast.LENGTH_LONG);
|
||||
TextView messageView = (TextView) toast.getView().findViewById(android.R.id.message);
|
||||
if (messageView != null) messageView.setGravity(Gravity.CENTER);
|
||||
toast.show();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -800,7 +804,7 @@ public class VideoDetailFragment extends BaseFragment implements StreamExtractor
|
||||
* If it is, check if the cache contains the info already.</br>
|
||||
* If the cache doesn't have the info, load from the network.
|
||||
*
|
||||
* @param info info to prepare and load, can be null
|
||||
* @param info info to prepare and load, can be null
|
||||
* @param scrollToTop whether or not scroll the scrollView to y = 0
|
||||
*/
|
||||
public void prepareAndLoad(StreamInfo info, boolean scrollToTop) {
|
||||
@ -844,7 +848,7 @@ public class VideoDetailFragment extends BaseFragment implements StreamExtractor
|
||||
else parallaxScrollRootView.scrollTo(0, 0);
|
||||
}
|
||||
|
||||
animateView(contentRootLayoutHiding, false, greaterThanThreshold ? 250 : 0, new Runnable() {
|
||||
animateView(contentRootLayoutHiding, false, greaterThanThreshold ? 250 : 0, 0, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
handleStreamInfo(infoFinal, false);
|
||||
@ -1052,7 +1056,7 @@ public class VideoDetailFragment extends BaseFragment implements StreamExtractor
|
||||
private void setErrorImage(final int imageResource) {
|
||||
if (thumbnailImageView == null || activity == null) return;
|
||||
thumbnailImageView.setImageDrawable(ContextCompat.getDrawable(activity, imageResource));
|
||||
animateView(thumbnailImageView, false, 0, new Runnable() {
|
||||
animateView(thumbnailImageView, false, 0, 0, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
animateView(thumbnailImageView, true, 500);
|
||||
|
@ -37,6 +37,7 @@ import org.schabi.newpipe.extractor.search.SearchResult;
|
||||
import org.schabi.newpipe.fragments.BaseFragment;
|
||||
import org.schabi.newpipe.info_list.InfoItemBuilder;
|
||||
import org.schabi.newpipe.info_list.InfoListAdapter;
|
||||
import org.schabi.newpipe.util.Constants;
|
||||
import org.schabi.newpipe.util.NavigationHelper;
|
||||
import org.schabi.newpipe.workers.SearchWorker;
|
||||
import org.schabi.newpipe.workers.SuggestionWorker;
|
||||
@ -45,12 +46,13 @@ import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
||||
import static org.schabi.newpipe.util.AnimationUtils.animateView;
|
||||
|
||||
public class SearchFragment extends BaseFragment implements SuggestionWorker.OnSuggestionResult, SearchWorker.OnSearchResult {
|
||||
private final String TAG = "SearchFragment@" + Integer.toHexString(hashCode());
|
||||
// savedInstanceBundle arguments
|
||||
private static final String QUERY_KEY = "query_key";
|
||||
private static final String PAGE_NUMBER_KEY = "page_number_key";
|
||||
private static final String SERVICE_KEY = "service_key";
|
||||
private static final String INFO_LIST_KEY = "info_list_key";
|
||||
private static final String WAS_LOADING_KEY = "was_loading_key";
|
||||
private static final String ERROR_KEY = "error_key";
|
||||
@ -101,7 +103,7 @@ public class SearchFragment extends BaseFragment implements SuggestionWorker.OnS
|
||||
setHasOptionsMenu(true);
|
||||
if (savedInstanceState != null) {
|
||||
searchQuery = savedInstanceState.getString(QUERY_KEY);
|
||||
serviceId = savedInstanceState.getInt(SERVICE_KEY, 0);
|
||||
serviceId = savedInstanceState.getInt(Constants.KEY_SERVICE_ID, 0);
|
||||
pageNumber = savedInstanceState.getInt(PAGE_NUMBER_KEY, 0);
|
||||
wasLoading.set(savedInstanceState.getBoolean(WAS_LOADING_KEY, false));
|
||||
filterItemCheckedId = savedInstanceState.getInt(FILTER_CHECKED_ID_KEY, 0);
|
||||
@ -171,7 +173,7 @@ public class SearchFragment extends BaseFragment implements SuggestionWorker.OnS
|
||||
String query = searchEditText != null && !TextUtils.isEmpty(searchEditText.getText().toString())
|
||||
? searchEditText.getText().toString() : searchQuery;
|
||||
outState.putString(QUERY_KEY, query);
|
||||
outState.putInt(SERVICE_KEY, serviceId);
|
||||
outState.putInt(Constants.KEY_SERVICE_ID, serviceId);
|
||||
outState.putInt(PAGE_NUMBER_KEY, pageNumber);
|
||||
outState.putSerializable(INFO_LIST_KEY, ((ArrayList<InfoItem>) infoListAdapter.getItemsList()));
|
||||
outState.putBoolean(WAS_LOADING_KEY, curSearchWorker != null && curSearchWorker.isRunning());
|
||||
|
@ -1,49 +0,0 @@
|
||||
package org.schabi.newpipe.fragments.search;
|
||||
|
||||
import android.support.v7.widget.SearchView;
|
||||
|
||||
/**
|
||||
* Created by Christian Schabesberger on 02.08.16.
|
||||
*
|
||||
* Copyright (C) Christian Schabesberger 2016 <chris.schabesberger@mailbox.org>
|
||||
* SearchSuggestionListener.java is part of NewPipe.
|
||||
*
|
||||
* NewPipe is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* NewPipe is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
public class SearchSuggestionListener implements SearchView.OnSuggestionListener{
|
||||
|
||||
private final SearchView searchView;
|
||||
private final SuggestionListAdapter adapter;
|
||||
|
||||
public SearchSuggestionListener(SearchView searchView, SuggestionListAdapter adapter) {
|
||||
this.searchView = searchView;
|
||||
this.adapter = adapter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onSuggestionSelect(int position) {
|
||||
String suggestion = adapter.getSuggestion(position);
|
||||
searchView.setQuery(suggestion,true);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onSuggestionClick(int position) {
|
||||
String suggestion = adapter.getSuggestion(position);
|
||||
searchView.setQuery(suggestion,true);
|
||||
return false;
|
||||
}
|
||||
}
|
@ -21,10 +21,13 @@ import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.schabi.newpipe.R;
|
||||
import org.schabi.newpipe.util.AnimationUtils;
|
||||
import org.schabi.newpipe.util.NavigationHelper;
|
||||
import org.schabi.newpipe.util.PermissionHelper;
|
||||
import org.schabi.newpipe.util.ThemeHelper;
|
||||
|
||||
import static org.schabi.newpipe.util.AnimationUtils.animateView;
|
||||
|
||||
/**
|
||||
* Activity Player implementing VideoPlayer
|
||||
*
|
||||
@ -37,14 +40,7 @@ public class MainVideoPlayer extends Activity {
|
||||
private AudioManager audioManager;
|
||||
private GestureDetector gestureDetector;
|
||||
|
||||
private final Runnable hideUiRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
hideSystemUi();
|
||||
}
|
||||
};
|
||||
private boolean activityPaused;
|
||||
|
||||
private VideoPlayerImpl playerImpl;
|
||||
|
||||
/*//////////////////////////////////////////////////////////////////////////
|
||||
@ -265,14 +261,15 @@ public class MainVideoPlayer extends Activity {
|
||||
else if (v.getId() == screenRotationButton.getId()) onScreenRotationClicked();
|
||||
|
||||
if (getCurrentState() != STATE_COMPLETED) {
|
||||
getControlsVisibilityHandler().removeCallbacksAndMessages(null);
|
||||
animateView(playerImpl.getControlsRoot(), true, 300, 0, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (getCurrentState() == STATE_PLAYING && !playerImpl.isQualityMenuVisible()) {
|
||||
animateView(playerImpl.getControlsRoot(), false, 300, DEFAULT_CONTROLS_HIDE_TIME, true);
|
||||
hideControls(300, DEFAULT_CONTROLS_HIDE_TIME);
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -285,14 +282,14 @@ public class MainVideoPlayer extends Activity {
|
||||
public void onStopTrackingTouch(SeekBar seekBar) {
|
||||
super.onStopTrackingTouch(seekBar);
|
||||
if (playerImpl.wasPlaying()) {
|
||||
animateView(playerImpl.getControlsRoot(), false, 100, 0);
|
||||
hideControls(100, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDismiss(PopupMenu menu) {
|
||||
super.onDismiss(menu);
|
||||
if (isPlaying()) animateView(getControlsRoot(), false, 500, 0);
|
||||
if (isPlaying()) hideControls(300, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -310,26 +307,23 @@ public class MainVideoPlayer extends Activity {
|
||||
public void onLoading() {
|
||||
super.onLoading();
|
||||
playPauseButton.setImageResource(R.drawable.ic_pause_white);
|
||||
animateView(playPauseButton, false, 100, 0);
|
||||
animateView(playPauseButton, AnimationUtils.Type.SCALE_AND_ALPHA, false, 100);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBuffering() {
|
||||
super.onBuffering();
|
||||
animateView(playPauseButton, false, 100, 0);
|
||||
animateView(playPauseButton, AnimationUtils.Type.SCALE_AND_ALPHA, false, 100);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlaying() {
|
||||
super.onPlaying();
|
||||
//playPauseButton.setImageResource(R.drawable.ic_pause_white);
|
||||
//animateView(playPauseButton, true, 500, 0);
|
||||
|
||||
animateView(playPauseButton, false, 80, 0, new Runnable() {
|
||||
animateView(playPauseButton, AnimationUtils.Type.SCALE_AND_ALPHA, false, 80, 0, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
playPauseButton.setImageResource(R.drawable.ic_pause_white);
|
||||
animateView(playPauseButton, true, 200, 0);
|
||||
animateView(playPauseButton, AnimationUtils.Type.SCALE_AND_ALPHA, true, 200);
|
||||
}
|
||||
});
|
||||
|
||||
@ -339,14 +333,11 @@ public class MainVideoPlayer extends Activity {
|
||||
@Override
|
||||
public void onPaused() {
|
||||
super.onPaused();
|
||||
//playPauseButton.setImageResource(R.drawable.ic_play_arrow_white);
|
||||
//animateView(playPauseButton, true, 100, 0);
|
||||
|
||||
animateView(playPauseButton, false, 80, 0, new Runnable() {
|
||||
animateView(playPauseButton, AnimationUtils.Type.SCALE_AND_ALPHA, false, 80, 0, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
playPauseButton.setImageResource(R.drawable.ic_play_arrow_white);
|
||||
animateView(playPauseButton, true, 200, 0);
|
||||
animateView(playPauseButton, AnimationUtils.Type.SCALE_AND_ALPHA, true, 200);
|
||||
}
|
||||
});
|
||||
|
||||
@ -356,7 +347,7 @@ public class MainVideoPlayer extends Activity {
|
||||
@Override
|
||||
public void onPausedSeek() {
|
||||
super.onPausedSeek();
|
||||
animateView(playPauseButton, false, 100, 0);
|
||||
animateView(playPauseButton, AnimationUtils.Type.SCALE_AND_ALPHA, false, 100);
|
||||
}
|
||||
|
||||
|
||||
@ -366,11 +357,11 @@ public class MainVideoPlayer extends Activity {
|
||||
playPauseButton.setImageResource(R.drawable.ic_pause_white);
|
||||
} else {
|
||||
showSystemUi();
|
||||
animateView(playPauseButton, false, 0, 0, new Runnable() {
|
||||
animateView(playPauseButton, AnimationUtils.Type.SCALE_AND_ALPHA, false, 0, 0, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
playPauseButton.setImageResource(R.drawable.ic_replay_white);
|
||||
animateView(playPauseButton, true, 300, 0);
|
||||
animateView(playPauseButton, AnimationUtils.Type.SCALE_AND_ALPHA, true, 300);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -382,19 +373,20 @@ public class MainVideoPlayer extends Activity {
|
||||
//////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
@Override
|
||||
public void animateView(View view, boolean enterOrExit, long duration, long delay, final Runnable execOnEnd, boolean hideUi) {
|
||||
//if (execOnEnd == null) playerImpl.setDefaultAnimationEnd(hideUiRunnable);
|
||||
|
||||
if (hideUi && execOnEnd != null) {
|
||||
Runnable combinedRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
execOnEnd.run();
|
||||
hideUiRunnable.run();
|
||||
}
|
||||
};
|
||||
super.animateView(view, enterOrExit, duration, delay, combinedRunnable, true);
|
||||
} else super.animateView(view, enterOrExit, duration, delay, hideUi ? hideUiRunnable : execOnEnd, hideUi);
|
||||
public void hideControls(final long duration, long delay) {
|
||||
if (DEBUG) Log.d(TAG, "hideControls() called with: delay = [" + delay + "]");
|
||||
getControlsVisibilityHandler().removeCallbacksAndMessages(null);
|
||||
getControlsVisibilityHandler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
animateView(getControlsRoot(), false, duration, 0, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
hideSystemUi();
|
||||
}
|
||||
});
|
||||
}
|
||||
}, delay);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@ -443,14 +435,9 @@ public class MainVideoPlayer extends Activity {
|
||||
if (DEBUG) Log.d(TAG, "onSingleTapConfirmed() called with: e = [" + e + "]");
|
||||
if (playerImpl.getCurrentState() != BasePlayer.STATE_PLAYING) return true;
|
||||
|
||||
if (playerImpl.isControlsVisible()) playerImpl.animateView(playerImpl.getControlsRoot(), false, 150, 0, true);
|
||||
if (playerImpl.isControlsVisible()) playerImpl.hideControls(150, 0);
|
||||
else {
|
||||
playerImpl.animateView(playerImpl.getControlsRoot(), true, 500, 0, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
playerImpl.animateView(playerImpl.getControlsRoot(), false, 300, VideoPlayer.DEFAULT_CONTROLS_HIDE_TIME, true);
|
||||
}
|
||||
});
|
||||
playerImpl.showControlsThenHide();
|
||||
showSystemUi();
|
||||
}
|
||||
return true;
|
||||
@ -500,7 +487,7 @@ public class MainVideoPlayer extends Activity {
|
||||
if (DEBUG) Log.d(TAG, "onScroll().volumeControl, currentVolume = " + currentVolume);
|
||||
playerImpl.getVolumeTextView().setText(volumeUnicode + " " + Math.round((((float) currentVolume) / maxVolume) * 100) + "%");
|
||||
|
||||
if (playerImpl.getVolumeTextView().getVisibility() != View.VISIBLE) playerImpl.animateView(playerImpl.getVolumeTextView(), true, 200, 0);
|
||||
if (playerImpl.getVolumeTextView().getVisibility() != View.VISIBLE) animateView(playerImpl.getVolumeTextView(), true, 200);
|
||||
if (playerImpl.getBrightnessTextView().getVisibility() == View.VISIBLE) playerImpl.getBrightnessTextView().setVisibility(View.GONE);
|
||||
} else {
|
||||
WindowManager.LayoutParams lp = getWindow().getAttributes();
|
||||
@ -515,7 +502,7 @@ public class MainVideoPlayer extends Activity {
|
||||
|
||||
playerImpl.getBrightnessTextView().setText(brightnessUnicode + " " + (brightnessNormalized == 1 ? 0 : brightnessNormalized) + "%");
|
||||
|
||||
if (playerImpl.getBrightnessTextView().getVisibility() != View.VISIBLE) playerImpl.animateView(playerImpl.getBrightnessTextView(), true, 200, 0);
|
||||
if (playerImpl.getBrightnessTextView().getVisibility() != View.VISIBLE) animateView(playerImpl.getBrightnessTextView(), true, 200);
|
||||
if (playerImpl.getVolumeTextView().getVisibility() == View.VISIBLE) playerImpl.getVolumeTextView().setVisibility(View.GONE);
|
||||
}
|
||||
return true;
|
||||
@ -527,11 +514,11 @@ public class MainVideoPlayer extends Activity {
|
||||
eventsNum = 0;
|
||||
/* if (playerImpl.getVolumeTextView().getVisibility() == View.VISIBLE) playerImpl.getVolumeTextView().setVisibility(View.GONE);
|
||||
if (playerImpl.getBrightnessTextView().getVisibility() == View.VISIBLE) playerImpl.getBrightnessTextView().setVisibility(View.GONE);*/
|
||||
if (playerImpl.getVolumeTextView().getVisibility() == View.VISIBLE) playerImpl.animateView(playerImpl.getVolumeTextView(), false, 200, 200);
|
||||
if (playerImpl.getBrightnessTextView().getVisibility() == View.VISIBLE) playerImpl.animateView(playerImpl.getBrightnessTextView(), false, 200, 200);
|
||||
if (playerImpl.getVolumeTextView().getVisibility() == View.VISIBLE) animateView(playerImpl.getVolumeTextView(), false, 200, 200);
|
||||
if (playerImpl.getBrightnessTextView().getVisibility() == View.VISIBLE) animateView(playerImpl.getBrightnessTextView(), false, 200, 200);
|
||||
|
||||
if (playerImpl.isControlsVisible() && playerImpl.getCurrentState() == BasePlayer.STATE_PLAYING) {
|
||||
playerImpl.animateView(playerImpl.getControlsRoot(), false, 300, VideoPlayer.DEFAULT_CONTROLS_HIDE_TIME, true);
|
||||
playerImpl.hideControls(300, VideoPlayer.DEFAULT_CONTROLS_HIDE_TIME);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,13 +7,14 @@ import android.app.Service;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v4.app.NotificationCompat;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
@ -24,6 +25,8 @@ import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.PopupMenu;
|
||||
import android.widget.RemoteViews;
|
||||
import android.widget.SeekBar;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.nostra13.universalimageloader.core.DisplayImageOptions;
|
||||
@ -43,6 +46,8 @@ import org.schabi.newpipe.util.ThemeHelper;
|
||||
import org.schabi.newpipe.util.Utils;
|
||||
import org.schabi.newpipe.workers.StreamExtractorWorker;
|
||||
|
||||
import static org.schabi.newpipe.util.AnimationUtils.animateView;
|
||||
|
||||
/**
|
||||
* Service Popup Player implementing VideoPlayer
|
||||
*
|
||||
@ -58,14 +63,19 @@ public class PopupVideoPlayer extends Service {
|
||||
public static final String ACTION_OPEN_DETAIL = "org.schabi.newpipe.player.PopupVideoPlayer.OPEN_DETAIL";
|
||||
public static final String ACTION_REPEAT = "org.schabi.newpipe.player.PopupVideoPlayer.REPEAT";
|
||||
|
||||
private static final String POPUP_SAVED_WIDTH = "popup_saved_width";
|
||||
private static final String POPUP_SAVED_X = "popup_saved_x";
|
||||
private static final String POPUP_SAVED_Y = "popup_saved_y";
|
||||
|
||||
private WindowManager windowManager;
|
||||
private WindowManager.LayoutParams windowLayoutParams;
|
||||
private GestureDetector gestureDetector;
|
||||
|
||||
private float screenWidth, screenHeight;
|
||||
private float popupWidth, popupHeight;
|
||||
private float currentPopupHeight = 110.0f * Resources.getSystem().getDisplayMetrics().density;
|
||||
//private float minimumHeight = 100; // TODO: Use it when implementing the resize of the popup
|
||||
|
||||
private float minimumWidth, minimumHeight;
|
||||
private float maximumWidth, maximumHeight;
|
||||
|
||||
private final String setAlphaMethodName = (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) ? "setImageAlpha" : "setAlpha";
|
||||
private NotificationManager notificationManager;
|
||||
@ -114,6 +124,8 @@ public class PopupVideoPlayer extends Service {
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
updateScreenSize();
|
||||
updatePopupSize(windowLayoutParams.width, -1);
|
||||
checkPositionBounds();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -129,6 +141,8 @@ public class PopupVideoPlayer extends Service {
|
||||
currentExtractorWorker.cancel();
|
||||
currentExtractorWorker = null;
|
||||
}
|
||||
|
||||
savePositionAndSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -144,21 +158,33 @@ public class PopupVideoPlayer extends Service {
|
||||
private void initPopup() {
|
||||
if (DEBUG) Log.d(TAG, "initPopup() called");
|
||||
View rootView = View.inflate(this, R.layout.player_popup, null);
|
||||
|
||||
playerImpl.setup(rootView);
|
||||
|
||||
updateScreenSize();
|
||||
|
||||
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
boolean popupRememberSizeAndPos = sharedPreferences.getBoolean(getString(R.string.popup_remember_size_pos_key), true);
|
||||
|
||||
float defaultSize = getResources().getDimension(R.dimen.popup_default_width);
|
||||
popupWidth = popupRememberSizeAndPos ? sharedPreferences.getFloat(POPUP_SAVED_WIDTH, defaultSize) : defaultSize;
|
||||
|
||||
windowLayoutParams = new WindowManager.LayoutParams(
|
||||
(int) getMinimumVideoWidth(currentPopupHeight), (int) currentPopupHeight,
|
||||
(int) popupWidth, (int) getMinimumVideoHeight(popupWidth),
|
||||
WindowManager.LayoutParams.TYPE_PHONE,
|
||||
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
|
||||
PixelFormat.TRANSLUCENT);
|
||||
|
||||
windowLayoutParams.gravity = Gravity.LEFT | Gravity.TOP;
|
||||
|
||||
int centerX = (int) (screenWidth / 2f - popupWidth / 2f);
|
||||
int centerY = (int) (screenHeight / 2f - popupHeight / 2f);
|
||||
windowLayoutParams.x = popupRememberSizeAndPos ? sharedPreferences.getInt(POPUP_SAVED_X, centerX) : centerX;
|
||||
windowLayoutParams.y = popupRememberSizeAndPos ? sharedPreferences.getInt(POPUP_SAVED_Y, centerY) : centerY;
|
||||
|
||||
checkPositionBounds();
|
||||
|
||||
MySimpleOnGestureListener listener = new MySimpleOnGestureListener();
|
||||
gestureDetector = new GestureDetector(this, listener);
|
||||
gestureDetector.setIsLongpressEnabled(false);
|
||||
//gestureDetector.setIsLongpressEnabled(false);
|
||||
rootView.setOnTouchListener(listener);
|
||||
playerImpl.getLoadingPanel().setMinimumWidth(windowLayoutParams.width);
|
||||
playerImpl.getLoadingPanel().setMinimumHeight(windowLayoutParams.height);
|
||||
@ -219,13 +245,13 @@ public class PopupVideoPlayer extends Service {
|
||||
notificationManager.notify(NOTIFICATION_ID, notBuilder.build());
|
||||
}
|
||||
|
||||
|
||||
/*//////////////////////////////////////////////////////////////////////////
|
||||
// Misc
|
||||
//////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
public void onVideoClose() {
|
||||
if (DEBUG) Log.d(TAG, "onVideoClose() called");
|
||||
savePositionAndSize();
|
||||
stopSelf();
|
||||
}
|
||||
|
||||
@ -245,10 +271,23 @@ public class PopupVideoPlayer extends Service {
|
||||
// Utils
|
||||
//////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
private float getMinimumVideoWidth(float height) {
|
||||
float width = height * (16.0f / 9.0f); // Respect the 16:9 ratio that most videos have
|
||||
if (DEBUG) Log.d(TAG, "getMinimumVideoWidth() called with: height = [" + height + "], returned: " + width);
|
||||
return width;
|
||||
private void checkPositionBounds() {
|
||||
if (windowLayoutParams.x > screenWidth - windowLayoutParams.width) windowLayoutParams.x = (int) (screenWidth - windowLayoutParams.width);
|
||||
if (windowLayoutParams.x < 0) windowLayoutParams.x = 0;
|
||||
if (windowLayoutParams.y > screenHeight - windowLayoutParams.height) windowLayoutParams.y = (int) (screenHeight - windowLayoutParams.height);
|
||||
if (windowLayoutParams.y < 0) windowLayoutParams.y = 0;
|
||||
}
|
||||
|
||||
private void savePositionAndSize() {
|
||||
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(PopupVideoPlayer.this);
|
||||
sharedPreferences.edit().putInt(POPUP_SAVED_X, windowLayoutParams.x).apply();
|
||||
sharedPreferences.edit().putInt(POPUP_SAVED_Y, windowLayoutParams.y).apply();
|
||||
sharedPreferences.edit().putFloat(POPUP_SAVED_WIDTH, windowLayoutParams.width).apply();
|
||||
}
|
||||
|
||||
private float getMinimumVideoHeight(float width) {
|
||||
//if (DEBUG) Log.d(TAG, "getMinimumVideoHeight() called with: width = [" + width + "], returned: " + height);
|
||||
return width / (16.0f / 9.0f); // Respect the 16:9 ratio that most videos have
|
||||
}
|
||||
|
||||
private void updateScreenSize() {
|
||||
@ -258,11 +297,39 @@ public class PopupVideoPlayer extends Service {
|
||||
screenWidth = metrics.widthPixels;
|
||||
screenHeight = metrics.heightPixels;
|
||||
if (DEBUG) Log.d(TAG, "updateScreenSize() called > screenWidth = " + screenWidth + ", screenHeight = " + screenHeight);
|
||||
|
||||
popupWidth = getResources().getDimension(R.dimen.popup_default_width);
|
||||
popupHeight = getMinimumVideoHeight(popupWidth);
|
||||
|
||||
minimumWidth = getResources().getDimension(R.dimen.popup_minimum_width);
|
||||
minimumHeight = getMinimumVideoHeight(minimumWidth);
|
||||
|
||||
maximumWidth = screenWidth;
|
||||
maximumHeight = screenHeight;
|
||||
}
|
||||
|
||||
private void updatePopupSize(int width, int height) {
|
||||
//if (DEBUG) Log.d(TAG, "updatePopupSize() called with: width = [" + width + "], height = [" + height + "]");
|
||||
|
||||
width = (int) (width > maximumWidth ? maximumWidth : width < minimumWidth ? minimumWidth : width);
|
||||
|
||||
if (height == -1) height = (int) getMinimumVideoHeight(width);
|
||||
else height = (int) (height > maximumHeight ? maximumHeight : height < minimumHeight ? minimumHeight : height);
|
||||
|
||||
windowLayoutParams.width = width;
|
||||
windowLayoutParams.height = height;
|
||||
popupWidth = width;
|
||||
popupHeight = height;
|
||||
|
||||
if (DEBUG) Log.d(TAG, "updatePopupSize() updated values: width = [" + width + "], height = [" + height + "]");
|
||||
windowManager.updateViewLayout(playerImpl.getRootView(), windowLayoutParams);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
private class VideoPlayerImpl extends VideoPlayer {
|
||||
private TextView resizingIndicator;
|
||||
|
||||
VideoPlayerImpl() {
|
||||
super("VideoPlayerImpl" + PopupVideoPlayer.TAG, PopupVideoPlayer.this);
|
||||
}
|
||||
@ -271,13 +338,20 @@ public class PopupVideoPlayer extends Service {
|
||||
public void playUrl(String url, String format, boolean autoPlay) {
|
||||
super.playUrl(url, format, autoPlay);
|
||||
|
||||
windowLayoutParams.width = (int) getMinimumVideoWidth(currentPopupHeight);
|
||||
windowLayoutParams.width = (int) popupWidth;
|
||||
windowLayoutParams.height = (int) getMinimumVideoHeight(popupWidth);
|
||||
windowManager.updateViewLayout(getRootView(), windowLayoutParams);
|
||||
|
||||
notBuilder = createNotification();
|
||||
startForeground(NOTIFICATION_ID, notBuilder.build());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initViews(View rootView) {
|
||||
super.initViews(rootView);
|
||||
resizingIndicator = (TextView) rootView.findViewById(R.id.resizing_indicator);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
super.destroy();
|
||||
@ -337,7 +411,7 @@ public class PopupVideoPlayer extends Service {
|
||||
@Override
|
||||
public void onDismiss(PopupMenu menu) {
|
||||
super.onDismiss(menu);
|
||||
if (isPlaying()) animateView(getControlsRoot(), false, 500, 0);
|
||||
if (isPlaying()) hideControls(500, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -347,7 +421,14 @@ public class PopupVideoPlayer extends Service {
|
||||
stopSelf();
|
||||
}
|
||||
|
||||
/*//////////////////////////////////////////////////////////////////////////
|
||||
@Override
|
||||
public void onStopTrackingTouch(SeekBar seekBar) {
|
||||
super.onStopTrackingTouch(seekBar);
|
||||
if (playerImpl.wasPlaying()) {
|
||||
hideControls(100, 0);
|
||||
}
|
||||
}
|
||||
/*//////////////////////////////////////////////////////////////////////////
|
||||
// Broadcast Receiver
|
||||
//////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
@ -422,12 +503,21 @@ public class PopupVideoPlayer extends Service {
|
||||
showAndAnimateControl(R.drawable.ic_replay_white, false);
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("WeakerAccess")
|
||||
public TextView getResizingIndicator() {
|
||||
return resizingIndicator;
|
||||
}
|
||||
}
|
||||
|
||||
private class MySimpleOnGestureListener extends GestureDetector.SimpleOnGestureListener implements View.OnTouchListener {
|
||||
private int initialPopupX, initialPopupY;
|
||||
private boolean isMoving;
|
||||
|
||||
private int onDownPopupWidth = 0;
|
||||
private boolean isResizing;
|
||||
private boolean isResizingRightSide;
|
||||
|
||||
@Override
|
||||
public boolean onDoubleTap(MotionEvent e) {
|
||||
if (DEBUG) Log.d(TAG, "onDoubleTap() called with: e = [" + e + "]" + "rawXy = " + e.getRawX() + ", " + e.getRawY() + ", xy = " + e.getX() + ", " + e.getY());
|
||||
@ -450,15 +540,34 @@ public class PopupVideoPlayer extends Service {
|
||||
if (DEBUG) Log.d(TAG, "onDown() called with: e = [" + e + "]");
|
||||
initialPopupX = windowLayoutParams.x;
|
||||
initialPopupY = windowLayoutParams.y;
|
||||
popupWidth = playerImpl.getRootView().getWidth();
|
||||
popupHeight = playerImpl.getRootView().getHeight();
|
||||
popupWidth = windowLayoutParams.width;
|
||||
popupHeight = windowLayoutParams.height;
|
||||
onDownPopupWidth = windowLayoutParams.width;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLongPress(MotionEvent e) {
|
||||
if (DEBUG) Log.d(TAG, "onLongPress() called with: e = [" + e + "]");
|
||||
playerImpl.showAndAnimateControl(-1, true);
|
||||
playerImpl.getLoadingPanel().setVisibility(View.GONE);
|
||||
|
||||
playerImpl.hideControls(0, 0);
|
||||
animateView(playerImpl.getCurrentDisplaySeek(), false, 0, 0);
|
||||
animateView(playerImpl.getResizingIndicator(), true, 200, 0);
|
||||
|
||||
isResizing = true;
|
||||
isResizingRightSide = e.getRawX() > windowLayoutParams.x + (windowLayoutParams.width / 2f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
|
||||
if (!isMoving || playerImpl.getControlsRoot().getAlpha() != 1f) playerImpl.animateView(playerImpl.getControlsRoot(), true, 30, 0);
|
||||
if (isResizing) return false;
|
||||
|
||||
if (playerImpl.getCurrentState() != BasePlayer.STATE_BUFFERING
|
||||
&& (!isMoving || playerImpl.getControlsRoot().getAlpha() != 1f)) playerImpl.showControls(0);
|
||||
isMoving = true;
|
||||
|
||||
float diffX = (int) (e2.getRawX() - e1.getRawX()), posX = (int) (initialPopupX + diffX);
|
||||
float diffY = (int) (e2.getRawY() - e1.getRawY()), posY = (int) (initialPopupY + diffY);
|
||||
|
||||
@ -477,7 +586,7 @@ public class PopupVideoPlayer extends Service {
|
||||
", e2.getRaw = [" + e2.getRawX() + ", " + e2.getRawY() + "]" +
|
||||
", distanceXy = [" + distanceX + ", " + distanceY + "]" +
|
||||
", posXy = [" + posX + ", " + posY + "]" +
|
||||
", popupWh rootView.get wh = [" + popupWidth + " x " + popupHeight + "]");
|
||||
", popupWh = [" + popupWidth + " x " + popupHeight + "]");
|
||||
windowManager.updateViewLayout(playerImpl.getRootView(), windowLayoutParams);
|
||||
return true;
|
||||
}
|
||||
@ -485,16 +594,38 @@ public class PopupVideoPlayer extends Service {
|
||||
private void onScrollEnd() {
|
||||
if (DEBUG) Log.d(TAG, "onScrollEnd() called");
|
||||
if (playerImpl.isControlsVisible() && playerImpl.getCurrentState() == BasePlayer.STATE_PLAYING) {
|
||||
playerImpl.animateView(playerImpl.getControlsRoot(), false, 300, VideoPlayer.DEFAULT_CONTROLS_HIDE_TIME);
|
||||
playerImpl.hideControls(300, VideoPlayer.DEFAULT_CONTROLS_HIDE_TIME);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouch(View v, MotionEvent event) {
|
||||
gestureDetector.onTouchEvent(event);
|
||||
if (event.getAction() == MotionEvent.ACTION_UP && isMoving) {
|
||||
isMoving = false;
|
||||
onScrollEnd();
|
||||
if (event.getAction() == MotionEvent.ACTION_MOVE && isResizing && !isMoving) {
|
||||
//if (DEBUG) Log.d(TAG, "onTouch() ACTION_MOVE > v = [" + v + "], e1.getRaw = [" + event.getRawX() + ", " + event.getRawY() + "]");
|
||||
int width;
|
||||
if (isResizingRightSide) width = (int) event.getRawX() - windowLayoutParams.x;
|
||||
else {
|
||||
width = (int) (windowLayoutParams.width + (windowLayoutParams.x - event.getRawX()));
|
||||
if (width > minimumWidth) windowLayoutParams.x = initialPopupX - (width - onDownPopupWidth);
|
||||
}
|
||||
if (width <= maximumWidth && width >= minimumWidth) updatePopupSize(width, -1);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (event.getAction() == MotionEvent.ACTION_UP) {
|
||||
if (DEBUG) Log.d(TAG, "onTouch() ACTION_UP > v = [" + v + "], e1.getRaw = [" + event.getRawX() + ", " + event.getRawY() + "]");
|
||||
if (isMoving) {
|
||||
isMoving = false;
|
||||
onScrollEnd();
|
||||
}
|
||||
|
||||
if (isResizing) {
|
||||
isResizing = false;
|
||||
animateView(playerImpl.getResizingIndicator(), false, 100, 0);
|
||||
playerImpl.changeState(playerImpl.getCurrentState());
|
||||
}
|
||||
savePositionAndSize();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ import android.graphics.Color;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
@ -36,12 +37,15 @@ import org.schabi.newpipe.R;
|
||||
import org.schabi.newpipe.extractor.MediaFormat;
|
||||
import org.schabi.newpipe.extractor.stream_info.AudioStream;
|
||||
import org.schabi.newpipe.extractor.stream_info.VideoStream;
|
||||
import org.schabi.newpipe.util.AnimationUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
|
||||
import static org.schabi.newpipe.util.AnimationUtils.animateView;
|
||||
|
||||
/**
|
||||
* Base for <b>video</b> players
|
||||
*
|
||||
@ -101,6 +105,7 @@ public abstract class VideoPlayer extends BasePlayer implements SimpleExoPlayer.
|
||||
private ImageButton fullScreenButton;
|
||||
|
||||
private ValueAnimator controlViewAnimator;
|
||||
private Handler controlsVisibilityHandler = new Handler();
|
||||
|
||||
private boolean isQualityPopupMenuVisible = false;
|
||||
private boolean qualityChanged = false;
|
||||
@ -235,6 +240,9 @@ public abstract class VideoPlayer extends BasePlayer implements SimpleExoPlayer.
|
||||
|
||||
if (!isProgressLoopRunning.get()) startProgressLoop();
|
||||
|
||||
controlsVisibilityHandler.removeCallbacksAndMessages(null);
|
||||
animateView(controlsRoot, false, 300);
|
||||
|
||||
showAndAnimateControl(-1, true);
|
||||
playbackSeekBar.setEnabled(true);
|
||||
playbackSeekBar.setProgress(0);
|
||||
@ -242,10 +250,10 @@ public abstract class VideoPlayer extends BasePlayer implements SimpleExoPlayer.
|
||||
// Bug on lower api, disabling and enabling the seekBar resets the thumb color -.-, so sets the color again
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) playbackSeekBar.getThumb().setColorFilter(Color.RED, PorterDuff.Mode.SRC_IN);
|
||||
|
||||
animateView(endScreen, false, 0, 0);
|
||||
animateView(endScreen, false, 0);
|
||||
loadingPanel.setBackgroundColor(Color.BLACK);
|
||||
animateView(loadingPanel, true, 0, 0);
|
||||
animateView(surfaceForeground, true, 100, 0);
|
||||
animateView(loadingPanel, true, 0);
|
||||
animateView(surfaceForeground, true, 100);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -254,26 +262,21 @@ public abstract class VideoPlayer extends BasePlayer implements SimpleExoPlayer.
|
||||
if (!isProgressLoopRunning.get()) startProgressLoop();
|
||||
showAndAnimateControl(-1, true);
|
||||
loadingPanel.setVisibility(View.GONE);
|
||||
animateView(controlsRoot, true, 500, 0, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
animateView(controlsRoot, false, 500, DEFAULT_CONTROLS_HIDE_TIME, true);
|
||||
}
|
||||
});
|
||||
animateView(currentDisplaySeek, false, 200, 0);
|
||||
showControlsThenHide();
|
||||
animateView(currentDisplaySeek, AnimationUtils.Type.SCALE_AND_ALPHA, false, 200);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBuffering() {
|
||||
if (DEBUG) Log.d(TAG, "onBuffering() called");
|
||||
loadingPanel.setBackgroundColor(Color.TRANSPARENT);
|
||||
animateView(loadingPanel, true, 500, 0);
|
||||
animateView(loadingPanel, true, 500);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPaused() {
|
||||
if (DEBUG) Log.d(TAG, "onPaused() called");
|
||||
animateView(controlsRoot, true, 500, 100);
|
||||
showControls(400);
|
||||
loadingPanel.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@ -289,9 +292,9 @@ public abstract class VideoPlayer extends BasePlayer implements SimpleExoPlayer.
|
||||
|
||||
if (isProgressLoopRunning.get()) stopProgressLoop();
|
||||
|
||||
animateView(controlsRoot, true, 500, 0);
|
||||
animateView(endScreen, true, 800, 0);
|
||||
animateView(currentDisplaySeek, false, 200, 0);
|
||||
showControls(500);
|
||||
animateView(endScreen, true, 800);
|
||||
animateView(currentDisplaySeek, AnimationUtils.Type.SCALE_AND_ALPHA, false, 200);
|
||||
loadingPanel.setVisibility(View.GONE);
|
||||
|
||||
playbackSeekBar.setMax((int) simpleExoPlayer.getDuration());
|
||||
@ -302,7 +305,7 @@ public abstract class VideoPlayer extends BasePlayer implements SimpleExoPlayer.
|
||||
// Bug on lower api, disabling and enabling the seekBar resets the thumb color -.-, so sets the color again
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) playbackSeekBar.getThumb().setColorFilter(Color.RED, PorterDuff.Mode.SRC_IN);
|
||||
|
||||
animateView(surfaceForeground, true, 100, 0);
|
||||
animateView(surfaceForeground, true, 100);
|
||||
|
||||
if (currentRepeatMode == RepeatMode.REPEAT_ONE) {
|
||||
changeState(STATE_LOADING);
|
||||
@ -324,7 +327,7 @@ public abstract class VideoPlayer extends BasePlayer implements SimpleExoPlayer.
|
||||
|
||||
@Override
|
||||
public void onRenderedFirstFrame() {
|
||||
animateView(surfaceForeground, false, 100, 0);
|
||||
animateView(surfaceForeground, false, 100);
|
||||
}
|
||||
|
||||
/*//////////////////////////////////////////////////////////////////////////
|
||||
@ -443,7 +446,7 @@ public abstract class VideoPlayer extends BasePlayer implements SimpleExoPlayer.
|
||||
if (DEBUG) Log.d(TAG, "onQualitySelectorClicked() called");
|
||||
qualityPopupMenu.show();
|
||||
isQualityPopupMenuVisible = true;
|
||||
animateView(getControlsRoot(), true, 300, 0);
|
||||
showControls(300);
|
||||
|
||||
VideoStream videoStream = getSelectedVideoStream();
|
||||
qualityTextView.setText(MediaFormat.getNameById(videoStream.format) + " " + videoStream.resolution);
|
||||
@ -469,8 +472,8 @@ public abstract class VideoPlayer extends BasePlayer implements SimpleExoPlayer.
|
||||
wasPlaying = isPlaying();
|
||||
if (isPlaying()) simpleExoPlayer.setPlayWhenReady(false);
|
||||
|
||||
animateView(controlsRoot, true, 0, 0);
|
||||
animateView(currentDisplaySeek, true, 300, 0);
|
||||
showControls(0);
|
||||
animateView(currentDisplaySeek, AnimationUtils.Type.SCALE_AND_ALPHA, true, 300);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -481,7 +484,7 @@ public abstract class VideoPlayer extends BasePlayer implements SimpleExoPlayer.
|
||||
if (wasPlaying || simpleExoPlayer.getDuration() == seekBar.getProgress()) simpleExoPlayer.setPlayWhenReady(true);
|
||||
|
||||
playbackCurrentTime.setText(getTimeString(seekBar.getProgress()));
|
||||
animateView(currentDisplaySeek, false, 200, 0);
|
||||
animateView(currentDisplaySeek, AnimationUtils.Type.SCALE_AND_ALPHA, false, 200);
|
||||
|
||||
if (getCurrentState() == STATE_PAUSED_SEEK) changeState(STATE_BUFFERING);
|
||||
if (!isProgressLoopRunning.get()) startProgressLoop();
|
||||
@ -550,107 +553,37 @@ public abstract class VideoPlayer extends BasePlayer implements SimpleExoPlayer.
|
||||
controlViewAnimator.start();
|
||||
}
|
||||
|
||||
public void animateView(View view, boolean enterOrExit, long duration, long delay) {
|
||||
animateView(view, enterOrExit, duration, delay, null, false);
|
||||
}
|
||||
|
||||
public void animateView(View view, boolean enterOrExit, long duration, long delay, boolean hideUi) {
|
||||
animateView(view, enterOrExit, duration, delay, null, hideUi);
|
||||
}
|
||||
|
||||
public void animateView(final View view, final boolean enterOrExit, long duration, long delay, final Runnable execOnEnd) {
|
||||
animateView(view, enterOrExit, duration, delay, execOnEnd, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Animate the view
|
||||
*
|
||||
* @param view view that will be animated
|
||||
* @param enterOrExit true to enter, false to exit
|
||||
* @param duration how long the animation will take, in milliseconds
|
||||
* @param delay how long the animation will wait to start, in milliseconds
|
||||
* @param execOnEnd runnable that will be executed when the animation ends
|
||||
* @param hideUi need to hide ui when animation ends,
|
||||
* just a helper for classes extending this
|
||||
*/
|
||||
public void animateView(final View view, final boolean enterOrExit, long duration, long delay, final Runnable execOnEnd, boolean hideUi) {
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "animateView() called with: view = [" + view + "], enterOrExit = [" + enterOrExit + "], duration = [" + duration + "], delay = [" + delay + "], execOnEnd = [" + execOnEnd + "]");
|
||||
}
|
||||
if (view.getVisibility() == View.VISIBLE && enterOrExit) {
|
||||
if (DEBUG) Log.d(TAG, "animateView() view was already visible > view = [" + view + "]");
|
||||
view.animate().setListener(null).cancel();
|
||||
view.setVisibility(View.VISIBLE);
|
||||
view.setAlpha(1f);
|
||||
if (execOnEnd != null) execOnEnd.run();
|
||||
return;
|
||||
} else if ((view.getVisibility() == View.GONE || view.getVisibility() == View.INVISIBLE) && !enterOrExit) {
|
||||
if (DEBUG) Log.d(TAG, "animateView() view was already gone > view = [" + view + "]");
|
||||
view.animate().setListener(null).cancel();
|
||||
view.setVisibility(View.GONE);
|
||||
view.setAlpha(0f);
|
||||
if (execOnEnd != null) execOnEnd.run();
|
||||
return;
|
||||
}
|
||||
|
||||
view.animate().setListener(null).cancel();
|
||||
view.setVisibility(View.VISIBLE);
|
||||
|
||||
if (view == controlsRoot) {
|
||||
if (enterOrExit) {
|
||||
view.animate().alpha(1f).setDuration(duration).setStartDelay(delay)
|
||||
.setListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
if (execOnEnd != null) execOnEnd.run();
|
||||
}
|
||||
}).start();
|
||||
} else {
|
||||
view.animate().alpha(0f)
|
||||
.setDuration(duration).setStartDelay(delay)
|
||||
.setListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
view.setVisibility(View.GONE);
|
||||
if (execOnEnd != null) execOnEnd.run();
|
||||
}
|
||||
})
|
||||
.start();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (enterOrExit) {
|
||||
view.setAlpha(0f);
|
||||
view.setScaleX(.8f);
|
||||
view.setScaleY(.8f);
|
||||
view.animate().alpha(1f).scaleX(1f).scaleY(1f).setDuration(duration).setStartDelay(delay)
|
||||
.setListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
if (execOnEnd != null) execOnEnd.run();
|
||||
}
|
||||
}).start();
|
||||
} else {
|
||||
view.setAlpha(1f);
|
||||
view.setScaleX(1f);
|
||||
view.setScaleY(1f);
|
||||
view.animate().alpha(0f).scaleX(.8f).scaleY(.8f).setDuration(duration).setStartDelay(delay)
|
||||
.setListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
view.setVisibility(View.GONE);
|
||||
if (execOnEnd != null) execOnEnd.run();
|
||||
}
|
||||
})
|
||||
.start();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isQualityMenuVisible() {
|
||||
return isQualityPopupMenuVisible;
|
||||
}
|
||||
|
||||
public void showControlsThenHide() {
|
||||
if (DEBUG) Log.d(TAG, "showControlsThenHide() called");
|
||||
animateView(controlsRoot, true, 300, 0, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
hideControls(300, DEFAULT_CONTROLS_HIDE_TIME);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void showControls(long duration) {
|
||||
if (DEBUG) Log.d(TAG, "showControls() called");
|
||||
controlsVisibilityHandler.removeCallbacksAndMessages(null);
|
||||
animateView(controlsRoot, true, duration);
|
||||
}
|
||||
|
||||
public void hideControls(final long duration, long delay) {
|
||||
if (DEBUG) Log.d(TAG, "hideControls() called with: delay = [" + delay + "]");
|
||||
controlsVisibilityHandler.removeCallbacksAndMessages(null);
|
||||
controlsVisibilityHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
animateView(controlsRoot, false, duration);
|
||||
}
|
||||
}, delay);
|
||||
}
|
||||
|
||||
/*//////////////////////////////////////////////////////////////////////////
|
||||
// Getters and Setters
|
||||
//////////////////////////////////////////////////////////////////////////*/
|
||||
@ -711,6 +644,10 @@ public abstract class VideoPlayer extends BasePlayer implements SimpleExoPlayer.
|
||||
this.startedFromNewPipe = startedFromNewPipe;
|
||||
}
|
||||
|
||||
public Handler getControlsVisibilityHandler() {
|
||||
return controlsVisibilityHandler;
|
||||
}
|
||||
|
||||
public View getRootView() {
|
||||
return rootView;
|
||||
}
|
||||
|
126
app/src/main/java/org/schabi/newpipe/util/AnimationUtils.java
Normal file
126
app/src/main/java/org/schabi/newpipe/util/AnimationUtils.java
Normal file
@ -0,0 +1,126 @@
|
||||
package org.schabi.newpipe.util;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import org.schabi.newpipe.player.BasePlayer;
|
||||
|
||||
public class AnimationUtils {
|
||||
private static final String TAG = "AnimationUtils";
|
||||
private static final boolean DEBUG = BasePlayer.DEBUG;
|
||||
|
||||
public enum Type {
|
||||
ALPHA, SCALE_AND_ALPHA
|
||||
}
|
||||
|
||||
public static void animateView(View view, boolean enterOrExit, long duration) {
|
||||
animateView(view, Type.ALPHA, enterOrExit, duration, 0, null);
|
||||
}
|
||||
|
||||
public static void animateView(View view, boolean enterOrExit, long duration, long delay) {
|
||||
animateView(view, Type.ALPHA, enterOrExit, duration, delay, null);
|
||||
}
|
||||
|
||||
public static void animateView(View view, boolean enterOrExit, long duration, long delay, Runnable execOnEnd) {
|
||||
animateView(view, Type.ALPHA, enterOrExit, duration, delay, execOnEnd);
|
||||
}
|
||||
|
||||
public static void animateView(View view, Type animationType, boolean enterOrExit, long duration) {
|
||||
animateView(view, animationType, enterOrExit, duration, 0, null);
|
||||
}
|
||||
|
||||
public static void animateView(View view, Type animationType, boolean enterOrExit, long duration, long delay) {
|
||||
animateView(view, animationType, enterOrExit, duration, delay, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Animate the view
|
||||
*
|
||||
* @param view view that will be animated
|
||||
* @param animationType {@link Type} of the animation
|
||||
* @param enterOrExit true to enter, false to exit
|
||||
* @param duration how long the animation will take, in milliseconds
|
||||
* @param delay how long the animation will wait to start, in milliseconds
|
||||
* @param execOnEnd runnable that will be executed when the animation ends
|
||||
*/
|
||||
public static void animateView(final View view, Type animationType, boolean enterOrExit, long duration, long delay, Runnable execOnEnd) {
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "animateView() called with: view = [" + view + "], animationType = [" + animationType + "], enterOrExit = [" + enterOrExit + "], duration = [" + duration + "], delay = [" + delay + "], execOnEnd = [" + execOnEnd + "]");
|
||||
}
|
||||
|
||||
if (view.getVisibility() == View.VISIBLE && enterOrExit) {
|
||||
if (DEBUG) Log.d(TAG, "animateView() view was already visible > view = [" + view + "]");
|
||||
view.animate().setListener(null).cancel();
|
||||
view.setVisibility(View.VISIBLE);
|
||||
view.setAlpha(1f);
|
||||
if (execOnEnd != null) execOnEnd.run();
|
||||
return;
|
||||
} else if ((view.getVisibility() == View.GONE || view.getVisibility() == View.INVISIBLE) && !enterOrExit) {
|
||||
if (DEBUG) Log.d(TAG, "animateView() view was already gone > view = [" + view + "]");
|
||||
view.animate().setListener(null).cancel();
|
||||
view.setVisibility(View.GONE);
|
||||
view.setAlpha(0f);
|
||||
if (execOnEnd != null) execOnEnd.run();
|
||||
return;
|
||||
}
|
||||
|
||||
view.animate().setListener(null).cancel();
|
||||
view.setVisibility(View.VISIBLE);
|
||||
|
||||
switch (animationType) {
|
||||
case ALPHA:
|
||||
animateAlpha(view, enterOrExit, duration, delay, execOnEnd);
|
||||
break;
|
||||
case SCALE_AND_ALPHA:
|
||||
animateScaleAndAlpha(view, enterOrExit, duration, delay, execOnEnd);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private static void animateScaleAndAlpha(final View view, boolean enterOrExit, long duration, long delay, final Runnable execOnEnd) {
|
||||
if (enterOrExit) {
|
||||
view.setAlpha(0f);
|
||||
view.setScaleX(.8f);
|
||||
view.setScaleY(.8f);
|
||||
view.animate().alpha(1f).scaleX(1f).scaleY(1f).setDuration(duration).setStartDelay(delay).setListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
if (execOnEnd != null) execOnEnd.run();
|
||||
}
|
||||
}).start();
|
||||
} else {
|
||||
view.setAlpha(1f);
|
||||
view.setScaleX(1f);
|
||||
view.setScaleY(1f);
|
||||
view.animate().alpha(0f).scaleX(.8f).scaleY(.8f).setDuration(duration).setStartDelay(delay).setListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
view.setVisibility(View.GONE);
|
||||
if (execOnEnd != null) execOnEnd.run();
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void animateAlpha(final View view, boolean enterOrExit, long duration, long delay, final Runnable execOnEnd) {
|
||||
if (enterOrExit) {
|
||||
view.animate().alpha(1f).setDuration(duration).setStartDelay(delay).setListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
if (execOnEnd != null) execOnEnd.run();
|
||||
}
|
||||
}).start();
|
||||
} else {
|
||||
view.animate().alpha(0f).setDuration(duration).setStartDelay(delay).setListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
view.setVisibility(View.GONE);
|
||||
if (execOnEnd != null) execOnEnd.run();
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,10 +1,12 @@
|
||||
package org.schabi.newpipe;
|
||||
package org.schabi.newpipe.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Resources;
|
||||
import android.preference.PreferenceManager;
|
||||
|
||||
import org.schabi.newpipe.R;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.NumberFormat;
|
||||
import java.text.ParseException;
|
@ -5,7 +5,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/black"
|
||||
android:gravity="center">
|
||||
android:gravity="center"
|
||||
tools:layout_width="@dimen/popup_default_width"
|
||||
tools:layout_height="101.25dp">
|
||||
|
||||
|
||||
<com.google.android.exoplayer2.ui.AspectRatioFrameLayout
|
||||
@ -189,4 +191,21 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"/>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/resizing_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="left|top"
|
||||
android:background="#6e000000"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="@string/popup_resizing_indicator_title"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
tools:ignore="RtlHardcoded"
|
||||
tools:visibility="visible"/>
|
||||
</FrameLayout>
|
227
app/src/main/res/values-bn-rBD/strings.xml
Normal file
227
app/src/main/res/values-bn-rBD/strings.xml
Normal file
@ -0,0 +1,227 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<!-- <string name="app_name" translatable="false">NewPipe</string> -->
|
||||
<string name="main_bg_subtitle">শুরু করতে অনুসন্ধান এ আলতো চাপ</string>
|
||||
<string name="background_player_name">NewPipe ব্যাকগ্রাউন্ড প্লেয়ার</string>
|
||||
<!-- <string name="title_videoitem_detail" translatable="false">NewPipe</string> -->
|
||||
<string name="view_count_text">%1$s বার দেখা হয়েছে</string>
|
||||
<string name="upload_date_text">প্রকাশকাল %1$s</string>
|
||||
<string name="no_player_found">কোন স্ট্রিম প্লেয়ার পাওয়া যায়নি। তুমি কি VLC ইনস্টল করতে চাও?</string>
|
||||
<string name="install">ইনস্টল</string>
|
||||
<string name="cancel">বাদ দাও</string>
|
||||
<!-- <string name="fdroid_vlc_url" translatable="false">https://f-droid.org/repository/browse/?fdfilter=vlc&fdid=org.videolan.vlc</string> -->
|
||||
<string name="open_in_browser">ব্রাউজারে খোলো</string>
|
||||
<string name="open_in_popup_mode">পপআপ মোডে খোলো</string>
|
||||
<string name="share">শেয়ার</string>
|
||||
<string name="loading">লোড হচ্ছে</string>
|
||||
<string name="download">ডাউনলোড</string>
|
||||
<string name="search">খোঁজ</string>
|
||||
<string name="settings">সেটিং</string>
|
||||
<string name="did_you_mean">তুমি কি বলতে চাচ্ছ %1$s ?</string>
|
||||
<string name="search_page">"পেজ খোঁজ : "</string>
|
||||
<string name="share_dialog_title">শেয়ার কর</string>
|
||||
<string name="choose_browser">ব্রাউজার পছন্দ কর</string>
|
||||
<string name="screen_rotation">রোটেশন</string>
|
||||
<string name="settings_activity_title">সেটিং</string>
|
||||
<string name="use_external_video_player_title">বাহ্যিক ভিডিও প্লেয়ার ব্যবহার করো</string>
|
||||
<string name="use_external_audio_player_title">বাহ্যিক অডিও প্লেয়ার ব্যবহার করো</string>
|
||||
<string name="popup_mode_share_menu_title">NewPipe পপআপ মোড</string>
|
||||
|
||||
<string name="controls_background_title">ব্যাকগ্রাউন্ড</string>
|
||||
<string name="controls_popup_title">পপআপ</string>
|
||||
|
||||
<string name="download_path_title">Video download path</string>
|
||||
<string name="download_path_summary">ডাউনলোড করা ভিডিও সঞ্চয় পাথ করার পাথ</string>
|
||||
<string name="download_path_dialog_title">ভিডিওগুলির জন্য ডাউনলোডের পাথ প্রবেশ করাও</string>
|
||||
|
||||
<string name="download_path_audio_title">অডিও ডাউনলোড পাথ</string>
|
||||
<string name="download_path_audio_summary">ডাউনলোড করা অডিও সঞ্চয় পাথ করার পাথ</string>
|
||||
<string name="download_path_audio_dialog_title">অডিও ফাইলগুলির জন্য ডাউনলোডের পাথ প্রবেশ করাও</string>
|
||||
|
||||
<string name="autoplay_by_calling_app_title"> স্বয়ংক্রিয়ভাবে প্লে করুন যখন অন্য অ্যাপ্লিকেশন থেকে চালু করা হয়</string>
|
||||
<string name="autoplay_by_calling_app_summary">স্বয়ংক্রিয়ভাবে একটি ভিডিও প্লে করো যখন NewPipe অন্য অ্যাপ্লিকেশন থেকে চালু করা হয়।</string>
|
||||
<string name="default_resolution_title">ডিফল্ট রেজল্যুশন</string>
|
||||
<string name="default_popup_resolution_title">ডিফল্ট পপআপ রেজল্যুশন</string>
|
||||
<string name="show_higher_resolutions_title">উচ্চ রেজুলেশন দেখাও</string>
|
||||
<string name="show_higher_resolutions_summary">শুধুমাত্র কিছু ডিভাইস 2k / 4k ভিডিও চালানোয় সমর্থন</string>
|
||||
<string name="play_with_kodi_title">Kodi এর মাধ্যমে চালাও</string>
|
||||
<string name="kore_not_found">Kore অ্যাপ্লিকেশন খুঁজে পাওয়া যায়নি। Kore ইনস্টল করবে?</string>
|
||||
<!-- <string name="fdroid_kore_url" translatable="false">https://f-droid.org/repository/browse/?fdfilter=Kore&fdid=org.xbmc.kore</string> -->
|
||||
<string name="show_play_with_kodi_title">দেখাও \"Kodi এর মাধ্যমে চালাও \" বিকল্প</string>
|
||||
<string name="show_play_with_kodi_summary">Kodi মিডিয়া সেন্টারে এর মাধ্যমে একটি ভিডিও প্লে করার জন্য একটি বিকল্প প্রদর্শন কর</string>
|
||||
<string name="play_audio">অডিও</string>
|
||||
<string name="default_audio_format_title">ডিফল্ট অডিও ফরম্যাট</string>
|
||||
<string name="preferred_video_format_title">পছন্দের ভিডিও ফরম্যাট</string>
|
||||
<string name="webm_description">WebM — বিনামূল্য/স্বাধীন ফরম্যাট</string>
|
||||
<string name="m4a_description">m4a — ভালো মানের</string>
|
||||
<string name="theme_title">থিম</string>
|
||||
<string name="light_theme_title">উজ্জ্বল</string>
|
||||
<string name="dark_theme_title">অন্ধকার</string>
|
||||
<string name="black_theme_title">কালো</string>
|
||||
<string name="popup_remember_size_pos_title">পপআপ আকার এবং অবস্থান মনে রাখো</string>
|
||||
<string name="popup_remember_size_pos_summary">শেষ আকার এবং পপআপ সেট অবস্থান মনে রাখো</string>
|
||||
|
||||
<string name="download_dialog_title">ডাউনলোড</string>
|
||||
<string-array name="download_options">
|
||||
<item>ভিডিও</item>
|
||||
<item>অডিও</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="download_options_no_audio">
|
||||
<item>ভিডিও</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="download_options_no_video">
|
||||
<item>অডিও</item>
|
||||
</string-array>
|
||||
|
||||
<!-- <string-array name="theme_description_list">
|
||||
<item>@string/light_theme_title</item>
|
||||
<item>@string/dark_theme_title</item>
|
||||
<item>@string/black_theme_title</item>
|
||||
</string-array> -->
|
||||
|
||||
<string name="next_video_title">পরবর্তী ভিডিওগুলি</string>
|
||||
<string name="show_next_and_similar_title">পরবর্তী এবং অনুরূপ ভিডিওগুলি দেখাও</string>
|
||||
<string name="url_not_supported_toast">URL সমর্থিত নয়</string>
|
||||
<string name="similar_videos_btn_text">অনুরূপ ভিডিওগুলি</string>
|
||||
<string name="search_language_title">Preferred content language</string>
|
||||
<string name="settings_category_video_audio_title">ভিডিও এবং অডিও</string>
|
||||
<string name="settings_category_popup_title">পপআপ</string>
|
||||
<string name="settings_category_appearance_title">এপিয়ারেন্স</string>
|
||||
<string name="settings_category_other_title">অন্যান্য</string>
|
||||
<!-- <string name="background_player_time_text" translatable="false">%1$s - NewPipe</string> -->
|
||||
<string name="background_player_playing_toast">ব্যাকগ্রাউন্ডে বাজাও</string>
|
||||
<string name="popup_playing_toast">পপআপ মোডে চালাও</string>
|
||||
<!-- <string name="c3s_url" translatable="false">https://www.c3s.cc/</string> -->
|
||||
<string name="play_btn_text">চালাও</string>
|
||||
<string name="content">কনটেন্ট</string>
|
||||
<string name="show_age_restricted_content_title">বয়স সীমাবদ্ধ কনটেন্ট দেখাও</string>
|
||||
<string name="video_is_age_restricted">ভিডিওটিকে বয়স সীমিত করা হয়েছে। প্রথমে সেটিংসে বয়স সীমাবদ্ধ ভিডিওগুলি সক্ষম করুন।</string>
|
||||
<string name="duration_live">লাইভ</string>
|
||||
<string name="downloads">ডাউনলোড</string>
|
||||
<string name="downloads_title">ডাউনলোড</string>
|
||||
<string name="settings_title">সেটিং</string>
|
||||
<string name="error_report_title">ত্রুটির তথ্য প্রতিবেদন</string>
|
||||
<string name="all">সবগুলি</string>
|
||||
<string name="channel">চ্যানেল</string>
|
||||
<string name="yes">হ্যা</string>
|
||||
<string name="later">পরবর্তী সময়ে</string>
|
||||
<string name="disabled">নিস্ক্রীয়</string>
|
||||
<string name="filter">Filter</string>
|
||||
<string name="refresh">রিফ্রেশ</string>
|
||||
<string name="clear">পরিষ্কার</string>
|
||||
<string name="popup_resizing_indicator_title">আকার পরিবর্তন</string>
|
||||
|
||||
<!-- error strings -->
|
||||
<string name="general_error">ত্রুটি</string>
|
||||
<string name="network_error">নেটওয়ার্ক ত্রুটি</string>
|
||||
<string name="could_not_load_thumbnails">সব থাম্বনেইল লোড করা যায়নি</string>
|
||||
<string name="youtube_signature_decryption_error">ভিডিও URL স্বাক্ষর ডিক্রিপ্ট করা যায়নি।</string>
|
||||
<string name="parsing_error">ওয়েবসাইট বিশ্লেষন করা যায়নি।</string>
|
||||
<string name="light_parsing_error">ওয়েবসাইট সম্পুর্নভাবে বিশ্লেষন করা যায়নি।</string>
|
||||
<string name="content_not_available">কনটেন্ট উপলব্ধ নয়</string>
|
||||
<string name="blocked_by_gema">GEMA কর্তৃক ব্লক করা হয়েছে</string>
|
||||
<string name="could_not_setup_download_menu">ডাউনলোড মেনু সেটআপ করা যায়নি</string>
|
||||
<string name="live_streams_not_supported">এটি একটি লাইভ স্ট্রিম। যা এখনও সমর্থিত নয়।</string>
|
||||
<string name="could_not_get_stream">কোনও স্ট্রিম পাওয়া যায়নি।</string>
|
||||
<string name="could_not_load_image">চিত্র লোড করা যায়নি</string>
|
||||
<string name="app_ui_crash">অ্যাপ / UI ক্র্যাশ করেছে</string>
|
||||
<!-- error activity -->
|
||||
<string name="sorry_string">দুঃখিত এটা ঘটা উচিত ছিল না</string>
|
||||
<!-- <string name="guru_meditation" translatable="false">Guru Meditation.</string> -->
|
||||
<string name="error_report_button_text">মেলের মাধ্যমে ত্রুটি প্রতিবেদন করুন</string>
|
||||
<string name="error_snackbar_message">দুঃখিত কিছু ত্রুটি ঘটেছে</string>
|
||||
<string name="error_snackbar_action">প্রতিবেদন</string>
|
||||
<string name="what_device_headline">তথ্য:</string>
|
||||
<string name="what_happened_headline">কি হয়েছিল:</string>
|
||||
<!-- <string name="info_labels">What:\\nRequest:\\nContent Lang:\\nService:\\nGMT Time:\\nPackage:\\nVersion:\\nOS version:\\nGlob. IP range:</string> -->
|
||||
<string name="info_searched_lbl">অনুসন্ধান:</string>
|
||||
<string name="info_requested_stream_lbl">অনুরোধ করা স্ট্রিম:</string>
|
||||
<string name="your_comment">তোমার মন্তব্য (ইংরেজিতে):</string>
|
||||
<string name="error_details_headline">বর্ণনা:</string>
|
||||
|
||||
|
||||
<!-- Content descriptions (for better accessibility) -->
|
||||
<string name="list_thumbnail_view_description">ভিডিও প্রাকদর্শন থাম্বনেইল</string>
|
||||
<string name="detail_thumbnail_view_description">ভিডিও প্রাকদর্শন থাম্বনেইল</string>
|
||||
<string name="detail_uploader_thumbnail_view_description">আপলোডারের ইউজারপিক থাম্বনেইল</string>
|
||||
<string name="detail_likes_img_view_description">পছন্দ</string>
|
||||
<string name="detail_dislikes_img_view_description">অপছন্দ</string>
|
||||
<string name="use_tor_title">টর ব্যবহার করো</string>
|
||||
<string name="use_tor_summary">(পরীক্ষামূলক) গোপনীয়তা বর্ধিত করতে টর এর মাধ্যমে ডাউনলোড ট্রাফিক জোরপুর্বক পাঠাও (ভিডিওগুলি স্ট্রিমিং সমর্থিত নয়)</string>
|
||||
<string name="report_error">একটি ত্রুটি রিপোর্ট করো</string>
|
||||
<string name="user_report">ব্যবহারকারীর প্রতিবেদন</string>
|
||||
|
||||
<string name="err_dir_create">\'%1$s\' ডাউনলোড ডিরেক্টরি তৈরি করতে পারছে না</string>
|
||||
<string name="info_dir_created">\'%1$s\' ডাউনলোড ডিরেক্টরি তৈরি করা হয়েছে</string>
|
||||
|
||||
<string name="enable_background_audio">ব্যাকগ্রাউন্ড এ চালাও</string>
|
||||
<string name="video">ভিডিও</string>
|
||||
<string name="audio">অডিও</string>
|
||||
<string name="text">টেক্সট</string>
|
||||
<string name="logging">লগিং</string>
|
||||
<string name="logging_normal">সাধারণ</string>
|
||||
<string name="logging_verbose">বাগাড়ম্বরপূর্ণ</string>
|
||||
<string name="retry">পুনরায় চেষ্টা করো</string>
|
||||
<string name="off">[বন্ধ]</string>
|
||||
<string name="error_drm_not_supported">সুরক্ষিত কনটেন্ট 18 বছরের নিচে API মাত্রাগুলি সমর্থিত নয়</string>
|
||||
<string name="error_drm_unsupported_scheme">এই ডিভাইসটি প্রয়োজনীয় DRM স্কিমের সমর্থন করে না</string>
|
||||
<string name="error_drm_unknown">একটি অজানা DRM ত্রূটি ঘটেছে</string>
|
||||
<string name="error_no_decoder">এই ডিভাইসটি <xliff:g id="mime_type">%1$s</xliff:g> এর জন্য একটি ডিকোডার প্রদান করে না</string>
|
||||
<string name="error_no_secure_decoder">এই ডিভাইসটি <xliff:g id="mime_type">%1$s</xliff:g> এর জন্য একটি নিরাপদ ডিকোডার প্রদান করে না</string>
|
||||
<string name="error_querying_decoders">ডিভাইস ডিকোডার জিজ্ঞাসা করতে অক্ষমs</string>
|
||||
<string name="error_instantiating_decoder">ডিকোডার চালু করতে অক্ষম <xliff:g id="decoder_name">%1$s</xliff:g></string>
|
||||
<string name="storage_permission_denied">স্টোরেজ অ্যাক্সেস করার অনুমতি অস্বীকার করা হয়েছে</string>
|
||||
<string name="use_old_player_title">পুরানো প্লেয়ার ব্যবহার করো</string>
|
||||
<string name="use_old_player_summary">মিডিয়াফ্রেমওয়ার্ক প্লেয়ারের পুরানো বিল্ড।</string>
|
||||
<string name="videos">ভিডিওগুলি</string>
|
||||
<string name="subscriber">গ্রাহক</string>
|
||||
<string name="subscriber_plural">গ্রাহকরা</string>
|
||||
<string name="subscribe">সাবস্ক্রাইব</string>
|
||||
<string name="views">প্রদর্শন</string>
|
||||
<string name="short_thousand">K</string>
|
||||
<string name="short_million">M</string>
|
||||
<string name="short_billion">B</string>
|
||||
|
||||
<!-- Missions -->
|
||||
<string name="start">শুরু</string>
|
||||
<string name="pause">বিরতি</string>
|
||||
<string name="view">প্রদর্শন</string>
|
||||
<string name="delete">ডিলেট</string>
|
||||
<string name="checksum">চেকসাম</string>
|
||||
|
||||
<!-- Fragment -->
|
||||
<string name="add">নতুন মিশন</string>
|
||||
<string name="finish">ঠিক আছে</string>
|
||||
<string name="switch_mode">তালিকা এবং গ্রিডের মধ্যে পরিবর্তন করো</string>
|
||||
|
||||
|
||||
<!-- Msg -->
|
||||
<string name="msg_url">ডাউনলোড URL</string>
|
||||
<string name="msg_name">ফাইলের নাম</string>
|
||||
<string name="msg_threads">থ্রেড</string>
|
||||
<string name="msg_fetch_filename">ফাইলের নাম আনো</string>
|
||||
<string name="msg_error">ভুল বার্তা</string>
|
||||
<string name="msg_server_unsupported">সার্ভার অসমর্থিত</string>
|
||||
<string name="msg_exists">ফাইল ইতিমধ্যে বিদ্যমান</string>
|
||||
<string name="msg_url_malform">বিকৃত URL অথবা ইন্টারনেট নেই</string>
|
||||
<string name="msg_running">NewPipe ডাউনলোড হচ্ছে</string>
|
||||
<string name="msg_running_detail">বিস্তারিত জানার জন্য আলতো চাপ</string>
|
||||
<string name="msg_wait">অনুগ্রহপূর্বক অপেক্ষা করো…</string>
|
||||
<string name="msg_copied">ক্লিপবোর্ডে অনুলিপি করা হয়েছে</string>
|
||||
<string name="no_available_dir">অনুগ্রহ করে একটি ডাউনলোড ডিরেক্টরি নির্বাচন করো</string>
|
||||
<string name="msg_popup_permission">এই অনুমতিটি পপআপ মোডে খুলতে প্রয়োজন</string>
|
||||
|
||||
<!-- Checksum types -->
|
||||
<!-- <string name="md5" translatable="false">MD5</string> -->
|
||||
<!-- <string name="sha1" translatable="false">SHA1</string> -->
|
||||
<string name="title_activity_channel">চ্যানেলের ক্রিয়াকলাপ</string>
|
||||
<string name="action_settings">সেটিং</string>
|
||||
<string name="reCaptchaActivity">reCAPTCHA</string>
|
||||
<string name="reCaptcha_title">reCAPTCHA চ্যালেঞ্জ</string>
|
||||
<string name="recaptcha_request_toast">reCAPTCHA চ্যালেঞ্জ অনুরোধ করা হয়েছে</string>
|
||||
|
||||
<!-- End of GigaGet's Strings -->
|
||||
|
||||
</resources>
|
@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<dimen name="popup_default_width">230dp</dimen>
|
||||
<dimen name="popup_minimum_width">140dp</dimen>
|
||||
<!-- Video Item Detail View Dimensions-->
|
||||
<!-- Text Size -->
|
||||
<dimen name="channel_item_detail_title_text_size">18sp</dimen>
|
||||
|
@ -17,7 +17,8 @@
|
||||
<dimen name="video_item_search_duration_horizontal_padding">5sp</dimen>
|
||||
<dimen name="video_item_search_duration_margin">2sp</dimen>
|
||||
<!-- Miscellaneous -->
|
||||
|
||||
<dimen name="popup_default_width">180dp</dimen>
|
||||
<dimen name="popup_minimum_width">120dp</dimen>
|
||||
<!-- Video Item Detail View Dimensions-->
|
||||
<!-- Text Size -->
|
||||
<dimen name="video_item_detail_title_text_size">16sp</dimen>
|
||||
|
@ -2,6 +2,7 @@
|
||||
<resources translatable="false">
|
||||
<!-- Categories -->
|
||||
<string name="settings_category_video_audio" translatable="false">settings_category_video_audio</string>
|
||||
<string name="settings_category_popup" translatable="false">settings_category_popup</string>
|
||||
<string name="settings_category_appearance" translatable="false">settings_category_appearance</string>
|
||||
<string name="settings_content_options" translatable="false">settings_content_options</string>
|
||||
<string name="settings_category_other" translatable="false">settings_category_other</string>
|
||||
@ -27,6 +28,8 @@
|
||||
<item>144p</item>
|
||||
</string-array>
|
||||
|
||||
<string name="popup_remember_size_pos_key" translatable="false">popup_remember_size_pos_key</string>
|
||||
|
||||
<string name="default_popup_resolution_key" translatable="false">default_popup_resolution_key</string>
|
||||
<string name="default_popup_resolution_value" translatable="false">480p</string>
|
||||
|
||||
|
@ -59,6 +59,8 @@
|
||||
<string name="light_theme_title">Light</string>
|
||||
<string name="dark_theme_title">Dark</string>
|
||||
<string name="black_theme_title">Black</string>
|
||||
<string name="popup_remember_size_pos_title">Remember popup size and position</string>
|
||||
<string name="popup_remember_size_pos_summary">Remember the last size and position set to the popup</string>
|
||||
|
||||
<string name="download_dialog_title">Download</string>
|
||||
<string-array name="download_options">
|
||||
@ -86,6 +88,7 @@
|
||||
<string name="similar_videos_btn_text">Similar videos</string>
|
||||
<string name="search_language_title">Preferred content language</string>
|
||||
<string name="settings_category_video_audio_title">Video & Audio</string>
|
||||
<string name="settings_category_popup_title">Popup</string>
|
||||
<string name="settings_category_appearance_title">Appearance</string>
|
||||
<string name="settings_category_other_title">Other</string>
|
||||
<string name="background_player_time_text" translatable="false">%1$s - NewPipe</string>
|
||||
@ -109,6 +112,7 @@
|
||||
<string name="filter">Filter</string>
|
||||
<string name="refresh">Refresh</string>
|
||||
<string name="clear">Clear</string>
|
||||
<string name="popup_resizing_indicator_title">Resizing</string>
|
||||
|
||||
<!-- error strings -->
|
||||
<string name="general_error">Error</string>
|
||||
|
@ -27,14 +27,6 @@
|
||||
android:summary="%s"
|
||||
android:defaultValue="@string/default_resolution_value"/>
|
||||
|
||||
<ListPreference
|
||||
android:key="@string/default_popup_resolution_key"
|
||||
android:title="@string/default_popup_resolution_title"
|
||||
android:entries="@array/resolution_list"
|
||||
android:entryValues="@array/resolution_list"
|
||||
android:summary="%s"
|
||||
android:defaultValue="@string/default_popup_resolution_value"/>
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="@string/show_higher_resolutions_key"
|
||||
android:title="@string/show_higher_resolutions_title"
|
||||
@ -64,6 +56,28 @@
|
||||
android:summary="@string/use_old_player_summary"
|
||||
android:defaultValue="false"/>
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="@string/settings_category_popup"
|
||||
android:title="@string/settings_category_popup_title"
|
||||
android:textAllCaps="true">
|
||||
|
||||
<ListPreference
|
||||
android:key="@string/default_popup_resolution_key"
|
||||
android:title="@string/default_popup_resolution_title"
|
||||
android:entries="@array/resolution_list"
|
||||
android:entryValues="@array/resolution_list"
|
||||
android:summary="%s"
|
||||
android:defaultValue="@string/default_popup_resolution_value"/>
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="@string/popup_remember_size_pos_key"
|
||||
android:title="@string/popup_remember_size_pos_title"
|
||||
android:summary="@string/popup_remember_size_pos_summary"
|
||||
android:defaultValue="true"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="@string/settings_category_appearance"
|
||||
android:title="@string/settings_category_appearance_title"
|
||||
|
BIN
screenshots/screenshot_6.png
Normal file
BIN
screenshots/screenshot_6.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 MiB |
BIN
screenshots/screenshot_7.png
Normal file
BIN
screenshots/screenshot_7.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 865 KiB |
BIN
screenshots/screenshot_8.png
Normal file
BIN
screenshots/screenshot_8.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 134 KiB |
BIN
screenshots/screenshot_9.png
Normal file
BIN
screenshots/screenshot_9.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 476 KiB |
Loading…
Reference in New Issue
Block a user