问题标签 [homescreen]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
android - Android - 清除最近的应用程序列表(长按 HOME 后显示)
我正在编写一个自定义启动器应用程序。问题是即使将其设置为默认值,长按 HOME 按钮也会带来最近的应用程序列表,包括旧的启动器。
是否可以清除最近的应用列表?
android - 如何在 Android API 11 平板电脑等(在 java 代码中)上获取应用程序的 hdpi 图标?
我在摩托罗拉 xoom 上注意到,启动器上的应用程序图标是 72 像素 x 72 像素。这通常是包中 drawable-hdpi/ 中定义的图标的大小。
在我的应用程序中,我想以 72x72px 大小显示一些已安装应用程序的图标。我目前通过 PackageManager 获取已安装应用程序的图标,但它返回的位图尺寸较小(46px),这对应于每个包的 drawable-mdpi/ 中定义的资源。这对我来说是不可接受的,因为我想以更大的格式显示这些图标。
显然,摩托罗拉 xoom 的 10" 屏幕是 160dpi,因此是 mdpi 和 xlarge(请参阅http://developer.android.com/guide/practices/screens_support.html#range)。这可以解释 PackageManager 向我返回 mdpi 资源的行为而不是 hdpi 资源。
如何获得最小 72x72px 大小的已安装应用程序的图标?有谁知道它是如何在 Android Honeycomb 上的 Launcher 应用程序中完成的?
谢谢,劳伦特
android - 如何区分在Android中切换活动与切换到主屏幕
我正在开发 Android:: 媒体播放器应用程序。为简单起见,该应用程序有 3 个活动:A、B 和 C 是活动。
当我从活动 A 切换到 B 时:活动 A 的 onPause() 和 onStop() 被调用。但是当我从 Activity A 进入主屏幕时,会调用相同的函数:onPause() 和 onStop()。
目前我面临一个问题:如果用户进入主屏幕:: 室外能见度、亮度等设置必须重置为系统,另一方面,如果我在活动之间切换,我必须保持这些值根据具体应用。
我如何区分这一点,我正在同一个应用程序(或)进入主屏幕的活动之间切换。
java - 无法通过 root 访问绕过主页按钮延迟
我正在开发一个供私人使用的应用程序。问题是当按下主页按钮时我用来启动活动的服务仍然受到 5 秒延迟的影响。我使用此代码授予 root 权限,并通过打开超级用户 toast 通知进行验证:
我是否需要做任何其他事情才能绕过规则?我不会使用家庭助手,它会阻止 android 系统将 LauncherPro 保留在内存中并正常运行。
java - 清空(或填充)最近的应用程序列表
我开发了一个婴儿应用程序,我需要锁定应用程序的所有键和方式,以便能够将电话交给我的女儿。我使用“替换主屏幕”的方法来捕获主键,效果很好。所有其他硬键(电源按钮除外,但这不是问题,因为它无论如何都不容易按下)被锁定。但是经常讨论的长按主页键仍然是启动最近的应用程序并提供了一条出路(当然女儿几乎立即找到了)。
我已经看到市场上的其他应用程序(幼儿锁等)通过清空最近的应用程序列表(或用一个指向婴儿应用程序的图标填充它)来解决这个问题,但我不知道如何实现这一点。有人有解决方案吗?如何从我的应用程序中填写最近的应用程序?幼儿锁甚至会在锁应用退出后重置最近的应用。
javascript - 是否有可用的 CSS/JavaScript 框架来帮助模仿 iOS 主屏幕?
CSS/JavaScript 中是否存在类似 iOS 主屏幕的框架?我想制作一个与 Android/iOS 主屏幕类似的信息亭。这将是一个在网格布局中带有“应用程序”的桌面网页。
android - 如何列出 Android 的所有主屏幕文件夹
我知道我们可以从 packagemanager 获取所有已安装的应用程序。
有没有办法在主屏幕上获取用户创建的文件夹列表?另外,我们怎么知道哪个应用程序在哪个文件夹中?!
iphone - iphone,自动添加主屏幕图标
是否可以在 iPhone 主屏幕上有一个图标,无需用户进行编程。我的意思是,当您在 iPhone 上访问 Youtube 时,它会要求您添加一个主屏幕按钮,您单击该按钮,然后它会直接将您带到 youtube 页面。我需要知道是否可以自动添加主屏幕按钮,甚至不需要用户添加它。
iphone - 检测 iphone 主屏幕上的应用程序
您知道如何将 Web 应用程序添加到 iPhone 的主屏幕......现在我如何检测我的应用程序是否已添加到用户 iPhone 的主屏幕。
如果已添加,我如何启动存储在用户主屏幕上而不是 Safari 中的应用程序。
NOTE : its a web app simply bookmarked on the home screen of an iPhone - it is NOT a native app.
有任何想法吗 ?
android - 重新启动期间未调用主屏幕启动器应用程序的 Android 应用程序 onCreate
我正在构建的 Android 应用程序中遇到一个奇怪的问题,该应用程序基本上是一个主屏幕替换应用程序,它将作为设备中的默认主屏幕放置。为了做一些初始化工作,我扩展了 Android Application 类,在onCreate()
方法中我基本上注册了一些观察者并启动了一个服务,代码如下:
清单文件内容:
This works fine when I install the app either using Eclipse or manually installing the apk onto the device. Once the app is installed things work fine, I mean the above onCreate()
method gets called and service is also started normally, but if I reboot the device this time the onCreate()
method does not get called(none of the log statements appear and also the services are not started). After some debugging I noticed that this only happens if I set my app as the default launcher/homescreen app and thereafter reboots the device, because once you set the app as the default launcher, Android should automatically launch your app as the homescreen after reboot. In my case the app is launched but that code is not executed.
I tried to use debugger but that didn't work because when I reboot the device the debugger gets disconnected and by the time USB debugging gets enabled my app is already started.
I even double checked the Logcat but didn't see any error. I thought of having a BOOT_COMPLETED intent to initialize that part, but that will require some code refactoring which I am not willing to do at this point of time unless there is a solution.
So I am curious to know that whether this is a standard behavior, or is there a known bug which causes this, because my assumption is the onCreate
method of the Application will always get called whenever the app is started. I have tried whatever I could since morning, but nothing worked, couldn't pinpoint the issue, if any of you could shed some light into this then that would be highly appreciated.
Thanks