]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java
profile editor: offer a suitable color for new profiles
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / ui / profiles / ProfileDetailFragment.java
index 6b6883dfbf20b14d5ae9e3b9c99495559704f518..dc7fa9cd47f9a079b63c715f8373249c4e662454 100644 (file)
@@ -72,6 +72,7 @@ public class ProfileDetailFragment extends Fragment implements HueRingDialog.Hue
      * represents.
      */
     public static final String ARG_ITEM_ID = "item_id";
+    public static final String ARG_HUE = "hue";
     @NonNls
     private static final String HTTPS_URL_START = "https://";
 
@@ -293,7 +294,7 @@ public class ProfileDetailFragment extends Fragment implements HueRingDialog.Hue
         hookClearErrorOnFocusListener(userName, userNameLayout);
         hookClearErrorOnFocusListener(password, passwordLayout);
 
-        int profileThemeId;
+        final int profileThemeId;
         if (mProfile != null) {
             profileName.setText(mProfile.getName());
             postingPermitted.setChecked(mProfile.isPostingPermitted());
@@ -322,7 +323,7 @@ public class ProfileDetailFragment extends Fragment implements HueRingDialog.Hue
             userName.setText("");
             password.setText("");
             preferredAccountsFilter.setText(null);
-            profileThemeId = -1;
+            profileThemeId = getArguments().getInt(ARG_HUE, -1);
         }
 
         checkInsecureSchemeWithAuth();