onActivityCreated is deprecated, below is the code I have written, what could be the alternative method and how can I rewrite the code below
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState){
super.onActivityCreated(savedInstanceState);
ListView homeListView = (ListView) getActivity().findViewById(R.id.home_list);
homeListView.setAdapter(new BaseAdapter() {
@Override
public int getCount() {
return 3;
}
@Override
public Object getItem(int i) {
return null;
}
@Override
public long getItemId(int i) {
return 0;
}
@Override
public View getView(int i, View view, ViewGroup viewGroup) {
return LayoutInflater.from(getActivity()).inflate(R.layout.list_item_home, null);
}
});
}