Hey all,
I am working on something that requries a little different approach than usuall --at least different than what I was able to find on the net.
I have a class which extends View and which has its own.xml file, I don't have the exact code with me but it's something like this
viewxml.xml
the class itself, is something like the following:
namespace com.example.helloandroid
all in the above goes well, however, I would like to draw on the view element defined in the xml file as view1, the view that I get reference to when using inflate method represent the entire viewxml.xml file.
is there a way i can do that ?? maybe by simply calling findViewById ??
any help would be appreciated.
Thank you
I am working on something that requries a little different approach than usuall --at least different than what I was able to find on the net.
I have a class which extends View and which has its own.xml file, I don't have the exact code with me but it's something like this
viewxml.xml
Code:
tablelayout
tablerow
<view id="view1" />
the class itself, is something like the following:
namespace com.example.helloandroid
Code:
class viewClass extends View
{
public viewClass()
{
LayoutInflater li = (LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View theview = li.inflate(R.layout.viewxml, this);
}
public void onDraw(Canvas canvas)
{
}
}
all in the above goes well, however, I would like to draw on the view element defined in the xml file as view1, the view that I get reference to when using inflate method represent the entire viewxml.xml file.
is there a way i can do that ?? maybe by simply calling findViewById ??
any help would be appreciated.
Thank you