1

On github there is a library for tab menu, which I tried to add to my project (https://github.com/michaldrabik/TapBarMenu). The library is used by including in xml file new object:

 <com.michaldrabik.tapbarmenulib.TapBarMenu android:id="@+id/tapBarMenu" android:layout_width="match_parent" android:layout_height="56dp" android:layout_gravity="center_horizontal|bottom" app:tbm_backgroundColor = "@color/colorPrimaryDark" app:tbm_menuAnchor = "top" app:tbm_buttonPosition = "left" android:layout_margin="10dp"> 

It worked. Later I tried to add more flexibility and also added class TapBarMenu from library and added:

 <TapBarMenu android:id="@+id/tapBarMenu02" android:layout_width="match_parent" android:layout_height="56dp" android:layout_gravity="center_horizontal|bottom" android:tbm_backgroundColor = "@color/colorPrimaryDark" app:tbm_menuAnchor = "top" app:tbm_buttonPosition = "left" android:layout_margin="10dp"> 

However for second inclusion Android Studio says: "unexpected namespace prefix" for app, whereas in the beginning of xml

xmlns:app="http://schemas.android.com/apk/res-auto" 

I've read Android doc NamespaceContext, but it's rather short. Please tell how to use local class in xml and point to good place to read about namespaces for Android.

1
  • where is TapBarMenu class Commented Dec 31, 2015 at 5:56

1 Answer 1

1

if you put it in a package with the name com.example.myapp then you need to reference it with <com.example.myapp.TapBarMenu

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.