I have a GraphicsView
class that extends from the View
class and I want to add this GraphicsView
class to the main layout in my projec
Because your custom View
is an inner class in your Activity
the java compiler will output the name ActivityName$GraphicsView
for that class. You can't use that name directly as the View
name in the xml layout because of the $
character but you can do it like this:
where ActivityName
is the name of the activity where your GraphicsView
class is declared.