/* Viewer for Khan Academy Copyright (C) 2012 Concentric Sky, Inc. This program 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. This program 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 this program. If not, see <http://www.gnu.org/licenses/>. */ package com.concentricsky.android.khanacademy.app; import android.app.Activity; import android.os.Bundle; import android.text.method.LinkMovementMethod; import android.view.MenuItem; import android.widget.TextView; import com.concentricsky.android.khan.R; /** * An About window. * * @author austinlally * */ public class AboutActivity extends Activity { public static final String LOG_TAG = AboutActivity.class.getSimpleName(); @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getActionBar().setDisplayHomeAsUpEnabled(true); setContentView(R.layout.about); TextView[] views = new TextView[] { (TextView) findViewById(R.id.copyright), (TextView) findViewById(R.id.license), (TextView) findViewById(R.id.dialog_tos_not_endorsed), (TextView) findViewById(R.id.about_thanks), (TextView) findViewById(R.id.csky_license_3) }; for (TextView v : views) { v.setMovementMethod(new LinkMovementMethod()); } } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: finish(); return true; default: return super.onOptionsItemSelected(item); } } }