public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
   // TODO Auto-generated method stub
    Bundle programNum = getIntent().getExtras();
    final int progNum = programNum.getInt("Program");
    Intent intent = new Intent(getBaseContext(), hotelAct3.class);
    String hotelName = (String) ((TextView)parent.getChildAt(position)).getText();
    startActivity(intent);
}
リストアクティビティを呼び出すアクティビティから取得する必要があります。その中にアクティビティ「hotelAct2.class」があるように、追加のデータを入れます
public class hotelAct2 extends Activity {
EgyptDataSource datasource;
MySQLiteHelper sqlHelper;
ArrayAdapter<Hotel> hotelAdapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.hotelq2);
    Bundle programNum = getIntent().getExtras();
    final int progNum = programNum.getInt("Program");
    final String Srating = programNum.getString("Stars");
    //Intent ratingIntent = getIntent();
    //String Srating = ratingIntent.getStringExtra("Stars");
    Toast.makeText(hotelAct2.this, "The program is " + progNum + " The rating is " + Srating, Toast.LENGTH_LONG).show();
    RadioButton nileRB = (RadioButton) findViewById(R.id.hRB2a);
    RadioButton pyramidsRB = (RadioButton) findViewById(R.id.hRB2b);
    RadioButton downtownRB = (RadioButton) findViewById(R.id.hRB2c);
    RadioButton letmeRB = (RadioButton) findViewById(R.id.hRB2d);
    if(Srating.equals("Five"))
    {
    nileRB.setOnClickListener(new OnClickListener(){
        public void onClick(View v) {
            // TODO Auto-generated method stub
            Intent i = new Intent(hotelAct2.this, CairoHotelList.class);
            i.putExtra("RB", "nile5");
            i.putExtra("program", progNum);
            startActivity(i);
        }});
次に、「CairoHotelList.class」であるアクティビティ リストを開始します。アクティビティ クラスの onItemClickListener で追加のデータを取得したい
「progNum」は 0 を返しますが、1 から 20 までの数値を返す必要があります。