content: /*
   * Copyright 2017 Thomas Andres
   *
   * This file is part of Kandroid.
   *
   * Kandroid 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.
   *
   * Kandroid 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 Foobar.  If not, see <http://www.gnu.org/licenses/>.
   */
  
  package in.andres.kandroid.ui;
  
  import android.graphics.Bitmap;
  import android.os.Bundle;
  import android.support.v7.app.ActionBar;
  import android.support.v7.app.AppCompatActivity;
  import android.view.MenuItem;
  
  import in.andres.kandroid.BuildConfig;
  import in.andres.kandroid.R;
  
  public class AboutActivity extends AppCompatActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setupActionBar();
          setContentView(R.layout.activity_about);
      }
  
      private void  setupActionBar() {
          ActionBar actionBar = getSupportActionBar();
          if (actionBar != null) {
              // Show the Up button in the action bar.
              actionBar.setDisplayHomeAsUpEnabled(true);
              actionBar.setTitle(getString(R.string.title_activity_about, BuildConfig.VERSION_NAME));
          }
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          int id = item.getItemId();
          if (id == android.R.id.home) {
              onBackPressed();
              return true;
          }
          return super.onOptionsItemSelected(item);
      }
  }
  