… | |
… | |
50 | import android.widget.CheckBox;
|
50 | import android.widget.CheckBox;
|
51 | import android.widget.CompoundButton;
|
51 | import android.widget.CompoundButton;
|
52 | import android.widget.CompoundButton.OnCheckedChangeListener;
|
52 | import android.widget.CompoundButton.OnCheckedChangeListener;
|
53 | import android.widget.EditText;
|
53 | import android.widget.EditText;
|
54 | import android.widget.LinearLayout;
|
54 | import android.widget.LinearLayout;
|
55 | import android.widget.RelativeLayout;
|
|
|
56 | import android.widget.RelativeLayout.LayoutParams;
|
55 | import android.widget.RelativeLayout.LayoutParams;
|
|
|
56 | import android.widget.ScrollView;
|
57 | import android.widget.TextView;
|
57 | import android.widget.TextView;
|
58 |
|
58 |
|
59 | public class NavitAddressSearchActivity extends Activity
|
59 | public class NavitAddressSearchActivity extends Activity
|
60 | {
|
60 | {
|
61 | private EditText address_string;
|
61 | private EditText address_string;
|
… | |
… | |
64 | private CheckBox ff_checkbox;
|
64 | private CheckBox ff_checkbox;
|
65 | private String search_type;
|
65 | private String search_type;
|
66 | private int search_country_id = 0;
|
66 | private int search_country_id = 0;
|
67 | private Button search_country_select;
|
67 | private Button search_country_select;
|
68 |
|
68 |
|
69 | public RelativeLayout NavitAddressSearchActivity_layout;
|
69 | // public RelativeLayout NavitAddressSearchActivity_layout;
|
70 |
|
70 |
|
71 | @Override
|
71 | @Override
|
72 | protected void onCreate(Bundle savedInstanceState)
|
72 | protected void onCreate(Bundle savedInstanceState)
|
73 | {
|
73 | {
|
74 | super.onCreate(savedInstanceState);
|
74 | super.onCreate(savedInstanceState);
|
75 |
|
75 |
|
76 | getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND, WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
|
76 | getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND, WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
|
|
|
77 |
|
|
|
78 | // scrollview
|
|
|
79 | ScrollView sv = new ScrollView(this);
|
|
|
80 | sv.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
|
|
|
81 |
|
|
|
82 | // panel linearlayout
|
77 | LinearLayout panel = new LinearLayout(this);
|
83 | LinearLayout panel = new LinearLayout(this);
|
78 | panel.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
|
84 | panel.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
|
79 | panel.setOrientation(LinearLayout.VERTICAL);
|
85 | panel.setOrientation(LinearLayout.VERTICAL);
|
80 |
|
86 |
|
81 | // address: label and text field
|
87 | // address: label and text field
|
82 | TextView addr_view = new TextView(this);
|
88 | TextView addr_view = new TextView(this);
|
83 | addr_view.setText(Navit.get_text("Enter Destination")); //TRANS
|
89 | addr_view.setText(Navit.get_text("Enter Destination")); //TRANS
|
… | |
… | |
218 | if (this.search_type.equals("offline"))
|
224 | if (this.search_type.equals("offline"))
|
219 | {
|
225 | {
|
220 | panel.addView(search_country_select);
|
226 | panel.addView(search_country_select);
|
221 | panel.addView(pm_checkbox);
|
227 | panel.addView(pm_checkbox);
|
222 | panel.addView(hdup_checkbox);
|
228 | panel.addView(hdup_checkbox);
|
223 | // panel.addView(ff_checkbox);
|
229 | panel.addView(ff_checkbox);
|
224 | }
|
230 | }
|
225 | panel.addView(btnSearch);
|
231 | panel.addView(btnSearch);
|
226 |
|
232 |
|
|
|
233 | sv.addView(panel);
|
|
|
234 |
|
|
|
235 | // set the main view
|
227 | setContentView(panel);
|
236 | setContentView(sv);
|
228 |
|
|
|
229 | }
|
237 | }
|
230 |
|
238 |
|
231 | public void start_country_select_form()
|
239 | public void start_country_select_form()
|
232 | {
|
240 | {
|
233 | Intent search_intent = new Intent(this, NavitAddressSearchCountrySelectActivity.class);
|
241 | Intent search_intent = new Intent(this, NavitAddressSearchCountrySelectActivity.class);
|