Android 11 TTS 初始化失败

  • AndroidManifest.xml 中声明

    1
    2
    3
    4
    5
    <queries>
    <intent>
    <action android:name="android.intent.action.TTS_SERVICE" />
    </intent>
    </queries>

macOS 安装 WordPress

BlackBerry 10 通过 DBBT 安装应用(.bar)

Android PopupMenu 自定义选中项背景

1
2
3
4
5
6
7
8
Field mPopup = popupMenu.getClass().getDeclaredField("mPopup");
mPopup.setAccessible(true);
MenuPopupHelper helper = (MenuPopupHelper) mPopup.get(popupMenu);
Class standardMenuPopup = Class.forName("androidx.appcompat.view.menu.StandardMenuPopup");
Field mPopupField = standardMenuPopup.getDeclaredField("mPopup");
mPopupField.setAccessible(true);
MenuPopupWindow menuPopupWindow = (MenuPopupWindow) mPopupField.get(helper.getPopup());
menuPopupWindow.getListView().setSelector(background);

Android PopupMenu 自定义宽度

1
2
3
4
5
6
7
8
9
10
Field mPopup = popupMenu.getClass().getDeclaredField("mPopup");
mPopup.setAccessible(true);
MenuPopupHelper helper = (MenuPopupHelper) mPopup.get(popupMenu);
Class standardMenuPopup = Class.forName("androidx.appcompat.view.menu.StandardMenuPopup");
Field mHasContentWidth = standardMenuPopup.getDeclaredField("mHasContentWidth");
mHasContentWidth.setAccessible(true);
mHasContentWidth.setBoolean(helper.getPopup(), true);
Field mContentWidth = standardMenuPopup.getDeclaredField("mContentWidth");
mContentWidth.setAccessible(true);
mContentWidth.setInt(helper.getPopup(), width);

Android PopupMenu 自定义显示位置

1
2
3
4
Field mPopup = popupMenu.getClass().getDeclaredField("mPopup");
mPopup.setAccessible(true);
MenuPopupHelper helper = (MenuPopupHelper) mPopup.get(popupMenu);
helper.show(x, y);

Android PopupMenu 强制显示图标

1
2
3
4
Field mPopup = popupMenu.getClass().getDeclaredField("mPopup");
mPopup.setAccessible(true);
MenuPopupHelper helper = (MenuPopupHelper) mPopup.get(popupMenu);
helper.setForceShowIcon(true);

Linux 删除受保护的文件 .user.ini

  • 去掉保护

    1
    chattr -i .user.ini
  • 删除

    1
    rm -f .user.ini