Added README.txt and GPL Header to Source Files
[DHBWCampusApp.git] / app / src / main / java / de / dhbwloe / campusapp / fragments / SplashScreen.java
index 83d773fa2d775d35ccfa73d973d32e4454217263..e94ddb3712e8f608efc7b184365a1a377364ad51 100644 (file)
@@ -1,6 +1,19 @@
+/* SplashScreen.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.graphics.Bitmap;
 import android.graphics.BitmapFactory;
 import android.graphics.Point;
@@ -13,10 +26,12 @@ import android.view.View;
 import android.view.ViewGroup;
 import android.widget.ImageView;
 import android.widget.ProgressBar;
+import android.widget.TextView;
 
 import java.util.Date;
 
 import de.dhbwloe.campusapp.CampusApp;
+import de.dhbwloe.campusapp.CampusAppContext;
 import de.dhbwloe.campusapp.CampusAppFragment;
 import de.dhbwloe.campusapp.R;
 import de.dhbwloe.campusapp.mensaplan.MensaplanManager;
@@ -56,6 +71,9 @@ public class SplashScreen extends CampusAppFragment {
                              Bundle savedInstanceState) {
         View view = inflater.inflate(R.layout.fragment_splashscreen, container, false);
 
+        TextView versionView = (TextView) view.findViewById(R.id.version);
+        versionView.setText(CampusAppContext.APPVERSION);
+
         splashProgress = (ProgressBar)view.findViewById(R.id.splashProgress);
         splashProgress.setMax(20);
         splashProgress.setProgress(0);
@@ -142,7 +160,7 @@ public class SplashScreen extends CampusAppFragment {
                                     indices.setDescription("Vorlesung " + event.getEventTitle());
                                     indices.addKeyWord(event.getGroupTitle());
                                     indices.addKeyWord(event.getEventLocation());
-                                    return null;
+                                    return indices;
                                 }
                             });
                         }
@@ -164,11 +182,11 @@ public class SplashScreen extends CampusAppFragment {
                                     SearchIndices indices = new SearchIndices("Vorlesungsplan#Group"+group.getGroupId(), false);
                                     indices.setUpdateTime(event.getEventFrom());
                                     indices.setTarget("#Vorlesungsplan#groupid=" + group.getGroupId());
-                                    indices.setTitle("Vorlesungsplan " + event.getCourseName());
-                                    indices.setDescription("Vorlesung " + event.getEventTitle());
+                                    indices.setTitle(AppContext.getResString(R.string.search_vorlesungsplan_group_title, event.getCourseName()));
+                                    indices.setDescription(event.getEventTitle());
                                     indices.addKeyWord(event.getGroupTitle());
                                     indices.addKeyWord(event.getEventLocation());
-                                    return null;
+                                    return indices;
                                 }
                             });
                         }