content: /*
   * Androzic - android navigation client that uses OziExplorer maps (ozf2, ozfx3).
   * Copyright (C) 2010-2012  Andrey Novikov <http://andreynovikov.info/>
   *
   * This file is part of Androzic application.
   *
   * Androzic is free software: you can redistribute it and/or modify
   * it under the terms of the GNU General Public License as published by
   * the Free Software Foundation, either version 3 of the License, or
   * (at your option) any later version.
  
   * Androzic is distributed in the hope that it will be useful,
   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   * GNU General Public License for more details.
  
   * You should have received a copy of the GNU General Public License
   * along with Androzic.  If not, see <http://www.gnu.org/licenses/>.
   */
  
  package com.androzic;
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.text.Html;
  import android.view.View;
  import android.view.Window;
  import android.view.View.OnClickListener;
  import android.widget.Button;
  import android.widget.TextView;
  
  public class ErrorDialog extends Activity
  {
      @Override
      public void onCreate(Bundle savedInstanceState)
      {
          super.onCreate(savedInstanceState);
  		requestWindowFeature(Window.FEATURE_LEFT_ICON);
          setContentView(R.layout.act_error);
  
      	String title = getIntent().getExtras().getString("title");
  		setTitle(title);
  		this.setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, android.R.drawable.ic_dialog_alert);
  
      	String message = getIntent().getExtras().getString("message");
          ((TextView) findViewById(R.id.message)).setText(Html.fromHtml(message));
  
          ((Button) findViewById(R.id.ok_button)).setOnClickListener(new OnClickListener() { public void onClick(View v) { finish(); } });
      }
  }
  