public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
CoverFlow coverFlow = new CoverFlow(this);
setContentView(coverFlow);
}
This is my code, but now I want to place a layout in that same file.
Any suggestions please…….
You can use a custom view in an XML file by simply using its fully qualified name as the root element tag. If
CoverFlowwas in packagecom.example, you would code it something like this:Then, if the above were in the file
res/layout/main.xml, you would use it by calling: