在XML文件中未知的感叹符号 [英] unknown exclamatory symbol in the xml file
问题描述
获取已知的感叹错误的XML文件中的图像来看,当我尝试设置机器人:背景产生连锁反应。属性
Getting known exclamatory error in xml file Image view, when i try to set a ripple effect in "android:background" attribute.
我评论在那里我得到这个错误就行了。
I commented the line where i get this error.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tabContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="15dp"
>
<ImageView
android:id="@+id/tabImage"
android:layout_width="match_parent"
android:background="@drawable/tab_bg" <!-- Line where I get error-->
android:layout_height="wrap_content"
android:layout_gravity="center" />
<TextView
android:id="@+id/tabText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="bottom|center" />
</LinearLayout>
如果我点击了感叹它引导到下面的文件。
If I click that exclamatory it directs to the following file.
V22 / tab_bg.xml
v22/tab_bg.xml
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:attr/colorControlHighlight">
<item android:id="@+id/mask"
android:drawable="@android:color/white"/>
</ripple>
应用程序被运行完美,但我没能获得这一连锁反应。
The application is running perfectly, but i am not able to get this ripple effect.
注:我使用的是Android 1.4工作室
Note: I am using Android Studio 1.4
推荐答案
别担心,它是新的Android Studio的1.4,它的出现具有因那里,通常情况下,会出现一个小图标显示的图像的绘制对象,但如果你有使用可拉伸的XML(不是图像)时,IDE不能表现出一点preVIEW但是,不用担心该错误,因为这是不是一个错误
=)
Don't worry, it's for the new Android Studio 1.4, it's appear becasuse there, normally, appear a little icon showing the image from Drawable but if you are using a drawable xml (not being an image), the IDE cannot show a little preview but, don't worry for that error because It's not an error
=)
如果你不能得到的连锁反应,也许这是另一个问题,那么你需要做的另外一个问题了点。
If you can't get the ripple effect maybe it's for another issue then you need to do another question for that.
这篇关于在XML文件中未知的感叹符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!