去除机器人:preFIX每个属性 [英] removing android: prefix for every attribute

查看:161
本文介绍了去除机器人:preFIX每个属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Android的布局xml文件中有机器人。preFIX与每一个属性

有没有什么解决办法去除他们。

 <?XML版本=1.0编码=UTF-8&GT?;
< LinearLayout中的xmlns:机器人=htt​​p://schemas.android.com/apk/res/android
  机器人:ID =@ + ID / linearLayout1
  机器人:layout_height =FILL_PARENT
  机器人:layout_width =WRAP_CONTENT>
  <按钮机器人:ID =@ + ID /按钮1
    机器人:layout_height =WRAP_CONTENT
    机器人:layout_width =FILL_PARENT
    机器人:文字=@字符串/ test_button>
  < /按钮>
< / LinearLayout中>


解决方案

也许是这篇文章可以帮助你;的http://groups.google.com/group/android-developers/browse_thread/thread/d94c1f53a331c53b

请看到这个帖子就知道了,为什么有一个Android preFIX; 的Andr​​oid XML布局文件和命名空间

更新:(Josh的评论后)

另一种方式做同样的是在Eclipse的查找使用正前pression /替换工具。这种方法比第一种更容易。

Android layout xml file has "android:" prefix with every attribute.

is there any solution for removing them.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/linearLayout1"
  android:layout_height="fill_parent"
  android:layout_width="wrap_content">
  <Button android:id="@+id/button1"
    android:layout_height="wrap_content"
    android:layout_width="fill_parent"
    android:text="@string/test_button">
  </Button>
</LinearLayout>

解决方案

May be this post helps you; http://groups.google.com/group/android-developers/browse_thread/thread/d94c1f53a331c53b

Please see this post to know, why there is an android prefix; Android XML layout files and namespace

Update: (After Josh's comment)

Another way to do the same is to use a regular expression in Eclipse's Find/Replace tool. This method is easier than the first one.

这篇关于去除机器人:preFIX每个属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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