Hi.
I have tabbed activity, i have 10 fragment in my project and i added "Add Button" button to fragment 1.When i clicked this button, new button has created in linear layout.İts ok, but i have a problem after this.for example, if i go to different tab, my button will be erased.Why this is happening? How can i solve this problem?
Thanks :)
My "Add Button" code ;
public void AddButton(View page){
LinearLayout Lay = (LinearLayout) findViewById(R.id.mylayout);
Button but = new Button(getApplicationContext());
but.setText("" + myVec2.size());
myVec2.add(but);
mylayout.addView(but);
}