Android Open Source - HRForecast-WFM Horizontal Bar Chart Fragment

From Project

Back to project page HRForecast-WFM.


The source code is released under:

Copyright 2014 Ahmed Shafei

If you think the Android project HRForecast-WFM listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package de.hrf.workforcemanagement;
/* ww  w  .j av  a  2 s. c  o m*/
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import de.hrf.workforcemanagement.models.Chart;

 * {@link Fragment} responsible for showing the details of the selected chart
 * type. It receives a call whenever new chart type is selected
public class HorizontalBarChartFragment extends Fragment {

  private Chart chart;
  private ProgressDialog loadingDialog;

  // TODO Create global Variable for the Chart view

  public HorizontalBarChartFragment(Chart chart) {
    this.chart = chart;

  public void onCreate(Bundle savedInstanceState) {

  public View onCreateView(LayoutInflater inflater, ViewGroup container,
      Bundle savedInstanceState) {
     * Edit this to inflate the corresponding layout of this fragment chart
     * type
    View rootView = inflater.inflate(R.layout.horizontal_bar_chart_fragment,
        container, false);
    // TODO Assign the chart view global variable using the findViewById

    // TODO Show ProgressBar
    // Show loadingDialog
    new Thread(new Runnable() {
      public void run() {
    return rootView;

  private void populateGraph() {
    // TODO Populate fragment using the chart and chartView

    this.getActivity().runOnUiThread(new Runnable() {
      public void run() {
        // TODO Dismiss the progress Dialog
        // TODO Show the ChartView

Java Source Code List