/[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 568 by torben, Fri Jan 29 05:44:09 2010 UTC
# Line 1  Line 1 
1  package dk.thoerup.traininfo;  package dk.thoerup.traininfo;
2    
3    import com.nullwire.trace.ExceptionHandler;
4    
5  import android.app.Activity;  import android.app.Activity;
6  import android.content.Intent;  import android.content.Intent;
7    import android.net.Uri;
8  import android.os.Bundle;  import android.os.Bundle;
9  import android.view.View;  import android.view.View;
10    import android.view.Window;
11  import android.view.View.OnClickListener;  import android.view.View.OnClickListener;
12  import android.widget.Button;  import android.widget.Button;
13    
# Line 16  public class WelcomeScreen extends Activ Line 20  public class WelcomeScreen extends Activ
20                    
21          @Override          @Override
22          public void onCreate(Bundle savedInstanceState) {          public void onCreate(Bundle savedInstanceState) {
23                    requestWindowFeature( Window.FEATURE_NO_TITLE );
24                  super.onCreate(savedInstanceState);                  super.onCreate(savedInstanceState);
25                  setContentView(R.layout.welcome);                  setContentView(R.layout.welcome);
26                                    
# Line 31  public class WelcomeScreen extends Activ Line 36  public class WelcomeScreen extends Activ
36                  Button aboutButton = (Button) findViewById(R.id.about);                  Button aboutButton = (Button) findViewById(R.id.about);
37                  aboutButton.setOnClickListener( new AboutListener() );                  aboutButton.setOnClickListener( new AboutListener() );
38                                    
39                    ExceptionHandler.register(this, "http://t-hoerup.dk/android/trace.php");
40          }          }
41                    
42          class AboutListener implements OnClickListener {          class AboutListener implements OnClickListener {
43    
44                  @Override                  @Override
45                  public void onClick(View v) {                  public void onClick(View v) {
46                            /*
47                            String appName = WelcomeScreen.this.getResources().getString(R.string.app_name);
48                            String ver = WelcomeScreen.this.getResources().getString(R.string.app_version);                
49                                                    
50                            StringBuffer message = new StringBuffer();
51                            message.append(appName);
52                            message.append(" v").append(ver).append("\n");
53                            message.append("By Torben H. Nielsen\n");
54    
55                            MessageBox.showMessage(WelcomeScreen.this, message.toString());*/
56                            Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.t-hoerup.dk/android/traininfo/"));
57                            startActivity(browserIntent);
58                  }                  }
59                    
60          }          }
61            
62          class StationListListener implements OnClickListener{          class StationListListener implements OnClickListener{
63                  ListType launchType;                  ListType launchType;
64                  StationListListener(ListType type) {                  StationListListener(ListType type) {

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

  ViewVC Help
Powered by ViewVC 1.1.20