I am trying to implement a fragment layout. I have an activity that servers as a SplashScreen & fetches some data from the web and creates an ArrayList of my custom objects.
Normally If I were using a ListView I would just do the following.
private ArrayList<Articles> articles;
private void isComplete() {
Intent intent = new Intent(SplashScreen.this, ListActivity.class);
intent.putExtra("data", articles);
startActivity(intent);
finish();
}
How can I do pass the same data to a Fragment? Your help I much appreciated.
Its simple take Global class
And
declare public static ArrayList<Articles> articles = new ArrayList<Articles>;In main Activity
Global.articles = articles;Now u can use any where in Project.