Back to project page AQUArinthia.
The source code is released under:
GNU General Public License
If you think the Android project AQUArinthia listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package at.theengine.android.aquarinthhia; /*w ww . j a v a 2s .c o m*/ import java.util.ArrayList; import android.content.Context; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ListView; public class LakesFragment extends Fragment { private Context mContext; private ListView mListView; private MainActivity mActvitiy; public LakesFragment() {} @Override public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_lakes, container, false); mContext = getActivity(); mListView = (ListView) rootView; mActvitiy = (MainActivity) getActivity(); loadData(); return rootView; } public void loadData(){ if(mActvitiy == null) { mActvitiy = (MainActivity) getActivity(); } DataLoader loader = mActvitiy.getDataLoader(); if(loader != null){ ArrayList<LakeData> lakeItems = loader.getLakeItems(); if(lakeItems != null){ mListView.setAdapter(new LakeListAdapter(mContext, R.layout.listitem_lakes, lakeItems)); } } } }