Give user the permission to add new items in the listview from basic screen
<p>So i have created an app that at its basicsceen when it starts contains 2 buttons, Play and instuctions. When u press play it shows a listview that contains an amount of stories. I used a  custom adapter to have my own style on the listview.</p>

<p>Now i would like to have a new button at the basic screen along with play,istuctions and when u press it, it will pop a new actvity with 3 fields that the user will have to fill. Those will be the title of the story,the content and the difficulty level that he wants to add.</p>

<p>So the basic question is. Is it possible to add a new story to the list with the data that user gave me?<br>
I have searched the internet but couldnt fine something usefull(from what i am reading what i am trying to do is not possible and a bad practice)...</p>

<p>Thanks a lot in advance and i apologize for any mistakes i have made (still new to android and to StackOverflow). Thanks again.</p>

<p>Here is the current code of my classes.</p>

<p>StoriesListed.java class</p>

<pre><code>public class StoriesListed_Activity extends Activity {



private ArrayList&lt;Story&gt; myStories=new ArrayList&lt;Story&gt;();


private void populateStoryList() {           

    StoriesLab stories=new StoriesLab();
    stories.setMyStories();



    myStories=stories.updateMyStories();



}

private void populateListView(){
    final ArrayAdapter&lt;Story&gt; myadapter=new MylistAdapter();
    ListView list=(ListView)findViewById(R.id.listview_layout);
    list.setAdapter(myadapter);

    list.setOnItemClickListener(new AdapterView.OnItemClickListener() {

        @Override
        public void onItemClick(AdapterView&lt;?&gt; parent, View view, int         position, long id) {


                Intent intent = new Intent(StoriesListed_Activity.this,      Storyone.class);

                intent.putExtra("key", myStories);
                intent.putExtra("secondkey",position);

                startActivity(intent);


        }
    });

}

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.storiesview_layout);



    populateStoryList();

    populateListView();


}

private class MylistAdapter extends ArrayAdapter&lt;Story&gt;{
        public MylistAdapter(){
            super(StoriesListed_Activity.this,R.layout.storiesview_layout,myStories);
        }


    @Override
    public  View getView(int position, View convertView, ViewGroup parent){
        View v=convertView;



        if(v==null){

            v=getLayoutInflater().inflate(R.layout.customizedstoriesview,parent,false);

            CheckBox checkbox_holder=(CheckBox)v.findViewById(R.id.checkBox);

        }



        //find the story to work with

        Story currentstory = myStories.get(position);

        //fill the view

        Typeface typeface=Typeface.createFromAsset(getAssets(),"horror.ttf");
        TextView mytextview=(TextView)v.findViewById(R.id.TitleView) ;
        mytextview.setTypeface(typeface);



        TextView Titletext=(TextView) v.findViewById(R.id.TitleView);     //SETTING THE TEXT OF THE TITLE
        Titletext.setText(currentstory.getName());

        RatingBar myratingbar=(RatingBar) v.findViewById(R.id.ratingBar); //setting the Stars ratio for the difficulty
        myratingbar.setRating(currentstory.getRatingbar());

        return v;
    }
}
</code></pre>

<p>}</p>

<p>Story class</p>

<pre><code>public class Story implements Serializable {
private String name;
private String storycontent;
private int ratingbarratio;


public Story(String name,int ratingbarratio,String storycontent){
    super();
    this.name=name;
    this.storycontent=storycontent;
    this.ratingbarratio=ratingbarratio;

}

public String getName(){
return name;
}

public int getRatingbar(){
    return ratingbarratio;
}
public String getStorycontent(){
    return storycontent;
}

}
</code></pre>

<p>where i store the displayed stories. Mt storieslab class</p>

<pre><code>public class StoriesLab{
private ArrayList&lt;Story&gt; myStories;


public StoriesLab(){
    myStories=new ArrayList&lt;Story&gt;();


}

public void setMyStories() {
    myStories.add(new Story("aaaaaaaaaaa"));
    myStories.add(new Story("bbbbbbbbbbbbbbb"));
    myStories.add(new Story("Sherlock Holmes is not the only one",3,"cccccccccccccccccccccccccccccccccccc"));
    myStories.add(new Story("o xsulinos stratioths",1,"ddddddddddddddddddddddddddddddddddddddd"));
    myStories.add(new Story("random name",3,""));
    myStories.add(new Story("random name",2,""));
    myStories.add(new Story("random name",3,""));
    myStories.add(new Story("random name",1,""));
    myStories.add(new Story("random name",3,""));
    myStories.add(new Story("random name",2,""));
    myStories.add(new Story("random name",3,""));
    myStories.add(new Story("random name",1,""));



}

 public void addnewstory(Story object){
 myStories.add(object);
}

public ArrayList&lt;Story&gt; updateMyStories(){
    return myStories;
}
}
</code></pre>