皆さんこんにちは。
文字列の内容が null かどうかを確認する必要があります。文字列が != null の場合、imageButton で performClick を作成します。このクリックにより、別のレイアウトでレイアウトがインフレートされます。次に、膨張した editText にテキストを書き込む必要がありますが、できません。インフレーションを実行し、同時にインフレーションされた editText にテキストを書き込むことはできません。
これが私のコードです
if(sApelido != ""){
inflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
b = (LinearLayout)inflater.inflate(R.layout.socio_form_structured_name,null);
lLayout = (LinearLayout)findViewById(R.id.main_layout_id7);
lLayout = (LinearLayout)findViewById(R.layout.socio_form_structured_name);
lLayout.addView(b);
apelido.setText(null); //Write in one of the editText's that was inflated
apelido.setText(sApelido); //apelido is a editText that belongs to LinearLayout b
}
あなたが私の質問を理解しているかどうかわかりません。助けてくれてありがとう。