Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
212 | ligi | 1 | |
2 | package org.ligi.android; |
||
3 | |||
4 | import android.app.ListActivity; |
||
5 | import android.content.Intent; |
||
6 | import android.content.pm.PackageManager; |
||
7 | import android.content.pm.ResolveInfo; |
||
8 | import android.os.Bundle; |
||
9 | import android.view.View; |
||
10 | import android.widget.ListView; |
||
11 | import android.widget.SimpleAdapter; |
||
12 | |||
13 | |||
14 | import android.util.Log; |
||
15 | import android.view.ViewGroup.*; |
||
16 | import android.app.Activity; |
||
17 | import android.os.Bundle; |
||
18 | |||
19 | |||
20 | import android.view.*; |
||
21 | import android.widget.*; |
||
22 | |||
23 | |||
24 | import java.text.Collator; |
||
25 | import java.util.ArrayList; |
||
26 | import java.util.Collections; |
||
27 | import java.util.Comparator; |
||
28 | import java.util.HashMap; |
||
29 | import java.util.List; |
||
30 | import java.util.Map; |
||
31 | import android.net.Uri; |
||
32 | |||
33 | import java.net.URISyntaxException; |
||
34 | import android.widget.ArrayAdapter; |
||
35 | |||
36 | |||
37 | import android.text.method.NumberKeyListener; |
||
38 | |||
39 | |||
40 | import com.google.android.maps.MapView; |
||
41 | |||
42 | import android.app.AlertDialog.*; |
||
43 | import android.app.AlertDialog; |
||
44 | |||
45 | import android.content.*; |
||
46 | |||
47 | import org.ligi.ufo.*; |
||
48 | |||
49 | public class FlightSettingsActivity extends Activity |
||
50 | // extends ListActivity |
||
51 | |||
52 | { |
||
53 | |||
54 | String[] menu_items = new String[]{"Stick","Navi"}; |
||
55 | |||
56 | |||
57 | |||
58 | @Override |
||
59 | protected void onCreate(Bundle savedInstanceState) { |
||
60 | super.onCreate(savedInstanceState); |
||
61 | Intent i=new Intent(this, FlightSettingsSettingSelect.class); |
||
62 | i.putExtra("items",menu_items); |
||
63 | |||
64 | startActivityForResult(i,0); |
||
65 | } |
||
66 | @Override |
||
67 | |||
68 | protected void onActivityResult(int requestCode,int resultCode, Intent intent) |
||
69 | { |
||
70 | if ( resultCode!=RESULT_CANCELED) |
||
71 | |||
72 | { |
||
73 | Bundle extras = intent.getExtras(); |
||
74 | if (extras!=null) |
||
75 | { |
||
76 | LinearLayout lin = new LinearLayout(this); |
||
77 | |||
78 | lin.setOrientation(LinearLayout.VERTICAL); |
||
79 | |||
80 | LayoutParams params = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.FILL_PARENT); |
||
81 | TextView t1 = new TextView(this); |
||
82 | |||
83 | t1.setText("Here is the first textbox" + extras.getInt("pos")); |
||
84 | lin.addView(t1, params); |
||
85 | |||
86 | setContentView(lin); |
||
87 | } |
||
88 | } |
||
89 | else |
||
90 | finish(); |
||
91 | } |
||
92 | |||
93 | |||
94 | |||
95 | |||
96 | |||
97 | } |