/*
* Copyright 2015 Lafayette College
*
* This file is part of OpenCVTour.
*
* OpenCVTour 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.
*
* OpenCVTour 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 OpenCVTour. If not, see <http://www.gnu.org/licenses/>.
*/
package alicrow.opencvtour;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
/**
* Help screen, displaying usage tips, along with buttons to file a bug report or read the super-fun open source license notices.
*/
public class HelpActivity extends AppCompatActivity implements View.OnClickListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_help);
findViewById(R.id.about_button).setOnClickListener(this);
findViewById(R.id.report_issue).setOnClickListener(this);
}
@Override
public void onClick(View view) {
switch(view.getId()) {
case R.id.about_button: {
/// Launch the about page with all the open source license notices.
startActivity(new Intent(this, com.h6ah4i.android.example.advrecyclerview.about.AboutActivity.class));
break;
}
case R.id.report_issue: {
/// Open the issues page in the browser
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.report_issue_url))));
break;
}
}
}
}