あなたが元気であることを願っています&あなたの仕事おめでとうございます!シナリオ:Pagegauchefragment、PageMilieufragment、PageDroiteFragmentの3つのフラグメントファイルがあり、2つのファイルFragmentsSliderActivityとMyPagerAdapterによって管理されています。1つ目と2つ目は、ユーザーが入力したEditTextを含むデータフィールドです。最後の1つは、データユーザーファイルが保存されるListViewです。リストビュー(最後のフラグメント)から、ユーザーは3つの可能性でファイルをクリックします:1。ファイルのインポート/2。ファイルの削除/3。キャンセル(アクションバープロセスを使用してデータを保存します)。ここで問題:データを(setTextを使用して)更新するために他のフラグメントに渡すことができません。ログ:タグ:IIputConnectionWrapper /テキスト:非アクティブなInputConnectionではgetSelectedText、非アクティブなInputConnectionではsetComposedText。
View W =inflater.inflate(R.layout.page_droite_layout,container, false);
this.mListView = (ListView) W.findViewById(R.id.ListView01);
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this.getActivity(), android.R.layout.simple_list_item_1, tabRevues);
this.mListView.setAdapter(adapter);
this.mListView.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
View WW =inflater.inflate(R.layout.page_gauche_layout,container, false);
file_name = (EditText) WW.findViewById(R.id.label_LiquidBase);
//int item = position;
item_name = ((TextView)view).getText().toString();
AlertDialog.Builder ad = new AlertDialog.Builder(getActivity());
ad.setTitle("Selection Recettes : " + item_name);
ad.setMessage("Que souhaitez-vous faire ?");
ad.setPositiveButton("Importer",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
try {
ここで、テキストをsetTextに渡します(たとえば):
file_name.setText("blahblah");
私はVoidメソッドを使用していると思いますが、変数を渡す方法がわかりません...どんな助けでも大歓迎です!クリストファー