/[projects]/android/TrainInfo/src/dk/thoerup/traininfo/WelcomeScreen.java
ViewVC logotype

Diff of /android/TrainInfo/src/dk/thoerup/traininfo/WelcomeScreen.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 481 by torben, Thu Oct 29 08:56:17 2009 UTC revision 720 by torben, Mon May 10 19:36:43 2010 UTC
# Line 2  package dk.thoerup.traininfo; Line 2  package dk.thoerup.traininfo;
2    
3  import android.app.Activity;  import android.app.Activity;
4  import android.content.Intent;  import android.content.Intent;
5    import android.net.Uri;
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    
12    import com.nullwire.trace.ExceptionHandler;
13    
14    import dk.thoerup.checkupdates.CheckUpdates;
15    
16  public class WelcomeScreen extends Activity{  public class WelcomeScreen extends Activity{
17          public enum ListType {          public enum ListType {
18                  ListNearest,                  ListNearest,
# Line 16  public class WelcomeScreen extends Activ Line 22  public class WelcomeScreen extends Activ
22                    
23          @Override          @Override
24          public void onCreate(Bundle savedInstanceState) {          public void onCreate(Bundle savedInstanceState) {
25                    requestWindowFeature( Window.FEATURE_NO_TITLE );
26                  super.onCreate(savedInstanceState);                  super.onCreate(savedInstanceState);
27                  setContentView(R.layout.welcome);                  setContentView(R.layout.welcome);
28                                    
# Line 31  public class WelcomeScreen extends Activ Line 38  public class WelcomeScreen extends Activ
38                  Button aboutButton = (Button) findViewById(R.id.about);                  Button aboutButton = (Button) findViewById(R.id.about);
39                  aboutButton.setOnClickListener( new AboutListener() );                  aboutButton.setOnClickListener( new AboutListener() );
40                                    
41                    ExceptionHandler.register(this, "http://t-hoerup.dk/android/trace.php");
42                    
43                    CheckUpdates update = new CheckUpdates();
44                    update.checkForUpdates(this, "http://t-hoerup.dk/android/traininfo/version.txt", "TrainInfo DK");
45          }          }
46                    
47          class AboutListener implements OnClickListener {          class AboutListener implements OnClickListener {
48    
49                  @Override                  @Override
50                  public void onClick(View v) {                  public void onClick(View v) {
51                            /*
52                            String appName = WelcomeScreen.this.getResources().getString(R.string.app_name);
53                            String ver = WelcomeScreen.this.getResources().getString(R.string.app_version);                
54                                                    
55                            StringBuffer message = new StringBuffer();
56                            message.append(appName);
57                            message.append(" v").append(ver).append("\n");
58                            message.append("By Torben H. Nielsen\n");
59    
60                            MessageBox.showMessage(WelcomeScreen.this, message.toString());*/
61                            Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.t-hoerup.dk/android/traininfo/"));
62                            startActivity(browserIntent);
63                  }                  }
64                    
65          }          }
66            
67          class StationListListener implements OnClickListener{          class StationListListener implements OnClickListener{
68                  ListType launchType;                  ListType launchType;
69                  StationListListener(ListType type) {                  StationListListener(ListType type) {

Legend:
Removed from v.481  
changed lines
  Added in v.720

  ViewVC Help
Powered by ViewVC 1.1.20