Release.
[mobilnebezpieczenstwo.git] / src / com / samsung / srpol / ui / LicenseActivity.java
1 /*
2    Copyright (C) 2014  Samsung Electronics Polska Sp. z o.o.
3
4     This program is free software: you can redistribute it and/or modify
5     it under the terms of the GNU AFFERO General Public License as published by
6     the Free Software Foundation, either version 3 of the License, or
7     (at your option) any later version.
8     You may obtain a copy of the License at
9
10                 http://www.gnu.org/licenses/agpl-3.0.txt
11
12     This program is distributed in the hope that it will be useful,
13     but WITHOUT ANY WARRANTY; without even the implied warranty of
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15     GNU General Public License for more details.
16
17     You should have received a copy of the GNU General Public License
18     along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 package com.samsung.srpol.ui;
22
23 import com.samsung.srpol.R;
24 import com.samsung.srpol.utils.Utils;
25
26 import android.graphics.Paint;
27 import android.os.Bundle;
28 import android.support.v7.app.ActionBarActivity;
29 import android.view.View;
30 import android.view.View.OnClickListener;
31 import android.widget.ImageButton;
32 import android.widget.TextView;
33
34 public class LicenseActivity extends ActionBarActivity {
35
36
37     @Override
38     protected void onCreate(Bundle savedInstanceState) {
39         super.onCreate(savedInstanceState);
40         setContentView(R.layout.activity_license);
41
42         TextView descriptionTextLink = (TextView) findViewById(R.id.license_link);
43         descriptionTextLink.setPaintFlags(Paint.UNDERLINE_TEXT_FLAG);
44         descriptionTextLink.setOnClickListener(new OnClickListener() {
45             
46             @Override
47             public void onClick(View v) {
48                 Utils.startBrowser(LicenseActivity.this, getString(R.string.license_link));
49             }
50         });
51         
52         ImageButton backBtn = (ImageButton) findViewById(R.id.back_button);
53         backBtn.setOnClickListener(new OnClickListener() {
54
55             @Override
56             public void onClick(View arg0) {
57                 finish();
58             }
59         });
60     }
61     
62 }