Code cleanup

This commit is contained in:
Stefan Schueller 2020-07-05 15:07:50 +02:00
parent 6cbf35972b
commit cee233db39
25 changed files with 166 additions and 121 deletions

View File

@ -65,6 +65,7 @@ import androidx.fragment.app.FragmentTransaction;
import static com.google.android.exoplayer2.ui.PlayerNotificationManager.ACTION_PAUSE;
import static com.google.android.exoplayer2.ui.PlayerNotificationManager.ACTION_PLAY;
import static com.google.android.exoplayer2.ui.PlayerNotificationManager.ACTION_STOP;
import static net.schueller.peertube.helper.VideoHelper.canEnterPipMode;
public class VideoPlayActivity extends AppCompatActivity {
@ -351,7 +352,7 @@ public class VideoPlayActivity extends AppCompatActivity {
FragmentManager fragmentManager = getSupportFragmentManager();
VideoPlayerFragment videoPlayerFragment = (VideoPlayerFragment) fragmentManager.findFragmentById(R.id.video_player_fragment);
String backgroundBehavior = sharedPref.getString("pref_background_behavior", getString(R.string.pref_background_stop_key));
String backgroundBehavior = sharedPref.getString(getString(R.string.pref_background_behavior_key), getString(R.string.pref_background_stop_key));
assert videoPlayerFragment != null;
assert backgroundBehavior != null;
@ -410,7 +411,7 @@ public class VideoPlayActivity extends AppCompatActivity {
videoPlayerFragment.pauseVideo();
}
String backgroundBehavior = sharedPref.getString("pref_background_behavior", getString(R.string.pref_background_stop_key));
String backgroundBehavior = sharedPref.getString(getString(R.string.pref_background_behavior_key), getString(R.string.pref_background_stop_key));
assert backgroundBehavior != null;
@ -448,15 +449,6 @@ public class VideoPlayActivity extends AppCompatActivity {
}
public boolean canEnterPipMode(Context context) {
Log.v(TAG, "api version " + Build.VERSION.SDK_INT);
if (Build.VERSION.SDK_INT > 27) {
AppOpsManager appOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
return (AppOpsManager.MODE_ALLOWED == appOpsManager.checkOp(AppOpsManager.OPSTR_PICTURE_IN_PICTURE, android.os.Process.myUid(), context.getPackageName()));
}
return false;
}
@RequiresApi(api = Build.VERSION_CODES.O)
public void enterPipMode() {
Rational rational = new Rational(239, 100);

View File

@ -42,6 +42,8 @@ import net.schueller.peertube.activity.SearchServerActivity;
import net.schueller.peertube.activity.ServerAddressBookActivity;
import net.schueller.peertube.helper.APIUrlHelper;
import java.util.Objects;
import static android.app.Activity.RESULT_OK;
@ -78,14 +80,15 @@ public class AddServerFragment extends Fragment {
Activity act = getActivity();
Boolean formValid = true;
boolean formValid = true;
// close keyboard
try {
assert act != null;
InputMethodManager inputManager = (InputMethodManager)
act.getSystemService(Context.INPUT_METHOD_SERVICE);
inputManager.hideSoftInputFromWindow(act.getCurrentFocus().getWindowToken(),
inputManager.hideSoftInputFromWindow(Objects.requireNonNull(act.getCurrentFocus()).getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS);
} catch (Exception e) {

View File

@ -28,6 +28,7 @@ import android.widget.TextView;
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
import com.mikepenz.iconics.Iconics;
import net.schueller.peertube.R;
import net.schueller.peertube.model.File;
import net.schueller.peertube.service.VideoPlayerService;
@ -66,13 +67,22 @@ public class VideoOptionsFragment extends BottomSheetDialogFragment {
LinearLayout menuRow = (LinearLayout) inflater.inflate(R.layout.row_popup_menu, null);
TextView iconView = menuRow.findViewById(R.id.video_quality_icon);
TextView textView = menuRow.findViewById(R.id.video_quality_text);
textView.setText(String.format(getString(R.string.menu_video_options_playback_speed), getCurrentVideoPlaybackSpeedString(videoPlayerService.getPlayBackSpeed())));
textView.setText(
getString(
R.string.menu_video_options_playback_speed,
getCurrentVideoPlaybackSpeedString(videoPlayerService.getPlayBackSpeed()
)
)
);
iconView.setText(R.string.video_option_speed_icon);
new Iconics.IconicsBuilder().ctx(getContext()).on(iconView).build();
textView.setOnClickListener(view1 -> {
VideoMenuSpeedFragment videoMenuSpeedFragment =
VideoMenuSpeedFragment.newInstance(videoPlayerService);
videoMenuSpeedFragment.show(getActivity().getSupportFragmentManager(),
videoMenuSpeedFragment.show(requireActivity().getSupportFragmentManager(),
VideoMenuSpeedFragment.TAG);
});
menuHolder.addView(menuRow);
@ -87,8 +97,8 @@ public class VideoOptionsFragment extends BottomSheetDialogFragment {
textView2.setOnClickListener(view1 -> {
VideoMenuQualityFragment videoMenuQualityFragment =
VideoMenuQualityFragment.newInstance(getContext(), files);
videoMenuQualityFragment.show(getActivity().getSupportFragmentManager(),
videoMenuQualityFragment.TAG);
videoMenuQualityFragment.show(requireActivity().getSupportFragmentManager(),
VideoMenuQualityFragment.TAG);
});
menuHolder.addView(menuRow2);

View File

@ -18,7 +18,6 @@
package net.schueller.peertube.fragment;
import android.app.Activity;
import android.app.AppOpsManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@ -66,15 +65,16 @@ import net.schueller.peertube.network.GetVideoDataService;
import net.schueller.peertube.network.RetrofitInstance;
import net.schueller.peertube.service.VideoPlayerService;
import java.util.Objects;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
import androidx.fragment.app.Fragment;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import static net.schueller.peertube.helper.VideoHelper.canEnterPipMode;
public class VideoPlayerFragment extends Fragment implements VideoRendererEventListener {
private String mVideoUuid;
@ -134,6 +134,7 @@ public class VideoPlayerFragment extends Fragment implements VideoRendererEventL
progressBar = activity.findViewById(R.id.torrent_progress);
progressBar.setMax(100);
assert context != null;
simpleExoPlayerView = new PlayerView(context);
simpleExoPlayerView = activity.findViewById(R.id.video_view);
@ -199,19 +200,20 @@ public class VideoPlayerFragment extends Fragment implements VideoRendererEventL
}
});
}
public void useController(boolean value) {
if (mBound) {
simpleExoPlayerView.setUseController(value);
}
}
private void playVideo(Video video) {
Context context = getContext();
// video Meta fragment
assert getFragmentManager() != null;
VideoMetaDataFragment videoMetaDataFragment = (VideoMetaDataFragment)
getFragmentManager().findFragmentById(R.id.video_meta_data_fragment);
requireActivity().getSupportFragmentManager().findFragmentById(R.id.video_meta_data_fragment);
assert videoMetaDataFragment != null;
videoMetaDataFragment.updateVideoMeta(video, mService);
@ -247,7 +249,7 @@ public class VideoPlayerFragment extends Fragment implements VideoRendererEventL
}
private void startPlayer() {
Util.startForegroundService(Objects.requireNonNull(getContext()), videoPlayerIntent);
Util.startForegroundService(requireContext(), videoPlayerIntent);
}
@ -263,26 +265,31 @@ public class VideoPlayerFragment extends Fragment implements VideoRendererEventL
mService.player.setPlayWhenReady(false);
}
}
public void pauseToggle() {
if (mBound) {
mService.player.setPlayWhenReady(!mService.player.getPlayWhenReady());
}
}
public void unPauseVideo() {
if (mBound) {
mService.player.setPlayWhenReady(true);
}
}
public boolean isPaused() {
return !mService.player.getPlayWhenReady();
}
public void showControls(boolean value) {
simpleExoPlayerView.setUseController(value);
}
public void stopVideo() {
if (mBound) {
Objects.requireNonNull(getContext()).unbindService(mConnection);
requireContext().unbindService(mConnection);
mBound = false;
}
}
@ -290,7 +297,7 @@ public class VideoPlayerFragment extends Fragment implements VideoRendererEventL
public void setIsFullscreen(Boolean fullscreen) {
isFullscreen = fullscreen;
TextView fullscreenButton = getActivity().findViewById(R.id.exo_fullscreen);
TextView fullscreenButton = requireActivity().findViewById(R.id.exo_fullscreen);
if (fullscreen) {
fullscreenButton.setText(R.string.video_compress_icon);
} else {
@ -302,15 +309,17 @@ public class VideoPlayerFragment extends Fragment implements VideoRendererEventL
public Boolean getIsFullscreen() {
return isFullscreen;
}
public void fullScreenToggle() {
if (!isFullscreen) {
setIsFullscreen(true);
getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
requireActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
} else {
setIsFullscreen(false);
getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
requireActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}
}
/**
* Torrent Playback
*
@ -404,18 +413,6 @@ public class VideoPlayerFragment extends Fragment implements VideoRendererEventL
Log.v(TAG, "onVideoDisabled()...");
}
public static boolean canEnterPipMode(Context context) {
Log.v(TAG,"api version "+Build.VERSION.SDK_INT);
if (Build.VERSION.SDK_INT<28){
return false;
}
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(context);
if (!"BackgroundFloat".equals(sharedPref.getString("pref_background_behavior","backgroundStop"))){
return false;
}
AppOpsManager appOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
return (AppOpsManager.MODE_ALLOWED== appOpsManager.checkOpNoThrow(AppOpsManager.OPSTR_PICTURE_IN_PICTURE, android.os.Process.myUid(), context.getPackageName()));
}
View.OnTouchListener touchListener = new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
@ -423,9 +420,11 @@ public class VideoPlayerFragment extends Fragment implements VideoRendererEventL
}
};
public String getVideoUuid() {
return mVideoUuid;
}
class MyGestureListener extends GestureDetector.SimpleOnGestureListener {
/*
@Override
@ -471,7 +470,7 @@ public class VideoPlayerFragment extends Fragment implements VideoRendererEventL
if (velocityY > 4000) {
Log.d(TAG, "we have a drag down event");
if (canEnterPipMode(getContext())) {
getActivity().enterPictureInPictureMode();
requireActivity().enterPictureInPictureMode();
}
}
if ((velocityX > 2000) && (Math.abs(velocityY) < 2000)) {

View File

@ -0,0 +1,40 @@
package net.schueller.peertube.helper;
import android.app.AppOpsManager;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Build;
import android.preference.PreferenceManager;
import android.util.Log;
import net.schueller.peertube.R;
public class VideoHelper {
private static final String TAG = "VideoHelper";
public static boolean canEnterPipMode(Context context) {
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(context);
context.getString(R.string.pref_background_float_key);
// pref is disabled
if (!context.getString(R.string.pref_background_float_key).equals(
sharedPref.getString(
context.getString(R.string.pref_background_behavior_key),
context.getString(R.string.pref_background_float_key))
)
) {
return false;
}
// api does not support it
Log.v(TAG, "api version " + Build.VERSION.SDK_INT);
if (Build.VERSION.SDK_INT > 27) {
AppOpsManager appOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
return (AppOpsManager.MODE_ALLOWED == appOpsManager.checkOp(AppOpsManager.OPSTR_PICTURE_IN_PICTURE, android.os.Process.myUid(), context.getPackageName()));
}
return false;
}
}

View File

@ -143,8 +143,8 @@
<string name="video_meta_button_license">الرخصة</string>
<string name="video_meta_button_language">اللغة</string>
<string name="video_meta_button_tags">العلامات</string>
<string name="menu_video_options_playback_speed" formatted="true">سرعة التشغيل (s%)</string>
<string name="menu_video_options_quality" formatted="true">(%s) الجودة</string>
<string name="menu_video_options_playback_speed" formatted="true">سرعة التشغيل (%1$s)</string>
<string name="menu_video_options_quality" formatted="true">(%1$s) الجودة</string>
<string name="account_bottom_menu_videos">الفيديو</string>
<string name="account_bottom_menu_channels">القنوات</string>
<string name="account_bottom_menu_about">حول</string>

View File

@ -285,8 +285,8 @@
<string name="deeppurple">গাঢ় বেগুনি</string>
<string name="action_bar_title_account">অ্যাকাউন্ট</string>
<string name="bottom_nav_title_recent">সাম্প্রতিক</string>
<string name="menu_video_options_playback_speed" formatted="true">প্লেব্যাক এর গতি (%s)</string>
<string name="menu_video_options_quality" formatted="true">কোয়ালিটি (%s)</string>
<string name="menu_video_options_playback_speed" formatted="true">প্লেব্যাক এর গতি (%1$s)</string>
<string name="menu_video_options_quality" formatted="true">কোয়ালিটি (%1$s)</string>
<string name="account_bottom_menu_videos">ভিডিও</string>
<string name="account_bottom_menu_channels">চ্যানেলগুলি</string>
<string name="account_bottom_menu_about">সম্পর্কিত</string>

View File

@ -276,8 +276,8 @@
<string name="video_meta_button_license">Lizenz</string>
<string name="video_meta_button_language">Sprache</string>
<string name="video_meta_button_tags">Tags</string>
<string name="menu_video_options_playback_speed" formatted="true">Wiedergabegeschwindigkeit (%s)</string>
<string name="menu_video_options_quality" formatted="true">Qualität (%s)</string>
<string name="menu_video_options_playback_speed" formatted="true">Wiedergabegeschwindigkeit (%1$s)</string>
<string name="menu_video_options_quality" formatted="true">Qualität (%1$s)</string>
<string name="account_bottom_menu_videos">Videos</string>
<string name="account_bottom_menu_channels">Kanäle</string>
<string name="account_bottom_menu_about">Über</string>

View File

@ -96,8 +96,8 @@
<string name="video_meta_button_license">Licencia</string>
<string name="video_meta_button_language">Idioma</string>
<string name="video_meta_button_tags">Etiquetas</string>
<string name="menu_video_options_playback_speed" formatted="true">Velocidad de reproducción (%s)</string>
<string name="menu_video_options_quality" formatted="true">Calidad (%s)</string>
<string name="menu_video_options_playback_speed" formatted="true">Velocidad de reproducción (%1$s)</string>
<string name="menu_video_options_quality" formatted="true">Calidad (%1$s)</string>
<string name="account_bottom_menu_videos">Vídeos</string>
<string name="account_bottom_menu_channels">Canales</string>
<string name="account_bottom_menu_about">Acerca de</string>

View File

@ -204,7 +204,7 @@
<string name="nv">navajo</string>
<string name="kr">kanuri</string>
<string name="su">sunda</string>
<string name="menu_video_options_playback_speed" formatted="true">Toistonopeus (%s)</string>
<string name="menu_video_options_playback_speed" formatted="true">Toistonopeus (%1$s)</string>
<string name="ii">sichuanin-yi</string>
<string name="red">Punainen</string>
<string name="video_row_video_thumbnail">Videon esikatselukuva</string>

View File

@ -99,8 +99,8 @@
<string name="video_meta_button_license">Licence</string>
<string name="video_meta_button_language">Langue</string>
<string name="video_meta_button_tags">Étiquettes</string>
<string name="menu_video_options_playback_speed" formatted="true">Vitesse de lecture (%s)</string>
<string name="menu_video_options_quality" formatted="true">Qualité (%s)</string>
<string name="menu_video_options_playback_speed" formatted="true">Vitesse de lecture (%1$s)</string>
<string name="menu_video_options_quality" formatted="true">Qualité (%1$s)</string>
<string name="account_bottom_menu_videos">Vidéos</string>
<string name="account_bottom_menu_channels">Chaînes</string>
<string name="account_bottom_menu_about">À propos</string>

View File

@ -285,8 +285,8 @@
<string name="video_meta_button_license">Ceadachas</string>
<string name="video_meta_button_language">Cànan</string>
<string name="video_meta_button_tags">Tagaichean</string>
<string name="menu_video_options_playback_speed" formatted="true">Luaths na cluiche (%s)</string>
<string name="menu_video_options_quality" formatted="true">Càileachd (%s)</string>
<string name="menu_video_options_playback_speed" formatted="true">Luaths na cluiche (%1$s)</string>
<string name="menu_video_options_quality" formatted="true">Càileachd (%1$s)</string>
<string name="account_bottom_menu_videos">Videothan</string>
<string name="account_bottom_menu_channels">Seanailean</string>
<string name="account_bottom_menu_about">Mu dhèidhinn</string>

View File

@ -286,8 +286,8 @@
<string name="video_meta_button_license">Licenza</string>
<string name="video_meta_button_language">Lingua</string>
<string name="video_meta_button_tags">Parole chiave</string>
<string name="menu_video_options_playback_speed" formatted="true">Velocità di riproduzione (%s)</string>
<string name="menu_video_options_quality" formatted="true">Qualità (%s)</string>
<string name="menu_video_options_playback_speed" formatted="true">Velocità di riproduzione (%1$s)</string>
<string name="menu_video_options_quality" formatted="true">Qualità (%1$s)</string>
<string name="account_bottom_menu_videos">Video</string>
<string name="account_bottom_menu_channels">Canali</string>
<string name="account_bottom_menu_about">A proposito</string>

View File

@ -88,8 +88,8 @@
<string name="video_meta_button_license">ラインセンス</string>
<string name="video_meta_button_language">言語</string>
<string name="video_meta_button_tags">タグ</string>
<string name="menu_video_options_playback_speed" formatted="true">再生速度 (%s)</string>
<string name="menu_video_options_quality" formatted="true">クオリティ(%s)</string>
<string name="menu_video_options_playback_speed" formatted="true">再生速度 (%1$s)</string>
<string name="menu_video_options_quality" formatted="true">クオリティ(%1$s)</string>
<string name="account_bottom_menu_videos">ビデオ</string>
<string name="account_bottom_menu_channels">チャンネル</string>
<string name="account_bottom_menu_about">情報</string>

View File

@ -51,8 +51,8 @@
<string name="video_meta_button_license">Lisens</string>
<string name="video_meta_button_language">Språk</string>
<string name="video_meta_button_tags">Etiketter</string>
<string name="menu_video_options_playback_speed" formatted="true">Avspillingshastighet (%s)</string>
<string name="menu_video_options_quality" formatted="true">Kvalitet (%s)</string>
<string name="menu_video_options_playback_speed" formatted="true">Avspillingshastighet (%1$s)</string>
<string name="menu_video_options_quality" formatted="true">Kvalitet (%1$s)</string>
<string name="account_bottom_menu_videos">Videoer</string>
<string name="account_bottom_menu_channels">Kanaler</string>
<string name="account_bottom_menu_about">Om</string>

View File

@ -275,8 +275,8 @@
<string name="video_meta_button_license">Licentie</string>
<string name="video_meta_button_language">Taal</string>
<string name="video_meta_button_tags">Labels</string>
<string name="menu_video_options_playback_speed" formatted="true">Afspeelsnelheid (%s)</string>
<string name="menu_video_options_quality" formatted="true">Kwaliteit (%s)</string>
<string name="menu_video_options_playback_speed" formatted="true">Afspeelsnelheid (%1$s)</string>
<string name="menu_video_options_quality" formatted="true">Kwaliteit (%1$s)</string>
<string name="account_bottom_menu_videos">Video\'s</string>
<string name="account_bottom_menu_channels">Kanalen</string>
<string name="account_bottom_menu_about">Over</string>

View File

@ -48,8 +48,8 @@
<string name="account_about_account">Konto:</string>
<string name="account_bottom_menu_channels">Kanały</string>
<string name="account_bottom_menu_videos">Filmy</string>
<string name="menu_video_options_quality" formatted="true">Jakość (%s)</string>
<string name="menu_video_options_playback_speed" formatted="true">Prędkość odtwarzania (%s)</string>
<string name="menu_video_options_quality" formatted="true">Jakość (%1$s)</string>
<string name="menu_video_options_playback_speed" formatted="true">Prędkość odtwarzania (%1$s)</string>
<string name="video_meta_button_tags">Znaczniki</string>
<string name="video_meta_button_language">Język</string>
<string name="video_meta_button_license">Licencja</string>

View File

@ -277,8 +277,8 @@
<string name="video_meta_button_license">Лицензия</string>
<string name="video_meta_button_language">Язык</string>
<string name="video_meta_button_tags">Теги</string>
<string name="menu_video_options_playback_speed" formatted="true">Скорость воспроизведения (%s)</string>
<string name="menu_video_options_quality" formatted="true">Качество (%s)</string>
<string name="menu_video_options_playback_speed" formatted="true">Скорость воспроизведения (%1$s)</string>
<string name="menu_video_options_quality" formatted="true">Качество (%1$s)</string>
<string name="account_about_description">Описание:</string>
<string name="api_error">Что-то пошло не так, пожалуйста, попробуйте позже!</string>
<string name="action_set_url">Выберите сервер</string>

View File

@ -272,8 +272,8 @@
<string name="video_meta_button_license">Licens</string>
<string name="video_meta_button_language">Språk</string>
<string name="video_meta_button_tags">Taggar</string>
<string name="menu_video_options_playback_speed" formatted="true">Uppspelningshastighet (%s)</string>
<string name="menu_video_options_quality" formatted="true">Kvalitet (%s)</string>
<string name="menu_video_options_playback_speed" formatted="true">Uppspelningshastighet (%1$s)</string>
<string name="menu_video_options_quality" formatted="true">Kvalitet (%1$s)</string>
<string name="account_bottom_menu_videos">Videor</string>
<string name="account_bottom_menu_channels">Kanaler</string>
<string name="account_bottom_menu_about">Om</string>

View File

@ -291,8 +291,8 @@
<string name="video_meta_button_license">Lisans</string>
<string name="video_meta_button_language">Dil</string>
<string name="video_meta_button_tags">Etiketler</string>
<string name="menu_video_options_playback_speed" formatted="true">Oynatma hızı (%s)</string>
<string name="menu_video_options_quality" formatted="true">Kalite (%s)</string>
<string name="menu_video_options_playback_speed" formatted="true">Oynatma hızı (%1$s)</string>
<string name="menu_video_options_quality" formatted="true">Kalite (%1$s)</string>
<!-- Constants, Don't translate -->
<string name="action_bar_title_account">Hesap</string>
<string name="bottom_nav_title_recent">Yeniler</string>

View File

@ -112,8 +112,8 @@
<string name="video_meta_button_category">类别</string>
<string name="video_meta_button_license">许可</string>
<string name="video_meta_button_tags">标签</string>
<string name="menu_video_options_playback_speed" formatted="true">播放速度 (%s)</string>
<string name="menu_video_options_quality" formatted="true">画质 (%s)</string>
<string name="menu_video_options_playback_speed" formatted="true">播放速度 (%1$s)</string>
<string name="menu_video_options_quality" formatted="true">画质 (%1$s)</string>
<string name="account_bottom_menu_videos">视频</string>
<string name="account_bottom_menu_channels">频道</string>
<string name="account_bottom_menu_about">关于</string>

View File

@ -279,8 +279,8 @@
<string name="video_meta_button_license">授權條款</string>
<string name="video_meta_button_language">語言</string>
<string name="video_meta_button_tags">標籤</string>
<string name="menu_video_options_playback_speed" formatted="true">播放速度 (%s)</string>
<string name="menu_video_options_quality" formatted="true">畫質 (%s)</string>
<string name="menu_video_options_playback_speed" formatted="true">播放速度 (%1$s)</string>
<string name="menu_video_options_quality" formatted="true">畫質 (%1$s)</string>
<string name="account_bottom_menu_videos">影片</string>
<string name="account_bottom_menu_channels">頻道</string>
<string name="account_bottom_menu_about">關於</string>

View File

@ -9,6 +9,7 @@
<string name="pref_token_type" translatable="false">pref_token_type</string>
<string name="pref_auth_username" translatable="false">pref_auth_username</string>
<string name="pref_auth_password" translatable="false">pref_auth_password</string>
<string name="pref_background_behavior_key" translatable="false">pref_background_behavior</string>
<string name="pref_background_audio_key" translatable="false">backgroundAudio</string>
<string name="pref_background_stop_key" translatable="false">backgroundStop</string>
<string name="pref_background_float_key" translatable="false">backgroundFloat</string>

View File

@ -308,8 +308,8 @@
<string name="video_meta_button_license">License</string>
<string name="video_meta_button_language">Language</string>
<string name="video_meta_button_tags">Tags</string>
<string name="menu_video_options_playback_speed" formatted="true">Playback speed (%s)</string>
<string name="menu_video_options_quality" formatted="true">Quality (%s)</string>
<string name="menu_video_options_playback_speed" formatted="true">Playback speed (%1$s)</string>
<string name="menu_video_options_quality" formatted="true">Quality (%1$s)</string>
<string name="account_bottom_menu_videos">Videos</string>
<string name="account_bottom_menu_channels">Channels</string>
<string name="account_bottom_menu_about">About</string>

View File

@ -62,7 +62,7 @@
app:defaultValue="@array/empty_array"
app:entries="@array/backgroundBehavior"
app:entryValues="@array/backgroundBehaviorValues"
app:key="pref_background_behavior"
app:key="@string/pref_background_behavior_key"
app:summary="@string/pref_background_behavior_summary"
app:title="@string/pref_background_behavior"
app:iconSpaceReserved="false"/>