1 |
package dk.thoerup.traininfo; |
package dk.thoerup.traininfo; |
2 |
|
|
3 |
|
import dk.thoerup.traininfo.util.MessageBox; |
4 |
import android.app.Activity; |
import android.app.Activity; |
5 |
import android.content.Intent; |
import android.content.Intent; |
6 |
import android.os.Bundle; |
import android.os.Bundle; |
7 |
import android.view.View; |
import android.view.View; |
8 |
|
import android.view.Window; |
9 |
import android.view.View.OnClickListener; |
import android.view.View.OnClickListener; |
10 |
import android.widget.Button; |
import android.widget.Button; |
11 |
|
|
18 |
|
|
19 |
@Override |
@Override |
20 |
public void onCreate(Bundle savedInstanceState) { |
public void onCreate(Bundle savedInstanceState) { |
21 |
|
requestWindowFeature( Window.FEATURE_NO_TITLE ); |
22 |
super.onCreate(savedInstanceState); |
super.onCreate(savedInstanceState); |
23 |
setContentView(R.layout.welcome); |
setContentView(R.layout.welcome); |
24 |
|
|
33 |
|
|
34 |
Button aboutButton = (Button) findViewById(R.id.about); |
Button aboutButton = (Button) findViewById(R.id.about); |
35 |
aboutButton.setOnClickListener( new AboutListener() ); |
aboutButton.setOnClickListener( new AboutListener() ); |
|
|
|
36 |
} |
} |
37 |
|
|
38 |
class AboutListener implements OnClickListener { |
class AboutListener implements OnClickListener { |
39 |
|
|
40 |
@Override |
@Override |
41 |
public void onClick(View v) { |
public void onClick(View v) { |
42 |
|
|
43 |
|
String ver = WelcomeScreen.this.getResources().getString(R.string.app_version); |
44 |
|
StringBuffer message = new StringBuffer(); |
45 |
|
message.append("TrainInfo DK v").append(ver).append("\n"); |
46 |
|
message.append("By Torben H. Nielsen\n"); |
47 |
|
|
48 |
|
MessageBox.showMessage(WelcomeScreen.this, message.toString()); |
49 |
} |
} |
50 |
|
|
51 |
} |
} |
52 |
|
|
53 |
class StationListListener implements OnClickListener{ |
class StationListListener implements OnClickListener{ |
54 |
ListType launchType; |
ListType launchType; |
55 |
StationListListener(ListType type) { |
StationListListener(ListType type) { |