@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.feedback); // TravelApplication.getInstance().addActivity(this); ActivityMange.getInstance().addActivity(this); contentEditText = (EditText) findViewById(R.id.feedback_content); contactEditText = (EditText) findViewById(R.id.feedback_contact); contactTipsTextView = (TextView) findViewById(R.id.feedback_contact_tips); ViewGroup feedbackGroup = (ViewGroup) findViewById(R.id.feedback_group); ImageButton submit = (ImageButton) findViewById(R.id.submit); submit.setOnClickListener(submitOnClickListener); feedbackGroup.setOnClickListener(feedbackGroupOnClickListener); InputMethodManager imm = (InputMethodManager) feedbackGroup.getContext().getSystemService(Context.INPUT_METHOD_SERVICE); if (imm.isActive()) { imm.hideSoftInputFromWindow(feedbackGroup.getApplicationWindowToken(), 0); } token = TravelApplication.getInstance().getToken(); if (token != null && !token.equals("")) { contactEditText.setVisibility(View.GONE); contactTipsTextView.setVisibility(View.GONE); } }
@Override protected void onDestroy() { // TODO Auto-generated method stub super.onDestroy(); ActivityMange.getInstance().finishActivity(); }