Code example for EditText

Methods: setText

0
        } 
    }; 
 
    public static final ViewFactory TEXT_FIELD_FACTORY = new ViewFactory() {
        public View create(String name, int size) { 
            EditText result = new EditText(CONTEXT); 
            result.setText(name); 
            return result; 
        } 
    }; 
 
    public static final ViewFactory[] FACTORIES =
                            {BUTTON_FACTORY, LABEL_FACTORY, TEXT_FIELD_FACTORY};
 
    public static ViewGroup create(Context context1) {
        CONTEXT = context1;
        GridLayout container = new GridLayout(context1);
        container.setUseDefaultMargins(true);
 
        for (int i = 0; i < VERTICAL_ALIGNMENTS.length; i++) {
            Alignment va = VERTICAL_ALIGNMENTS[i];