From ba113e1a7fb2b624bb1a95ce88786ec59c907418 Mon Sep 17 00:00:00 2001 From: Severiano Jaramillo Date: Fri, 14 Dec 2018 11:12:30 -0600 Subject: [PATCH] Found that enabling ProGuard's minify for the debug version breaks the debugger breakpoints functionality, minify was disabled until a solution is found. --- app/build.gradle | 4 ++-- .../bitsybitshareswallet/fragments/BalancesFragment.kt | 9 +++++++++ .../bitsybitshareswallet/fragments/HomeFragment.kt | 2 -- .../bitsybitshareswallet/fragments/NetWorthFragment.kt | 8 ++++++++ 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index f9ba159..15d7376 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -21,8 +21,8 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } debug { - minifyEnabled true - shrinkResources true + // TODO enabling minify breaks the debugger breakpoints, find a way to fix it and enable minify again + minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' resValue("string", "PORT_NUMBER", "8082") } diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/BalancesFragment.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/BalancesFragment.kt index 17c4250..3985ea2 100644 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/BalancesFragment.kt +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/BalancesFragment.kt @@ -16,6 +16,7 @@ import cy.agorise.bitsybitshareswallet.viewmodels.BalanceDetailViewModel import kotlinx.android.synthetic.main.fragment_balances.* class BalancesFragment: Fragment() { + private val TAG = this.javaClass.simpleName private lateinit var mBalanceDetailViewModel: BalanceDetailViewModel @@ -43,4 +44,12 @@ class BalancesFragment: Fragment() { balancesAdapter.replaceAll(balancesDetails) }) } + +// override fun setUserVisibleHint(isVisibleToUser: Boolean) { +// super.setUserVisibleHint(isVisibleToUser) +// if (isVisibleToUser) { +// // TODO find a better way to recreate the fragment, that does it only when the theme has been changed +// fragmentManager!!.beginTransaction().detach(this).attach(this).commit() +// } +// } } \ No newline at end of file diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/HomeFragment.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/HomeFragment.kt index 460a8ea..3fee1dc 100644 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/HomeFragment.kt +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/HomeFragment.kt @@ -16,7 +16,6 @@ import cy.agorise.bitsybitshareswallet.database.entities.UserAccount import cy.agorise.bitsybitshareswallet.utils.Constants import cy.agorise.bitsybitshareswallet.viewmodels.UserAccountViewModel import kotlinx.android.synthetic.main.fragment_home.* -import kotlinx.android.synthetic.main.item_balance.view.* class HomeFragment : Fragment() { @@ -76,7 +75,6 @@ class HomeFragment : Fragment() { override fun getItem(position: Int): Fragment { // getItem is called to instantiate the fragment for the given page. - // Return a PlaceholderFragment (defined as a static inner class below). return if (position == 0) BalancesFragment() else diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/NetWorthFragment.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/NetWorthFragment.kt index 5996cfe..2a387f4 100644 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/NetWorthFragment.kt +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/NetWorthFragment.kt @@ -17,4 +17,12 @@ class NetWorthFragment: Fragment() { return inflater.inflate(R.layout.fragment_net_worth, container, false) } + +// override fun setUserVisibleHint(isVisibleToUser: Boolean) { +// super.setUserVisibleHint(isVisibleToUser) +// if (isVisibleToUser) { +// // TODO find a better way to recreate the fragment, that does it only when the theme has been changed +// fragmentManager!!.beginTransaction().detach(this).attach(this).commit() +// } +// } } \ No newline at end of file