-
Notifications
You must be signed in to change notification settings - Fork 1
/
HotelActivity.java
38 lines (33 loc) · 1.22 KB
/
HotelActivity.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.tudaidai.tuantrip;
import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;
public class HotelActivity extends TabActivity {
static final boolean DEBUG = TuanTripSettings.DEBUG;
static final String TAG = "HotelActivity";
private void ensureUi() {
TabHost localTabHost = getTabHost();
localTabHost.addTab(localTabHost
.newTabSpec("searchhotel")
.setIndicator("酒店预订",
getResources().getDrawable(R.drawable.ticket_press))
.setContent(new Intent(this, SearchHotelActivity.class)));
Intent intent = new Intent(this, NearbyActivity.class);
intent.putExtra(NearbyActivity.EXTRA_OPTION, NearbyActivity.HOTEL);
localTabHost.addTab(localTabHost
.newTabSpec("nearbyhotel")
.setIndicator("周边酒店",
getResources().getDrawable(R.drawable.order))
.setContent(intent));
localTabHost.addTab(localTabHost
.newTabSpec("historyhotel")
.setIndicator("历史酒店",
getResources().getDrawable(R.drawable.lishihangxian))
.setContent(new Intent(this, HistoryHotelsActivity.class)));
}
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
ensureUi();
}
}