use of com.ushahidi.android.app.views.ViewReportView in project Ushahidi_Android by ushahidi.
the class ViewReportFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// Inflate the layout containing a title and body text.
ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.view_report, container, false);
mView = new ViewReportView(rootView, getActivity());
mReports = new ListReportModel();
mView.mMapView.onCreate(savedInstanceState);
if (mCategoryId > 0) {
mReports.loadReportByCategory(mCategoryId);
} else {
mReports.load();
}
// Get GoogleMap from MapView
mMap = mView.mMapView.getMap();
try {
MapsInitializer.initialize(getActivity());
} catch (GooglePlayServicesNotAvailableException e) {
e.printStackTrace();
}
// Initialize views with report data. This also handles map
// initialization
initReport(mPageNumber);
fetchComments();
// Set the title view to show the page number.
mView.setPageIndicator(getString(R.string.title_template_step, mPageNumber + 1, mReports.getReports().size()));
return rootView;
}
Aggregations