I have created a custom view named Graphview . Here is the structure for the GraphView class.
Graphview
public class GraphView extends View { public
You can set height and width like this:
myGraphView.setLayoutParams(new LayoutParams(width, height));