-1
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/uibackground"
    android:gravity="center"
    android:orientation="vertical"
    android:padding="5dp"
    tools:context=".MainActivity">


    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="60dp"
        android:orientation="horizontal">

        <Button
            android:id="@+id/previousButton"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:background="@drawable/buttonstyles"
            android:text="<"
            android:textSize="40dp"
            android:textStyle="bold" />

        <TextSwitcher
            android:id="@+id/textSwitcher"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="2"
            android:background="@drawable/buttonstyles"
            android:inAnimation="@android:anim/slide_in_left"
            android:outAnimation="@android:anim/slide_out_right" />

        <Button
            android:id="@+id/nextButton"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:background="@drawable/buttonstyles"
            android:text=">"
            android:textSize="40dp"
            android:textStyle="bold" />
    </LinearLayout>


</LinearLayout>

when i run app i get this error: activity_main.xml:25: AAPT: error: not well-formed (invalid token).

i checked 25th line but, i couldn't see a problem. maybe it's because of '<' sign but i don't know. is there an alternative method to write this sign?

ibrahim
  • 5
  • 5

1 Answers1

0

Replace "<" with "&lt;" it should work

Here are more symbols to work with: https://www.w3.org/TR/html4/sgml/entities.html

Maksym V.
  • 2,877
  • 17
  • 27