|
|
@@ -1,13 +1,18 @@
|
|
|
package com.usai.apex;
|
|
|
|
|
|
+import android.app.ActionBar;
|
|
|
import android.content.Intent;
|
|
|
import android.os.Bundle;
|
|
|
import android.support.v4.app.FragmentActivity;
|
|
|
+import android.text.TextUtils;
|
|
|
import android.util.Log;
|
|
|
import android.view.Menu;
|
|
|
import android.view.View;
|
|
|
import android.view.View.OnClickListener;
|
|
|
+import android.widget.Button;
|
|
|
+import android.widget.EditText;
|
|
|
import android.widget.ImageButton;
|
|
|
+import android.widget.RadioGroup;
|
|
|
import android.widget.TextView;
|
|
|
|
|
|
public class FunctionSelectActivity extends FragmentActivity implements OnClickListener
|
|
|
@@ -23,6 +28,9 @@ public class FunctionSelectActivity extends FragmentActivity implements OnClickL
|
|
|
password= getIntent().getStringExtra("password");
|
|
|
super.onCreate(savedInstanceState);
|
|
|
setContentView(R.layout.new_function_select);
|
|
|
+
|
|
|
+ ActionBar bar = getActionBar();
|
|
|
+ bar.setTitle("");
|
|
|
//
|
|
|
TextView tv_booking = (TextView)findViewById(R.id.tv_booking);
|
|
|
tv_booking.setOnClickListener(this);
|
|
|
@@ -40,6 +48,8 @@ public class FunctionSelectActivity extends FragmentActivity implements OnClickL
|
|
|
tv_exit.setOnClickListener(this);
|
|
|
TextView tv_loc = (TextView)findViewById(R.id.tv_location);
|
|
|
tv_loc.setOnClickListener(this);
|
|
|
+ Button btn_search = (Button) findViewById(R.id.btn_search);
|
|
|
+ btn_search.setOnClickListener(this);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -58,6 +68,34 @@ public class FunctionSelectActivity extends FragmentActivity implements OnClickL
|
|
|
Log.d(TAG, "ID="+v.getId());
|
|
|
switch (v.getId())
|
|
|
{
|
|
|
+ case R.id.btn_search:
|
|
|
+ EditText et = (EditText) findViewById(R.id.et_criterion);
|
|
|
+ String cargo_criterion = et.getText().toString();
|
|
|
+ if (TextUtils.isEmpty(cargo_criterion))
|
|
|
+ {
|
|
|
+ et.setError(getString(R.string.error_field_required));
|
|
|
+ et.requestFocus();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Intent intent = new Intent();
|
|
|
+ intent.setClass(this, DetailActivity.class);
|
|
|
+
|
|
|
+ intent.putExtra("action0" , "Tracking");
|
|
|
+ intent.putExtra("function_name", "Cargo Tracking");
|
|
|
+ intent.putExtra("cargo_criterion", cargo_criterion);
|
|
|
+ intent.putExtra("actions_count", 1);
|
|
|
+ intent.putExtra("_id", "dumb");
|
|
|
+ RadioGroup rg = (RadioGroup) findViewById(R.id.radioGroup1);
|
|
|
+ if(rg.getCheckedRadioButtonId ()==R.id.radio0)
|
|
|
+ intent.putExtra("criterion_type", 0);
|
|
|
+ else
|
|
|
+ intent.putExtra("criterion_type", 1);
|
|
|
+// hbol
|
|
|
+// container_no
|
|
|
+ startActivity(intent);
|
|
|
+ }
|
|
|
+ break;
|
|
|
case R.id.tv_booking:
|
|
|
{
|
|
|
Intent intent = new Intent();
|