安卓显示hotseat应用名称

这篇博客主要涉及SprdLauncher应用的源代码修改,包括调整BubbleTextView的图标边距,设置了默认填充为0;在Hotseat区域显示应用名称,并隐藏文件夹标题;同时在Hotseat/底部菜单栏中让图标显示标题。这些更改影响了用户界面的布局和视觉效果。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

调整图标边距
vendor\sprd\platform\packages\apps\SprdLauncher\src\com\android\sprdlauncher3\BubbleTextView.java

setCompoundDrawables(null, iconDrawable, null, null);
        if (setDefaultPadding) {
            DeviceProfile grid = app.getDynamicGrid().getDeviceProfile();
-           setCompoundDrawablePadding(grid.iconDrawablePaddingPx);
+           setCompoundDrawablePadding(0);
        }

显示hotseat应用名称
vendor\sprd\platform\packages\apps\SprdLauncher\src\com\android\sprdlauncher3\Hotseat.java

 			allAppsButton.setContentDescription(context.getString(R.string.all_apps_button_label));
+           allAppsButton.setText(R.string.all_apps_button_label);
			allAppsButton.setOnKeyListener(new HotseatIconKeyEventListener());

在hotseat中隐藏文件夹标题
vendor\sprd\platform\packages\apps\SprdLauncher\src\com\android\sprdlauncher3\Workspace.java

// Hide folder title in the hotseat
            if (child instanceof FolderIcon) {
-                ((FolderIcon) child).setTextVisible(false);
+				 ((FolderIcon) child).setTextVisible(true);
            }

让Hotseat/底部菜单栏的图标显示标题
vendor\sprd\platform\packages\apps\SprdLauncher\src\com\android\sprdlauncher3\CellLayout.java

public boolean addViewToCellLayout(View child, int index, int childId, LayoutParams params,
            boolean markCells) {
        final LayoutParams lp = params;

        // Hotseat icons - remove text
        //if (child instanceof BubbleTextView) {
        //    BubbleTextView bubbleChild = (BubbleTextView) child;
        //    bubbleChild.setTextVisibility(!mIsHotseat);
       // }
// Hide folder title in the hotseat
            if (child instanceof FolderIcon) {
-               ((FolderIcon) child).setTextVisible(false);
+               ((FolderIcon) child).setTextVisible(true);
            }

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值