Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unknown exclamatory symbol in the xml file

Getting unknown 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

<?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.

Note: I am using Android Studio 1.4

like image 415
Ramz Avatar asked Oct 09 '15 07:10

Ramz


People also ask

What does exclamation mark mean in code?

Some programming and scripting languages also use exclamation points to indicate warnings and errors, as well as a method to identify a non-executable line of the code/statement. In UNIX scripting, the exclamation point is used for telling the operating system which application to use for running the script.

What is the exclamation mark used for in Javascript?

In Javascript, the exclamation mark (“!”) symbol, called a “bang,” is the logical “not” operator. Placed in front of a boolean value it will reverse the value, returning the opposite. ! true; // Returns false.

What does 3 exclamation marks mean in Javascript?

So the third use (!! x) turns the "falsey" value into a true boolean. ... with that in mind, the third exclamation point makes a TRUE negation of the original value (a negation of the "true boolean" value).


1 Answers

Don't worry, it's for the new Android Studio 1.4, it's appear because 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.

like image 65
Aspicas Avatar answered Oct 16 '22 12:10

Aspicas