Hello,IcreatedalistofquestionswithinaListView,Icreatedalltheprogrammingquestions,I'mnotdoinganycomponentinthelayout.xml,itjusthasaframeLayout,butthemomentIclickonedittextitdoesnotletmetype,Iclickandthekeyboardcellphonepopsupanddisappearsquickly,doesanyoneknowwhatitcanbe?Andhowtosolve?
Followtheeditextcreationcode:
publicLinearLayoutcreateEditText(Stringquestion,intline,EditTexteditText){LinearLayoutlinearLayout=newLinearLayout(context);linearLayout.setOrientation(LinearLayout.VERTICAL);ViewGroup.LayoutParamslpView=newViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.WRAP_CONTENT);ViewGroup.LayoutParamslpViewEdit=newViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.WRAP_CONTENT);TextViewtv=newTextView(context);tv.setTextColor(Color.BLACK);tv.setText(question);tv.setLayoutParams(lpView);linearLayout.addView(tv);editText=newEditText(context);editText.setEnabled(true);editText.setInputType(InputType.TYPE_CLASS_TEXT);editText.setFocusable(true);editText.setMaxLines(10);editText.setEms(2);editText.setLayoutParams(lpViewEdit);linearLayout.addView(editText);returnlinearLayout;}
HereisthecodewhereI'mcallingthiscreationmethod:
editText=newEditText(context);frameLayout.addView(createEditText(id+"." + listaPergunta.get(position).getTxtPergunta(), lines, editText));