制作自定义主题为Android手机 [英] making customized theme for android phone

查看:291
本文介绍了制作自定义主题为Android手机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个新的移动开发人员,我知道如何把主题上的应用程序,我是能够使2移动应用程序的,但现在我想尝试做一个定制主题手机。我不知道是否有人在那里有想法放在下面。

  1.how做一个定制主题手机。
2.什么是主题的格式。
3.is有可能使其在月食。
4.什么是考虑做一个主题手机所需要的东西。
5.how实现定制主题的手机。
6.available教程制作一个定制的手机主题。
 

解决方案

如果你想改变像GO桌面或阿奥梅一个特定主题的应用程序的主题,你可以找到他们的网站的链接,看到了这个问题的更多信息< A HREF =htt​​p://stackoverflow.com/questions/2613101/themes-in-android/2613581>在Android的主题?

但你也可以写你启动应用程序,如果你想这样做,你可以看到这个链接:建立一个应用程序启动器Android版

如果你想改变你的应用程序的主题,所以: 你可以看到这些文件和教程:
1. developer.android.com/guide/topics/ui/themes.html 2. 的Andr​​oid样式和主题 - 教程

另一种方式,我想你一定知道建设的几个主题是建设一个APK为您的应用程序的每一个主题,这是使你的应用程序的大小更小。像这样的功能:

 公共静态资源的getResource(){
        resourcePackageName =com.mine.MyApp;
        PackageManager packageManager = mContext.getPackageManager();
        资源资源= NULL,resources2 = NULL;
        尝试 {
            资源= mContext.getResources();
            resources2 = packageManager
                    .getResourcesForApplication(com.mine.MyAppTheme);
            resourcePackageName =com.mine.MyAppTheme;
        }赶上(例外五){
            Log.d(SS,e.toString());
        }

        如果(resources2!= NULL)
            mResource = resources2;
        其他
            mResource =资源;
        返回mResource;
    }
 

在此code,你的应用程序名称是 com.mine.MyApp 和你有在 COM所有资源的应用程序.mine.MyApp 这是你的主题,主题的apk应用程序名称是 com.mine.MyAppTheme 。您可以使用多个APK几个主题。只是把主题apk文件的资源。你可以看到这个问题:  写作主题的应用程序的Andr​​oid

I'm a new mobile developer and i know how to put theme on an application i was able to make 2 mobile application as of now but i wanted to try to make a customized theme for phones. I'm wondering if anyone out there has idea on the following.

1.how to make a customized theme for phone.
2.what is the format of the theme.
3.is it possible to make it in eclipse.
4.what are the things needed to consider to make a theme for phone.
5.how to implement customized theme on phone.
6.available tutorial on making a customized phone theme.

解决方案

If you want to change theme of an specific theme application like GO Launcher or aHome, you can find a link on their site, see this question for more information Themes in Android?

but you can also write your launcher application, if you want to do this, you can see this links: Build An Application Launcher For Android

If you want to change theme of your application, so: You can see these documents and tutorials:
1. developer.android.com/guide/topics/ui/themes.html 2. Android Styles and Themes - Tutorial

Another way that i think you must know for building several themes is building an apk for every theme of your application, this is make your app size smaller. like this function:

public static Resources getResource() {
        resourcePackageName = "com.mine.MyApp";
        PackageManager packageManager = mContext.getPackageManager();
        Resources resources = null, resources2 = null;
        try {
            resources = mContext.getResources();
            resources2 = packageManager
                    .getResourcesForApplication("com.mine.MyAppTheme");
            resourcePackageName = "com.mine.MyAppTheme";
        } catch (Exception e) {
            Log.d("ss", e.toString());
        }

        if (resources2 != null)
            mResource = resources2;
        else
            mResource = resources;
        return mResource;
    }

In this code, your app name is com.mine.MyApp and you have a app with all of resources in the com.mine.MyApp that is your theme, name of theme apk app is com.mine.MyAppTheme. you can use several apk as several theme. just put your resources on theme apk file. you can see this question: Writing themed applications in Android

这篇关于制作自定义主题为Android手机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆