android editText is not prints my input given to it

Use this i think it may be work…

LinearLayout.LayoutParams param = new LinearLayout.LayoutParams
                       (LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT, 1f);

OR try this….

public View getView(int i, View view, ViewGroup viewGroup) {
           LinearLayout linearLayout;
           linearLayout = new LinearLayout(context);
         LinearLayout.LayoutParams param = new LinearLayout.LayoutParams
                   (LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT, 1f);

            linearLayout.setOrientation(LinearLayout.VERTICAL);
            EditText editText = new EditText(context);
            editText.setMinLines(1);
            editText.setLayoutParams(params);

            linearLayout.addView(editText);
            return linearLayout;
    }

Leave a Comment