@@ -0,0 +1,2598 @@
+package com.sometrik.framework;%0D%0A%0D%0Aimport java.util.ArrayList;%0D%0A%0D%0Aimport android.content.Context;%0D%0Aimport android.view.View;%0D%0Aimport android.view.ViewGroup;%0D%0Aimport android.widget.Button;%0D%0Aimport android.widget.EditText;%0D%0Aimport android.widget.LinearLayout;%0D%0Aimport android.widget.TextView;%0D%0A%0D%0Apublic class FormView %7B%0D%0A%0D%0A  private LinearLayout baseLayout;%0D%0A  private Context context;%0D%0A  private ArrayList%3CViewGroup%3E elementList;%0D%0A  private ArrayList%3CButton%3E buttonList;%0D%0A  private ArrayList%3CEditText%3E editTextList;%0D%0A  private ArrayList%3CTextView%3E textViewList;%0D%0A  %0D%0A  public FormView(Context context) %7B%0D%0A    this.context = context;%0D%0A    baseLayout = new LinearLayout(context);%0D%0A    baseLayout.setOrientation(0);%0D%0A    baseLayout.setId(0);%0D%0A  %7D%0D%0A  %0D%0A  //1 = vertical, 0 = horizontal%0D%0A  public void changeBaseLayoutOrientation(int orientation)%7B%0D%0A    baseLayout.setOrientation(orientation);%0D%0A  %7D%0D%0A  %0D%0A  %0D%0A  public void createButton(int id)%7B%0D%0A    Button button = new Button(context);%0D%0A    button.setId(id);%0D%0A    buttonList.add(button);%0D%0A  %7D%0D%0A  %0D%0A  public void createLayout(int id, int targetId, int orientation)%7B%0D%0A    LinearLayout linearLayout = new LinearLayout(context);%0D%0A    linearLayout.setOrientation(orientation);%0D%0A    elementList.add(linearLayout);%0D%0A    getElementById(targetId).addView(linearLayout);%0D%0A  %7D%0D%0A  %0D%0A  public void createEditText(int id, int targetId)%7B%0D%0A    EditText editText = new EditText(context);%0D%0A    editText.setId(id);%0D%0A    editTextList.add(editText);%0D%0A    getElementById(targetId).addView(editText);%0D%0A  %7D%0D%0A  %0D%0A  public void createTextView(int id, int targetId)%7B%0D%0A    TextView textView = new TextView(context);%0D%0A    textView.setId(id);%0D%0A    textViewList.add(textView);%0D%0A    getElementById(targetId).addView(textView);%0D%0A  %7D%0D%0A  %0D%0A  public void setButtonText(int id, String text)%7B%0D%0A    for (Button button : buttonList)%7B%0D%0A      if (button.getId() == id)%7B%0D%0A%09button.setText(text);%0D%0A      %7D%0D%0A    %7D%0D%0A  %7D%0D%0A  %0D%0A  public void setEditTextText(int id, String text)%7B%0D%0A    for (EditText editText : editTextList)%7B%0D%0A      if (editText.getId() == id)%7B%0D%0A%09editText.setText(text);%0D%0A      %7D%0D%0A    %7D%0D%0A  %7D%0D%0A  %0D%0A  public void setTextViewText(int id, String text)%7B%0D%0A    for (TextView textView : textViewList)%7B%0D%0A      if (textView.getId() == id)%7B%0D%0A%09textView.setText(text);%0D%0A      %7D%0D%0A    %7D%0D%0A  %7D%0D%0A  %0D%0A  public void showView()%7B%0D%0A    FrameWork frame = (FrameWork)context;%0D%0A    frame.setContentView(baseLayout);%0D%0A  %7D%0D%0A  %0D%0A  private ViewGroup getElementById(int id)%7B%0D%0A    for (ViewGroup element : elementList)%7B%0D%0A      if (element.getId() == id)%7B%0D%0A%09return element;%0D%0A      %7D%0D%0A    %7D%0D%0A    return baseLayout;%0D%0A  %7D%0D%0A%7D%0D%0A

Add FormView