I need to initialize View and Canvas for the project I'm working on, but after an hour or so or searching, I can't figure out what to make them equal to.
Here is the code I have so far:
public class DisplayMap extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
try {
displayMap();
} catch (IOException e) {
e.printStackTrace();
} catch (SlickException e) {
e.printStackTrace();
}
}
public void displayMap() throws IOException, SlickException {
loadWorld("assets/World.tmx");
}
public void loadWorld(String path) throws IOException {
View view = ?????;
Canvas canvas = ?????;
//World loading goes here
}
}
So, can anybody please suggest me how to initialize View and Canvas? Or am I going about this in the completely wrong way?