說明
作為一個有強迫症但是技術又很渣的菜狗,對於MX Player這樣的神軟總是躍躍欲試,學習了眾多大佬的修改成果后,記錄一些修改方法,僅限於修改布局等功能,不涉及付費破解(主要是我不會)。
修改記錄
1,去指定字體
a. 刪除\res\font目錄下的所有ttf字體文件;
b. 在\res\values目錄新建fonts.xml;
fonts.xml內容為:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<item type="font" name="muli_extrabold">false</item>
<item type="font" name="muli_extrabolditalic">false</item>
<item type="font" name="muli_italic">false</item>
<item type="font" name="muli_light">false</item>
<item type="font" name="muli_lightitalic">false</item>
<item type="font" name="muli_regular">false</item>
<item type="font" name="muli_semibold">false</item>
<item type="font" name="muli_semibolditalic">false</item> <!--將所有刪除的字體名字放在name=后面,有多少字體就改多少行-->
</resources>
注:此方法適用於使用APKDB等反編譯軟件,如果使用MT修改的話,在刪除字體后,打開resources.arsc,font/font,將其中所有的:
<string name="ttf_muli_black">res/font/ttf_muli_black.ttf</string>
改為:
<bool name="ttf_muli_black">false</bool>
有多少字體就改多少行。
2,去啟動頁
a, 打開AndroidManifest.xml文件;
b,
<activity android:configChanges="keyboard|keyboardHidden|layoutDirection|locale|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode
android:exported="true"
android:launchMode="singleTop"
android:name="com.mxtech.videoplayer.pro.ActivityMediaList"
android:theme="@style/Default.White.Welcome" <!--刪除.White.Welcome-->
android:windowSoftInputMode="stateAlwaysHidden">
3,精簡語言
略過
注意在\res\values\arrays.xml文件里刪除其他語言條目
4,去除文件右側三點菜單中的“MX 分享”和“在私密文件夾中鎖定”
a, 打開\res\layout\fragment_more_bottom_sheet_dialog.xml文件,
b,
<LinearLayout
android:gravity="center_vertical"
android:orientation="horizontal"
android:id="@id/transfer_share"
android:visibility="gone" <!--此處添加這一行-->
android:paddingLeft="16.0dip"
android:paddingRight="16.0dip"
android:layout_width="fill_parent"
android:layout_height="56.0dip">
<LinearLayout
android:gravity="center_vertical"
android:orientation="horizontal"
android:id="@id/option_private_folder"
android:visibility="gone" <!--此處添加這一行-->
android:paddingLeft="16.0dip"
android:paddingRight="16.0dip"
android:layout_width="fill_parent"
android:layout_height="56.0dip">
5,去除側邊欄中的“應用語言”、“文件傳輸”、“私密文件夾”
a, 打開\res\layout\layout_drawerlayout_content_global_user.xml文件
b, 去除 應用語言
<androidx.appcompat.widget.AppCompatTextView
android:id="@id/tv_app_language"
android:visibility="gone" <!--此處添加這一行-->
android:background="?selectableItemBackground"
android:paddingLeft="16.0dip"
android:focusable="true"
android:clickable="true"
android:layout_width="fill_parent"
android:layout_height="@dimen/dp_48"
android:layout_marginLeft="0.0dip"
android:layout_marginTop="@dimen/dp8"
android:text="@string/app_languages"
android:drawableLeft="@drawable/ic_app_language_navigation__light"
android:drawablePadding="22.0dip"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
style="?globalNavigationTextAppearance" />
C, 去除 文件傳輸、私密文件夾 方法同上,在android:id="@id/ll_file_transfer"、android:id="@id/include_private_folder"后各添加一行android:visibility="gone"
6,去除首頁左上角三杠導航中幫助右側的箭頭
a, 打開\res\layout\layout_drawerlayout_content_global_user.xml文件
b,
<androidx.appcompat.widget.AppCompatImageView
android:src="@drawable/mxskin__ic_arrow_navigation__light"
app:layout_constraintBottom_toBottomOf="@id/tv_help"
android:visibility="gone" <!--此處添加這一行-->
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@id/tv_help"
app:mxSkin="src" style="?globalNavigationArrow" />
7,去除視頻播放頁右上角三點菜單“更多”中的“幫助、更新內容、功能、常見疑問、檢查更新、錯誤報告、關於”
a, 打開\res\layout\menu_sub_more.xml文件
b, 方法同上,在android:id="@id/textView4"、android:id="@id/tv_whats_new"、android:id="@id/tv_features"、android:id="@id/tv_faq"、android:id="@id/tv_check_for_update"、android:id="@id/tv_bug_report"、android:id="@id/tv_about"后面添加android:visibility="gone"
8,去除首頁文件選中后右上角三點菜單中的“在私密文件夾中鎖定”和“MX分享”
a, 打開\res\menu\list_action_mode.xml文件
b, 將
<item
android:icon="@drawable/ic_private_file_menu_icon"
android:id="@id/option_private_folder"
android:title="@string/lock_in_private_folder"
android:alphabeticShortcut="f"
app:showAsAction="ifRoom" />
刪除:
c,
<item
android:icon="@drawable/ic_share_white_24dp"
android:id="@id/mx_share"
android:visibility="gone" <!--此處添加這一行-->
android:title="@string/mxshare_file"
android:alphabeticShortcut="s"
app:showAsAction="ifRoom" />
9,去首次啟動的 [側邊欄更多功能引導提示]
a, 打開\smali\com\mxtech\videoplayer\drawerlayout\view\NavigationDrawerGuideView.smali文件
b,
const-string v0, "key_navigation_drawer_tips_show"
invoke-interface {p2, v0, p3}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
move-result p2
const p2, 0x1 #此處添加這一行
if-nez p2, :cond_3
備注
a, 在刪除不需要的布局的時候,可以采用上面常用的辦法,在對應ID后添加android:visibility="gone"(意思是不占位置不顯示),也可以將
android:layout_width="XXXXX"
android:layout_height="XXXXX"
中的XXXXX改為0dp或者0.0dip(也就是將長寬尺寸都改成0),甚至還可以將相關內容直接刪除,三種方法可以靈活使用,如果一種不行換一種方法便是。
b, 由於軟件不斷更新,修改點可能會不斷變動,修改時以實際為准。
