-
Notifications
You must be signed in to change notification settings - Fork 1
/
TicketDetailActivity.java
38 lines (31 loc) · 1.34 KB
/
TicketDetailActivity.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.Activity;
import android.os.Bundle;
import android.widget.TextView;
import com.tudaidai.tuantrip.types.Ticket;
public class TicketDetailActivity extends Activity {
static final boolean DEBUG = TuanTripSettings.DEBUG;
public static final String EXTRA_Ticket = "com.tudaidai.tuantrip.TicketDetailActivity.Ticket";
static final String TAG = "TicketDetailActivity";
private Ticket ticket;
private void ensureUi() {
TextView codeText = (TextView) findViewById(R.id.codeText);
codeText.setText(ticket.getCode());
TextView titTextView = (TextView) findViewById(R.id.titleText);
titTextView.setText(ticket.getTitle());
TextView dateText = (TextView) findViewById(R.id.dateText);
dateText.setText(ticket.getDate());
TextView pwdText = (TextView) findViewById(R.id.pwdText);
pwdText.setText(ticket.getPwd());
TextView stateText = (TextView) findViewById(R.id.stateText);
stateText.setText(ticket.getTicketStatus());
TextView travelDateText = (TextView) findViewById(R.id.travelDateText);
travelDateText.setText(ticket.getTravelDate());
}
protected void onCreate(Bundle paramBundle) {
super.onCreate(paramBundle);
setContentView(R.layout.ticket_detail_activity);
ticket = (Ticket) getIntent().getExtras().getParcelable(EXTRA_Ticket);
ensureUi();
}
}