fixed title for popups
authorpk910 <philipp@pk910.de>
Mon, 8 Feb 2016 09:05:17 +0000 (10:05 +0100)
committerpk910 <philipp@pk910.de>
Mon, 8 Feb 2016 09:05:17 +0000 (10:05 +0100)
app/src/main/java/de/dhbwloe/campusapp/CampusAppContext.java
app/src/main/java/de/dhbwloe/campusapp/NavigationManager.java

index ab49c22c015601952aa267c7a89d0d8cf43fb3ba..89cbc7c8da971d2764d08f0afe515665d468c856 100644 (file)
@@ -114,7 +114,8 @@ public class CampusAppContext {
     public void setTitle(String title) {
         PopupFragment popup = oNavigationManager.getDialog();
         if(popup != null) {
-            popup.getDialog().setTitle(title);
+            if(popup.getDialog() != null)
+                popup.getDialog().setTitle(title);
         } else {
             TextView titleView = (TextView)oMainActivity.findViewById(R.id.title);
             titleView.setText(title);
index 4a168a2212c829cedeae047bc5f2c505e9ebf528..daa84eabf49d4cf158f53ededd30729b99ccae77 100644 (file)
@@ -66,7 +66,8 @@ public class NavigationManager {
             return null;
         if(oCurrentPage.fragmentType != 3)
             return (CampusAppFragment)oCurrentFragment;
-        return null;
+        else
+            return ((PopupFragment)oCurrentFragment).getCurrentFragment();
     }
 
     public void navigatePage(String name) {