Beispiel #1
0
 /** Prepares manager to work */
 public void prepare(ActivityMain fragmentActivity, int editorContainer) {
   parentActivity = fragmentActivity;
   this.editorContainer =
       (ViewGroup)
           ((parentActivity == null) ? null : parentActivity.findViewById(editorContainer));
   if (isReady()) {
     initEditors();
     parentActivity
         .getSupportFragmentManager()
         .beginTransaction()
         .add(editorContainer, new Fragment())
         .commit();
     this.editorContainer.setVisibility(View.GONE);
   }
 }
Beispiel #2
0
 private void initEditors() {
   editors = new UnitEditor[] {new PlankEditor(), new BindingEditor(), new ForceEditor()};
   for (UnitEditor editor : editors) {
     editor.createView(parentActivity.getLayoutInflater(), editorContainer);
   }
 }