From: Damyan Ivanov Date: Sun, 5 May 2019 18:57:25 +0000 (+0300) Subject: whitespace X-Git-Tag: v0.10.0~4 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=abf0d185f5a4abec2111108b8ea27b3f70bb553d;p=mobile-ledger.git whitespace --- 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 5a8e198f..12957e97 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 @@ -249,37 +249,36 @@ public class MainActivity extends ProfileThemedActivity { if (mProfileListAdapter == null) mProfileListAdapter = new ProfilesRecyclerViewAdapter(); root.setAdapter(mProfileListAdapter); - mProfileListAdapter.editingProfiles - .observe(this, newValue -> { - if (newValue) { - profileListHeadMore.setVisibility(View.GONE); - profileListHeadCancel.setVisibility(View.VISIBLE); - profileListHeadAddProfile.setVisibility(View.VISIBLE); - if (drawer.isDrawerOpen(GravityCompat.START)) { - profileListHeadMore.startAnimation(AnimationUtils - .loadAnimation(MainActivity.this, R.anim.fade_out)); - profileListHeadCancel.startAnimation(AnimationUtils - .loadAnimation(MainActivity.this, R.anim.fade_in)); - profileListHeadAddProfile.startAnimation(AnimationUtils - .loadAnimation(MainActivity.this, R.anim.fade_in)); - } - } - else { - profileListHeadCancel.setVisibility(View.GONE); - profileListHeadMore.setVisibility(View.VISIBLE); - profileListHeadAddProfile.setVisibility(View.GONE); - if (drawer.isDrawerOpen(GravityCompat.START)) { - profileListHeadCancel.startAnimation(AnimationUtils - .loadAnimation(MainActivity.this, R.anim.fade_out)); - profileListHeadMore.startAnimation(AnimationUtils - .loadAnimation(MainActivity.this, R.anim.fade_in)); - profileListHeadAddProfile.startAnimation(AnimationUtils - .loadAnimation(MainActivity.this, R.anim.fade_out)); - } - } + mProfileListAdapter.editingProfiles.observe(this, newValue -> { + if (newValue) { + profileListHeadMore.setVisibility(View.GONE); + profileListHeadCancel.setVisibility(View.VISIBLE); + profileListHeadAddProfile.setVisibility(View.VISIBLE); + if (drawer.isDrawerOpen(GravityCompat.START)) { + profileListHeadMore.startAnimation( + AnimationUtils.loadAnimation(MainActivity.this, R.anim.fade_out)); + profileListHeadCancel.startAnimation( + AnimationUtils.loadAnimation(MainActivity.this, R.anim.fade_in)); + profileListHeadAddProfile.startAnimation( + AnimationUtils.loadAnimation(MainActivity.this, R.anim.fade_in)); + } + } + else { + profileListHeadCancel.setVisibility(View.GONE); + profileListHeadMore.setVisibility(View.VISIBLE); + profileListHeadAddProfile.setVisibility(View.GONE); + if (drawer.isDrawerOpen(GravityCompat.START)) { + profileListHeadCancel.startAnimation( + AnimationUtils.loadAnimation(MainActivity.this, R.anim.fade_out)); + profileListHeadMore.startAnimation( + AnimationUtils.loadAnimation(MainActivity.this, R.anim.fade_in)); + profileListHeadAddProfile.startAnimation( + AnimationUtils.loadAnimation(MainActivity.this, R.anim.fade_out)); + } + } - mProfileListAdapter.notifyDataSetChanged(); - }); + mProfileListAdapter.notifyDataSetChanged(); + }); LinearLayoutManager llm = new LinearLayoutManager(this);