Posted on 16 Aug 2022, this text provides information on Syllabus Queries related to Course Queries. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Everytime I go to some other fragment of my app Oncreate is called again and list duplicates itself. I'm a newbee to android soo it would be great to have some detailed solutions.
This is my Java code for the fragment:
publicclassFragment_noticeextendsFragment{privatestaticfinalString TAG =MainActivity2.class.getSimpleName();privatestaticfinalString STATE_NOTICE ="state_notice";privateListView listView;privateJSONObject jobj;privateNoticeAdapter listAdapter;int count=0;ArrayList<NoticeItem> originalValues =newArrayList<NoticeItem>();privateList<NoticeItem> feedItems;privateString URL_FEED ="http://calinfo.in/tiya/notice2.php";@Nullable@SuppressLint("NewApi")@OverridepublicView onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){View v=inflater.inflate(R.layout.noticereal_layout,container,false);
listView =(ListView) v.findViewById(R.id.listnotice);if(savedInstanceState !=null){
feedItems=savedInstanceState.getParcelableArrayList(STATE_NOTICE);
listAdapter =newNoticeAdapter(getActivity(), feedItems);
listView.setAdapter(listAdapter);}else{
feedItems =newArrayList<NoticeItem>();
listAdapter =newNoticeAdapter(getActivity(), feedItems);
listView.setAdapter(listAdapter);// We first check for cached requestConnectionDetector cd =newConnectionDetector(getActivity());Boolean isInternetPresent = cd.isConnectingToInternet();Cache cache =AppController.getInstance().getRequestQueue().getCache();Cache.Entryentry= cache.get(URL_FEED);if(!isInternetPresent){AlertDialog showAlertDialog;
showAlertDialog(getActivity(),"No Internet Connection","You don't have internet connection.",false);
No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that
you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice
sessions to improve your knowledge and scores.
manpreet
Best Answer
2 years ago
Everytime I go to some other fragment of my app Oncreate is called again and list duplicates itself. I'm a newbee to android soo it would be great to have some detailed solutions.
This is my Java code for the fragment: