Android - 如何开始创建启动器应用程序?
我将启动我的新应用程序,它将成为家庭替代品。 我已经通过谷歌提供的例子。但我还是有点困惑。
喜欢 我应该从哪里开始? 我是否应该通过扩展 Activity 类来创建正常活动,然后仅设置背景图像(壁纸)并使用网格视图来显示所有应用程序?
如何让 Android 将我的应用程序视为启动程序进程?
我脑子里有很多问题,请不要建议我使用 Android Launcher,因为它有几乎 100 多个类,我需要的只是一个简单的开始,之后我知道我想从我的应用程序中得到什么。
I am going to start my new app which is going to be a Home Replacement.
I have been through the example provided by google. but i am still little bit confused.
like
Where should i start?
Should i create a normal activity by extending an Activity class then just set the background image(wallpaper) and use a grid view to show all applications?
How to make Android to treat my app as a launcher process?
so many question running in my mind and please don't advise me to go through Android Launcher because it has almost more than 100 classes and what i need is just a simple start after that i know what i want from my app.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
找到了一篇与该问题相关的精彩文章:http://arnab.ch/blog/2013/08/how-to-write-custom-launcher-app-in-android/
Found an amazing article related to the question: http://arnab.ch/blog/2013/08/how-to-write-custom-launcher-app-in-android/
我首先会查看 Android 附带的启动器的源代码,以了解它的工作原理以及代码的结构:
https://android.googlesource.com/platform/packages/apps/Launcher2
I would start by looking at the source for the launcher that ships with Android to get an idea of how it works and how the code is structured:
https://android.googlesource.com/platform/packages/apps/Launcher2
不久前我的处境和你一样。我看了一下官方的 Launcher2 代码,这太复杂了作为一个开始的例子。 SDK 本身中包含的 Home 示例(以我的诚实观点)对于其预期目的来说太复杂了,即帮助像你我这样的人学习如何构建自定义启动器......谷歌到底是什么。
无论如何,我整理了一个快速 超级简单的启动器(名为 SimpleLauncher,令人惊讶),不超过 2 个类且< 200 行代码帮助我了解自定义 Android 应用启动器的基础知识。它只是为了作为基础知识的简单参考,并且存在一些问题,但是请看一下。我认为它比谷歌的例子更容易理解。
I was in the same position as you a little while back. I took a look at the official Launcher2 code, which is way too frikin complicated to be an example to start off with. The Home example included in the SDK itself is (in my honest opinion) too complicated for it's intended purpose, i.e. helping guys like you and me learn how to build a custom launcher...what the heck Google.
Anyways, I put together a quick super simple launcher (called SimpleLauncher, surprise) that is no more than 2 classes and < 200 lines of code to help me understand the basics of a custom Android app launcher. It's only intended to be an easy reference for the basics and is kind of buggy, but take a look. I think it's much easier to understand than Google's examples.
我不确定我是否正确理解了你的问题,但是你在寻找某种启动动画吗?如果是这样,请检查一下。
如何在android中实现应用程序启动动画
I'm not sure if I understood your question correctly, but are you looking for a startup animation of some sort? If so, check this out.
How to implement application startup animation in android