zoukankan      html  css  js  c++  java
  • 从零开始学android开发-adt-bundle-eclipse下的修改android app名称

    eclipse中,打开项目根目录中的AndoirManifest.xml文件,找到如下内容

        <application
            android:allowBackup="true"
            android:icon="@drawable/ic_launcher"
            android:label="@string/app_name"
            android:theme="@style/AppTheme"
            android:debuggable="true">
            <activity          
                android:name="com.demo.firstapp.MainActivity"
                android:label="@string/app_name" >
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
    
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
        </application>

    按住Ctrl键单击第四行内容:android:label="@string/app_name"

    eclipse界面即自动打开项目中/res/values/strings.xml文件,内容如下

    <?xml version="1.0" encoding="utf-8"?>
    <resources>
    
        <string name="app_name">AndroidIntro</string>
        <string name="hello_world">Hello world!</string>
        <string name="menu_settings">More</string>
    
    </resources>

    其实,修改程序名的内容是在此文件的<string name="app_name">标签中修改的,此时只需将/res/values/strings.xml中的app_name标签内容修改为目标内容,本例修改为FirstAPP,运行程序,即可达到预期目的,程序名称已经由AndroidIntro改为FirstAPP,如下图。

    android项目的activity的layout设置,可以把所有TextView的必要硬编码值放置/res/valuse/strings.xml中定义。

  • 相关阅读:
    leetcode1118
    Kaggle练习002--Predict survival on the Titanic(Titanic Disaster)
    leetcode1111
    leetcode1110
    leetcode1109
    练习题|网络编程-socket开发
    web网页练习
    Bootstrap框架
    JQuery框架2.位置属性|筛选方法|事件
    Jquery框架1.选择器|效果图|属性、文档操作
  • 原文地址:https://www.cnblogs.com/dekevin/p/4413725.html
Copyright © 2011-2022 走看看