frontend : migrate legacy to androidx

This commit is contained in:
Cuynu 2024-06-20 09:43:00 +07:00
commit 2540e08eeb

View file

@ -1,46 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" xmlns:yt="http://schemas.android.com/apk/res-auto">
<PreferenceCategory
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" xmlns:yt="http://schemas.android.com/apk/res-auto">
<androidx.preference.PreferenceCategory
android:title="@string/microg_settings">
<PreferenceScreen
<androidx.preference.PreferenceScreen
android:title="@string/microg_notification_settings"
android:summary="@string/microg_notification_settings_summary">
<intent
android:targetPackage="com.mgoogle.android.gms"
android:targetClass="org.microg.gms.ui.SettingsActivity" />
</PreferenceScreen>
</PreferenceCategory>
</androidx.preference.PreferenceScreen>
</androidx.preference.PreferenceCategory>
<PreferenceCategory
<androidx.preference.PreferenceCategory
android:title="@string/vancedx_settings_title" />
<PreferenceScreen
<androidx.preference.PreferenceScreen
android:title="@string/vancedx_video_title"
android:summary="@string/vancedx_video_summary"
android:key="vx_video_settings">
<PreferenceCategory
<androidx.preference.PreferenceCategory
android:title="@string/vancedx_video_summary" >
<ListPreference
<androidx.preference.ListPreference
android:title="@string/vancedx_video_quality_overwifi_title"
android:key="vx_videoquality_overwifi"
android:summary="@string/vancedx_setvalue_summary" />
<ListPreference
<androidx.preference.ListPreference
android:title="@string/vancedx_video_quality_overcellular"
android:key="vx_videoquality_overcellular"
android:summary="@string/vancedx_setvalue_summary" />
<ListPreference
<androidx.preference.ListPreference
android:title="@string/vancedx_default_video_speed_title"
android:key="vx_videospeed"
android:summary="@string/vancedx_setvalue_summary" />
</PreferenceCategory>
<PreferenceCategory
</androidx.preference.PreferenceCategory>
<androidx.preference.PreferenceCategory
android:title="Experimential" >
<SwitchPreference
android:title="@string/vancedx_fix_videoplayback_title"
android:key="vx_videoplaybackfix"
android:defaultValue="false"
android:summary="@string/vancedx_fix_videoplayback_summary" />
</PreferenceCategory>
<PreferenceCategory
</androidx.preference.PreferenceCategory>
<androidx.preference.PreferenceCategory
android:title="Video codecs" >
<SwitchPreference
android:title="@string/vancedx_vp9_codec_title"
@ -52,283 +52,282 @@
android:key="vx_avc"
android:summaryOn="@string/vancedx_avc_codec_summaryon"
android:summaryOff="@string/vancedx_avc_codec_summaryoff" />
</PreferenceCategory>
</PreferenceScreen>
</androidx.preference.PreferenceCategory>
</androidx.preference.PreferenceScreen>
<PreferenceScreen
<androidx.preference.PreferenceScreen
android:title="@string/ads_settings_title"
android:summary="@string/ads_settings_summary"
android:key="vx_adsettings">
<SwitchPreference
<androidx.preference.SwitchPreferenceCompat
android:title="@string/vancedx_remove_home_ads"
android:key="vx_homeads"
android:defaultValue="true"
android:summaryOn="@string/vancedx_remove_homeads_enabled"
android:summaryOff="@string/vancedx_disable_homeads_disabled" />
<SwitchPreference
<androidx.preference.SwitchPreferenceCompat
android:title="@string/vancedx_remove_videoads_title"
android:key="vx_videoads"
android:defaultValue="true"
android:summaryOn="@string/vancedx_remove_videoads_enabled"
android:summaryOff="@string/vancedx_remove_videoads_disabled" />
<SwitchPreference
<androidx.preference.SwitchPreferenceCompat
android:title="@string/vancedx_rm_community_posts"
android:key="vx_rmcommunity"
android:defaultValue="false"
android:summaryOn="@string/vancedx_rm_community_posts_summaryon"
android:summaryOff="@string/vancedx_rm_community_posts_summaryoff" />
<SwitchPreference
<androidx.preference.SwitchPreferenceCompat
android:title="@string/vancedx_rm_movies_shelf"
android:key="vx_movieshelf"
android:defaultValue="false"
android:summaryOn="@string/vancedx_rm_movies_shelf_summaryon"
android:summaryOff="@string/vancedx_rm_movies_shelf_summaryoff" />
</PreferenceScreen>
</androidx.preference.PreferenceScreen>
<PreferenceScreen
<androidx.preference.PreferenceScreen
android:title="@string/vancedx_layout_title"
android:summary="@string/vancedx_layout_summary"
android:key="vx_layoutsettings">
<SwitchPreference
<androidx.preference.SwitchPreferenceCompat
android:title="@string/vancedx_endscreencard"
android:key="vx_endscreencard"
android:defaultValue="true"
android:summaryOn="@string/vancedx_endscreencard_on"
android:summaryOff="@string/vancedx_endscreencard_off" />
<SwitchPreference
<androidx.preference.SwitchPreferenceCompat
android:title="@string/vancedx_infocards"
android:key="vx_infocard"
android:defaultValue="true"
android:summaryOn="@string/vancedx_infocards_on"
android:summaryOff="@string/vancedx_infocards_off"/>
<SwitchPreference
<androidx.preference.SwitchPreferenceCompat
android:title="@string/vancedx_watermark"
android:key="vx_watermark"
android:defaultValue="true"
android:summaryOn="@string/vancedx_watermark_on"
android:summaryOff="@string/vancedx_watermark_off" />
<SwitchPreference
<androidx.preference.SwitchPreferenceCompat
android:title="@string/vancedx_castbutton"
android:key="vx_castbutton"
android:defaultValue="true"
android:summaryOn="@string/vancedx_castbutton_on"
android:summaryOff="@string/vancedx_castbutton_off" />
<SwitchPreference
<androidx.preference.SwitchPreferenceCompat
android:title="@string/vancedx_miniplayer"
android:key="vx_miniplayer"
android:defaultValue="false"
android:summaryOn="@string/vancedx_miniplayer_on"
android:summaryOff="@string/vancedx_miniplayer_off" />
<SwitchPreference
<androidx.preference.SwitchPreferenceCompat
android:title="@string/vancedx_createbutton"
android:key="vx_createbutton"
android:defaultValue="true"
android:summaryOn="@string/vancedx_createbutton_on"
android:summaryOff="@string/vancedx_createbutton_off" />
<SwitchPreference
<androidx.preference.SwitchPreferenceCompat
android:title="@string/vancedx_widesearchbar"
android:key="vx_widesearchbar"
android:defaultValue="false"
android:summaryOn="@string/vancedx_widesearchbar_on"
android:summaryOff="@string/vancedx_widesearchbar_off" />
<SwitchPreference
<androidx.preference.SwitchPreferenceCompat
android:title="@string/vancedx_old_library_title"
android:key="vx_librarytab"
android:defaultValue="false"
android:summary="@string/vancedx_old_library_summary" />
<SwitchPreference
<androidx.preference.SwitchPreferenceCompat
android:title="@string/vancedx_old_explore_title"
android:key="vx_explorebt"
android:defaultValue="false"
android:summaryOn="@string/vancedx_old_explore_on"
android:summaryOff="@string/vancedx_old_explore_off" />
<SwitchPreference
<androidx.preference.SwitchPreferenceCompat
android:title="@string/vancedx_premiumheader_title"
android:key="vx_premiumheader"
android:defaultValue="false"
android:summaryOn="@string/vancedx_premiumheader_on"
android:summaryOff="@string/vancedx_premiumheader_off" />
</PreferenceScreen>
</androidx.preference.PreferenceScreen>
<PreferenceScreen
<androidx.preference.PreferenceScreen
android:title="@string/vancedx_swipe_controls_title"
android:summary="@string/vancedx_swipe_controls_summary"
android:key="vx_swipecontrol_settings">
<SwitchPreference
<androidx.preference.SwitchPreferenceCompat
android:title="@string/vancedx_brightness_gesture_title"
android:key="vx_swipebrightness"
android:defaultValue="false"
android:summaryOn="@string/vancedx_brightness_gesture_summary_on"
android:summaryOff="@string/vancedx_brightness_gesture_summary_off" />
<SwitchPreference
<androidx.preference.SwitchPreferenceCompat
android:title="@string/vancedx_volume_gesture_title"
android:key="vx_volumeswipe"
android:defaultValue="false"
android:summaryOn="@string/vancedx_volume_gesture_summary_on"
android:summaryOff="@string/vancedx_volume_gesture_summary_off" />
</PreferenceScreen>
</androidx.preference.PreferenceScreen>
<PreferenceScreen
<androidx.preference.PreferenceScreen
android:title="@string/vancedx_misc_title"
android:summary="@string/vancedx_misc_summary"
android:key="vx_miscsettings">
<SwitchPreference
<androidx.preference.SwitchPreferenceCompat
android:title="@string/vancedx_downloadbutton_title"
android:key="vx_downloadbutton"
android:defaultValue="true"
android:summaryOn="@string/vancedx_downloadbutton_on"
android:summaryOff="@string/vancedx_downloadbutton_off" />
<EditTextPreference
<androidx.preference.EditTextPreference
android:title="@string/vancedx_pkgname"
android:key="vx_downloader_pkgname" />
<SwitchPreference
<androidx.preference.SwitchPreferenceCompat
android:title="@string/vancedx_autorepeat_tilte"
android:key="vx_autorepeat"
android:defaultValue="false"
android:summaryOn="@string/vancedx_autorepeat_on"
android:summaryOff="@string/vancedx_autorepeat_off" />
<SwitchPreference
<androidx.preference.SwitchPreferenceCompat
android:title="@string/vancedx_copyurl_bt_title"
android:key="vx_copybt"
android:defaultValue="false"
android:summary="@string/vancedx_copyurl_bt_summary" />
<SwitchPreference
<androidx.preference.SwitchPreferenceCompat
android:title="@string/vancedx_copyurl_timestamp_bt_title"
android:key="vx_copybt_time"
android:defaultValue="false"
android:summary="@string/vancedx_copyurl_timestamp_bt_summary" />
<SwitchPreference
<androidx.preference.SwitchPreferenceCompat
android:title="@string/vancedx_bgplayback_title"
android:key="vx_bgplayback_policy"
android:defaultValue="true"
android:summaryOn="@string/vancedx_bgplayback_summary_on"
android:summaryOff="@string/vancedx_bgplayback_summary_off" />
<SwitchPreference
<androidx.preference.SwitchPreferenceCompat
android:title="@string/vancedx_googleone_frame_title"
android:icon="@drawable/googleone_circleframe"
android:key="vx_ggoneframe"
android:defaultValue="false"
android:summary="@string/vancedx_googleone_frame_summary" />
</PreferenceScreen>
</androidx.preference.PreferenceScreen>
<PreferenceCategory
<androidx.preference.PreferenceScreen
android:title="@string/vancedx_about">
<PreferenceScreen
<androidx.preference.PreferenceScreen
android:title="@string/vancedx_about"
android:summary="@string/vancedx_about_summary"
android:key="vx_aboutprefs">
<Preference
<androidx.preference.Preference
android:title="@string/vancedx_aboutproject_gitlab_title"
android:icon="@drawable/ic_gitlab"
android:summary="@string/vancedx_aboutproject_gitlab_summary">
<intent
android:action="android.intent.action.VIEW"
android:data="@string/vancedx_gitlab_url" />
</Preference>
<Preference
</androidx.preference.Preference>
<androidx.preference.Preference
android:title="@string/vancedx_aboutproject_sourceforge"
android:icon="@drawable/ic_sourceforge"
android:summary="@string/vancedx_aboutproject_sourceforge_summary">
<intent
android:action="android.intent.action.VIEW"
android:data="@string/vancedx_sourceforge_url" />
</Preference>
<Preference
</androidx.preference.Preference>
<androidx.preference.Preference
android:title="@string/vancedx_discord"
android:icon="@drawable/ic_discord"
android:summary="@string/vancedx_discord_summary">
<intent
android:action="android.intent.action.VIEW"
android:data="@string/vancedx_discord_url" />
</Preference>
<Preference
</androidx.preference.Preference>
<androidx.preference.Preference
android:title="@string/vancedx_aboutproject_tgchannel_title"
android:icon="@drawable/tglogo"
android:summary="@string/vancedx_aboutproject_tgchannel_summary">
<intent
android:action="android.intent.action.VIEW"
android:data="@string/vancedx_tgchannel_url" />
</Preference>
<Preference
</androidx.preference.Preference>
<androidx.preference.Preference
android:title="@string/vancedx_aboutproject_tgchat_title"
android:icon="@drawable/tglogo"
android:summary="@string/vancedx_aboutproject_tgchat_summary">
<intent
android:action="android.intent.action.VIEW"
android:data="@string/vancedx_tgchat_url" />
</Preference>
<PreferenceCategory
</androidx.preference.Preference>
<androidx.preference.PreferenceCategory
android:title="Contributors">
<Preference
<!-- DO NOT REMOVE THIS CREDIT, OTHERWISE PROJECT CAN BE DEAD -->
<androidx.preference.Preference
android:title="Cuynu"
android:icon="@drawable/ic_author"
android:layout_width="48dp"
android:layout_height="48dp"
android:summary="Implement Vanced+ - Vietnamese translation">
<intent
android:action="android.intent.action.VIEW"
android:data="@string/vancedx_authorchannel" />
</Preference>
</PreferenceCategory>
</PreferenceScreen>
</PreferenceCategory>
</androidx.preference.Preference>
</androidx.preference.PreferenceCategory>
</androidx.preference.PreferenceScreen>
</androidx.preference.PreferenceScreen>
<PreferenceCategory
<androidx.preference.PreferenceCategory
android:title="@string/vancedx_patchinformation_title"/>
<PreferenceScreen
<androidx.preference.PreferenceScreen
android:title="vancedx-patches"
android:summary="@string/vancedx_details">
<Preference
<androidx.preference.Preference
android:summary="@string/vancedx_warning_unknownsites">
<intent
android:action="android.intent.action.VIEW"
android:data="https://gitlab.com/cuynu/vancedx/-/releases"/>
</Preference>
<Preference
</androidx.preference.Preference>
<androidx.preference.Preference
android:title="@string/vancedx_patches_version"
android:summary="v1.0.1-test"/>
<Preference
<androidx.preference.Preference
android:title="@string/vancedx_sourcecode"
android:icon="@drawable/ic_gitlab"
android:summary="@string/vancedx_patches_sourcecode">
<intent
android:action="android.intent.action.VIEW"
android:data="https://gitlab.com/cuynu/vancedx-patches"/>
</Preference>
</PreferenceScreen>
<PreferenceScreen
</androidx.preference.Preference>
</androidx.preference.PreferenceScreen>
<androidx.preference.PreferenceScreen
android:title="vancedx-integrations"
android:summary="@string/vancedx_details">
<Preference
<androidx.preference.Preference
android:summary="@string/vancedx_warning_unknownsites">
<intent
android:action="android.intent.action.VIEW"
android:data="https://gitlab.com/cuynu/vancedx/-/releases"/>
</Preference>
<Preference
</androidx.preference.Preference>
<androidx.preference.Preference
android:title="@string/vancedx_integrations_version"
android:summary="v1.4.5-cuynu"/>
<Preference
<androidx.preference.Preference
android:title="@string/vancedx_sourcecode"
android:icon="@drawable/ic_gitlab"
android:summary="@string/vancedx_integrations_sourcecode">
<intent
android:action="android.intent.action.VIEW"
android:data="https://gitlab.com/cuynu/vancedx-integrations" />
</Preference>
</PreferenceScreen>
</androidx.preference.Preference>
</androidx.preference.PreferenceScreen>
<PreferenceCategory
<androidx.preference.PreferenceCategory
android:title="@string/vancedx_debug">
<Preference
<androidx.preference.Preference
android:title="@string/vancedx_restart_title"
android:key="vx_rebootdialog" />
<SwitchPreference
<androidx.preference.SwitchPreferenceCompat
android:defaultValue="false"
android:key="vx_debuglogs"
android:summaryOff="@string/vancedx_debug_mode_notallowed"
android:summaryOn="@string/vancedx_debug_mode_summaryon"
android:title="@string/vancedx_debug_mode"
android:enabled="false" />
</PreferenceCategory>
</PreferenceScreen>
</androidx.preference.PreferenceCategory>
</androidx.preference.PreferenceScreen>