0

I am trying to get two progress bars with different labels in a horizontal field manager but only one is showing up. I can update it and change the progress but cannot see the second one.

    // Internal Storage Label and Progress Bar
    ProgressIndicatorView isView = new ProgressIndicatorView(0);
    ProgressIndicatorController isController = new ProgressIndicatorController();  

    _isProgressBar = new ProgressIndicatorModel(0, 100, 0);      
    _isProgressBar.setController(isController);     

    isView.setModel(_isProgressBar);
    isView.setController(isController);        
    isController.setModel(_isProgressBar);
    isController.setView(isView);        
    isView.setLabel("Internal Storage");
    isView.createProgressBar(Field.FIELD_HCENTER);       

    // SDCard Storage Label and Progress Bar
    ProgressIndicatorView sdView = new ProgressIndicatorView(0);
    ProgressIndicatorController sdController = new ProgressIndicatorController();        

    _sdProgressBar = new ProgressIndicatorModel(0, 100, 0);
    _sdProgressBar.setController(sdController);      

    sdView.setModel(_sdProgressBar);
    sdView.setController(sdController);        
    sdController.setModel(_sdProgressBar);
    sdController.setView(sdView);        
    sdView.setLabel("SDCard Storage");
    sdView.createProgressBar(Field.FIELD_HCENTER);       

    //Add everything to the view 
    //Add the manager to the screen.
    add(horizontalFieldManager);

    //Add the fields to the manager.
    horizontalFieldManager.add(isView);
    horizontalFieldManager.add(new SeparatorField());    
    horizontalFieldManager.add(sdView);
Nate
  • 31,017
  • 13
  • 83
  • 207
  • instead of `horizontalFieldManager` use `verticalFieldManger` as i can see that you add a new SeperatorField, it only show up in Vertical view tho ? – Alamri Feb 20 '13 at 19:16
  • `sdView` has probably been pushed off the right side of your screen. I don't see where you are specifying the **width** of `isView` and `sdView`. You will need to do that somehow if you want to make sure both of them fit on the same horizontal *row*. – Nate Feb 21 '13 at 08:45

0 Answers0