From 0ea181687e06ef4d1f955c081e4a96cd26ecd3fc Mon Sep 17 00:00:00 2001 From: Eric House Date: Thu, 21 Jul 2016 07:05:35 -0700 Subject: [PATCH] add constant controlling id logging --- .../src/org/eehouse/android/xw4/MainActivity.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/MainActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/MainActivity.java index 1dad7d8e9..d352cbc2b 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/MainActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/MainActivity.java @@ -51,6 +51,7 @@ import junit.framework.Assert; public class MainActivity extends XWActivity implements FragmentManager.OnBackStackChangedListener { private static final int MAX_PANES_LANDSCAPE = 2; + private static final boolean LOG_IDS = false; private DelegateBase m_dlgt; private boolean m_dpEnabled; @@ -278,8 +279,10 @@ public class MainActivity extends XWActivity } else { if ( fragCount == m_root.getChildCount() - 1 ) { View child = m_root.getChildAt( fragCount ); - // DbgUtils.logf( "onBackStackChanged(): removing view with id %x", - // child.getId() ); + if ( LOG_IDS ) { + DbgUtils.logf( "onBackStackChanged(): removing view with id %x", + child.getId() ); + } m_root.removeView( child ); setVisiblePanes(); } @@ -397,7 +400,9 @@ public class MainActivity extends XWActivity cont.setLayoutParams( new LayoutParams(0, LayoutParams.MATCH_PARENT, 1.0f) ); int id = --m_nextID; cont.setId( id ); - // DbgUtils.logf( "assigning id %x to view with name %s", id, newName ); + if ( LOG_IDS ) { + DbgUtils.logf( "assigning id %x to view with name %s", id, newName ); + } m_root.addView( cont, replace ? containerCount - 1 : containerCount ); if ( !replace && containerCount >= m_maxPanes ) {