Added README.txt and GPL Header to Source Files
[DHBWCampusApp.git] / app / src / main / java / de / dhbwloe / campusapp / fragments / Impressum.java
index a888f2abb29e798fa815da12cce8659ce2c5e78d..2742ae6c3b445a19e61227de11fce599f06d42be 100644 (file)
@@ -1,12 +1,26 @@
+/* Impressum.java
+ *
+ * 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 de.dhbwloe.campusapp.fragments;
-
-
 import android.os.Bundle;
 import android.support.v4.app.Fragment;
 import android.support.v4.app.FragmentActivity;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.TextView;
 
 import de.dhbwloe.campusapp.CampusAppFragment;
 import de.dhbwloe.campusapp.R;
@@ -22,9 +36,9 @@ public class Impressum extends CampusAppFragment {
                 new SearchIndices("Impressum", true) {{
                     setUpdateTime(1);
                     setTarget("#Impressum");
-                    setTitle("Impressum");
-                    setDescription("Impressum der App");
-                    addKeyWord("impressum, kontakt, autor, author, contact, imprint");
+                    setTitle(R.string.search_impressum_title);
+                    setDescription(R.string.search_impressum_description);
+                    addKeyWord(R.string.search_impressum_keywords);
                 }},
         };
     }
@@ -33,7 +47,17 @@ public class Impressum extends CampusAppFragment {
     public View onCreateView(LayoutInflater inflater, ViewGroup container,
                              Bundle savedInstanceState) {
         View view = inflater.inflate(R.layout.fragment_impressum, container, false);
-        AppContext.setTitle("Impressum");
+        AppContext.setTitle(AppContext.getResString(R.string.impressum_title));
+
+        TextView urlView = (TextView) view.findViewById(R.id.sourceUrl);
+        urlView.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                Bundle args = new Bundle();
+                args.putString("url", "http://dev.pk910.de/DHBWCampusApp");
+                AppContext.getNavigationManager().navigatePage("WebBrowser", args, false);
+            }
+        });
 
         return view;
     }