ユーザーがイベントを作成するアプリケーションがあります。ユーザーは、名前リストのListViewであるアクティビティから特定の名前を取得する必要があります。
別のアクティビティ(カレンダーアクティビティ)にリンクしている日付ボタンをクリックした後、名前がアクティビティに残っていることを確認してから、現在のアクティビティに戻ることに問題があります。
3ページの私のコード:
Create_Events.java-ListViewアクティビティから特定の名前を取得するためのコードとbtnDate onClickListener、別のアクティビティ(カレンダーアクティビティ)にリンクするコード
Bundle bundle = getIntent().getExtras();  
        if(bundle != null)
        {
            String date = bundle.getString("date");
            txtDate.setText(date);  
        }
        Bundle b = getIntent().getExtras();
        if(b != null)
        {
            String name = bundle.getString("name");
            txtName.setText("Create an event for:" +name);
        }
buttonDate = (Button) findViewById(R.id.btnDate);
        buttonDate.setOnClickListener(new View.OnClickListener()
        {
            @Override
            public void onClick(View v)
            {
                Intent calIntent = new Intent(Create_Events.this, Calendar_Event.class);
                startActivity(calIntent);
            }
        });
ContactsList.java --  the ListView of the names which is passed to the Create_Events page.
    Cursor cursor = null;
               cursor = (Cursor) l.getItemAtPosition(position);
               Intent intent = new Intent(ContactsList.this, Create_Events.class);
               intent.putExtra("name", cursor.getString(cursor.getColumnIndex(buddyDB.KEY_NAME)));
               startActivity(intent);
これについて助けが必要です。
提供された助けは大歓迎です。前もって感謝します!=)