0
When adding both components in layout XML I get the following error in the Viewpager starting line:
error: Error parsing XML: unbound prefix
Layout:
<?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/br.com.pixells.simuladorbr"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<android.support.v7.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toolbarListaJogos"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#DC143C"
app:subtitle="Teste"
app:theme="@style/Theme.Abar.Widget"
app:title="ToolBar" />
<android.support.v4.view.ViewPager
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<!--
This title strip will display the currently visible page title, as well as the page
titles for adjacent pages.
-->
<android.support.v4.view.PagerTitleStrip
android:id="@+id/pager_title_strip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:background="#33b5e5"
android:paddingBottom="4dp"
android:paddingTop="4dp"
android:textColor="#fff" />
</android.support.v4.view.ViewPager>
</LinearLayout>
Did not fail to add the schema of
tools
(xmlns:tools="http://schemas.android.com/tools"
)?– Wakim
It worked, because I need to add this line?
– caezar
Why you need to add the reference to the namespace schema
tools
so the parser can interpret these tags.– Wakim