move profile name from the sub-title to the title
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 11 Jan 2019 19:51:57 +0000 (19:51 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 11 Jan 2019 19:51:57 +0000 (19:51 +0000)
it needs to be seen, and the current view is obvious and needs not be
so explicit

app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java

index a22d9891824a70e9b59bda2cc8b0f4bf81d0d979..1218d0cf3d5cc37a5b4f6c1081f82b83e591d566 100644 (file)
@@ -95,8 +95,8 @@ public class MainActivity extends AppCompatActivity {
         Data.profile.addObserver((o, arg) -> {
             MobileLedgerProfile profile = Data.profile.get();
             runOnUiThread(() -> {
-                if (profile == null) toolbar.setSubtitle("");
-                else toolbar.setSubtitle(profile.getName());
+                if (profile == null) setTitle(R.string.app_name);
+                else setTitle(profile.getName());
             });
         });
 
@@ -240,8 +240,6 @@ public class MainActivity extends AppCompatActivity {
             item.setBackgroundColor(getResources().getColor(R.color.table_row_even_bg));
         }
 
-        setTitle(item.getText());
-
         @ColorInt int transparent = getResources().getColor(android.R.color.transparent);
 
         LinearLayout actions = drawer.findViewById(R.id.nav_actions);