From: Damyan Ivanov Date: Mon, 31 Dec 2018 19:07:12 +0000 (+0000) Subject: fix current fragment indicator in the drawer after returning from the new transaction... X-Git-Tag: v0.3~152 X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=commitdiff_plain;h=dc0b910128c5c1e532fc5c957e62f0276b0abd10 fix current fragment indicator in the drawer after returning from the new transaction activity --- diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java index ad124667..5c2c6f5c 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java @@ -76,31 +76,6 @@ public class MainActivity extends AppCompatActivity { onAccountSummaryClicked(null); } - - @Override - protected void onStart() { - super.onStart(); - LinearLayout grp = drawer.findViewById(R.id.nav_actions); - for (int i = 0; i < grp.getChildCount(); i++) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - grp.getChildAt(i).setBackgroundColor( - getResources().getColor(R.color.drawer_background, getTheme())); - } - else { - grp.getChildAt(i) - .setBackgroundColor(getResources().getColor(R.color.drawer_background)); - } - } - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - drawer.findViewById(R.id.nav_account_summary).setBackgroundColor( - getResources().getColor(R.color.table_row_even_bg, getTheme())); - } - else { - drawer.findViewById(R.id.nav_account_summary) - .setBackgroundColor(getResources().getColor(R.color.table_row_even_bg)); - } - } - public void fab_new_transaction_clicked(View view) { Intent intent = new Intent(this, NewTransactionActivity.class); startActivity(intent);