How can I add a View in my Activity from a instantiated object?
I have this class:
   public class Object {
       public Object (Context context) {
         this.context = context
       }
       public void my_method() {
          //Add something in my view
       }
    }
and my mainactivity:
protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
                Object obj = new Object(this);
//when i call this method \/ i wanted to add anything in my view 
                obj.my_method();
} 
How can i do this?
 
     
     
    