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; //from w w w . ja va 2s. c o m import java.util.ArrayList; import java.util.List; import android.content.Context; import android.os.Bundle; import android.support.v4.app.Fragment; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ListView; import android.widget.Toast; import at.theengine.android.simple_rss2_android.RSSItem; import at.theengine.android.simple_rss2_android.SimpleRss2Parser; import at.theengine.android.simple_rss2_android.SimpleRss2ParserCallback; public class RainfallFragment extends Fragment { private Context mContext; private ListView mListView; private MainActivity mActvitiy; public RainfallFragment() {} @Override public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_rainfall, 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<RainData> rainItems = loader.getRainItems(); if(rainItems != null){ mListView.setAdapter(new RainListAdapter(mContext, R.layout.listitem_rainfall, rainItems)); } } } }