Loading api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -28631,6 +28631,7 @@ package android.widget { method public int getAlignmentMode(); method public int getColumnCount(); method public int getOrientation(); method public android.util.Printer getPrinter(); method public int getRowCount(); method public boolean getUseDefaultMargins(); method public boolean isColumnOrderPreserved(); Loading @@ -28640,6 +28641,7 @@ package android.widget { method public void setColumnCount(int); method public void setColumnOrderPreserved(boolean); method public void setOrientation(int); method public void setPrinter(android.util.Printer); method public void setRowCount(int); method public void setRowOrderPreserved(boolean); method public void setUseDefaultMargins(boolean); core/java/android/widget/GridLayout.java +30 −5 Original line number Diff line number Diff line Loading @@ -24,7 +24,9 @@ import android.graphics.Insets; import android.graphics.Paint; import android.util.AttributeSet; import android.util.Log; import android.util.LogPrinter; import android.util.Pair; import android.util.Printer; import android.view.Gravity; import android.view.View; import android.view.ViewGroup; Loading Loading @@ -219,7 +221,6 @@ public class GridLayout extends ViewGroup { // Misc constants static final String TAG = GridLayout.class.getName(); static final int MAX_SIZE = 100000; static final int DEFAULT_CONTAINER_MARGIN = 0; static final int UNINITIALIZED_HASH = 0; Loading Loading @@ -251,6 +252,7 @@ public class GridLayout extends ViewGroup { int alignmentMode = DEFAULT_ALIGNMENT_MODE; int defaultGap; int lastLayoutParamsHashCode = UNINITIALIZED_HASH; Printer printer = new LogPrinter(Log.DEBUG, getClass().getName()); // Constructors Loading Loading @@ -567,6 +569,29 @@ public class GridLayout extends ViewGroup { requestLayout(); } /** * Return the printer that will log diagnostics from this layout. * * @see #setPrinter(android.util.Printer) * * @return the printer associated with this view */ public Printer getPrinter() { return printer; } /** * Set the printer that will log diagnostics from this layout. * The default value is created by {@link android.util.LogPrinter}. * * @param printer the printer associated with this layout * * @see #getPrinter() */ public void setPrinter(Printer printer) { this.printer = printer; } // Static utility methods static int max2(int[] a, int valueIfEmpty) { Loading Loading @@ -946,8 +971,8 @@ public class GridLayout extends ViewGroup { validateLayoutParams(); lastLayoutParamsHashCode = computeLayoutParamsHashCode(); } else if (lastLayoutParamsHashCode != computeLayoutParamsHashCode()) { Log.w(TAG, "The fields of some layout parameters were modified in between layout " + "operations. Check the javadoc for GridLayout.LayoutParams#rowSpec."); printer.println("The fields of some layout parameters were modified in between " + "layout operations. Check the javadoc for GridLayout.LayoutParams#rowSpec."); invalidateStructure(); consistencyCheck(); } Loading Loading @@ -1529,8 +1554,8 @@ public class GridLayout extends ViewGroup { removed.add(arc); } } Log.d(TAG, axisName + " constraints: " + arcsToString(culprits) + " are inconsistent; " + "permanently removing: " + arcsToString(removed) + ". "); printer.println(axisName + " constraints: " + arcsToString(culprits) + " are inconsistent; permanently removing: " + arcsToString(removed) + ". "); } /* Loading Loading
api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -28631,6 +28631,7 @@ package android.widget { method public int getAlignmentMode(); method public int getColumnCount(); method public int getOrientation(); method public android.util.Printer getPrinter(); method public int getRowCount(); method public boolean getUseDefaultMargins(); method public boolean isColumnOrderPreserved(); Loading @@ -28640,6 +28641,7 @@ package android.widget { method public void setColumnCount(int); method public void setColumnOrderPreserved(boolean); method public void setOrientation(int); method public void setPrinter(android.util.Printer); method public void setRowCount(int); method public void setRowOrderPreserved(boolean); method public void setUseDefaultMargins(boolean);
core/java/android/widget/GridLayout.java +30 −5 Original line number Diff line number Diff line Loading @@ -24,7 +24,9 @@ import android.graphics.Insets; import android.graphics.Paint; import android.util.AttributeSet; import android.util.Log; import android.util.LogPrinter; import android.util.Pair; import android.util.Printer; import android.view.Gravity; import android.view.View; import android.view.ViewGroup; Loading Loading @@ -219,7 +221,6 @@ public class GridLayout extends ViewGroup { // Misc constants static final String TAG = GridLayout.class.getName(); static final int MAX_SIZE = 100000; static final int DEFAULT_CONTAINER_MARGIN = 0; static final int UNINITIALIZED_HASH = 0; Loading Loading @@ -251,6 +252,7 @@ public class GridLayout extends ViewGroup { int alignmentMode = DEFAULT_ALIGNMENT_MODE; int defaultGap; int lastLayoutParamsHashCode = UNINITIALIZED_HASH; Printer printer = new LogPrinter(Log.DEBUG, getClass().getName()); // Constructors Loading Loading @@ -567,6 +569,29 @@ public class GridLayout extends ViewGroup { requestLayout(); } /** * Return the printer that will log diagnostics from this layout. * * @see #setPrinter(android.util.Printer) * * @return the printer associated with this view */ public Printer getPrinter() { return printer; } /** * Set the printer that will log diagnostics from this layout. * The default value is created by {@link android.util.LogPrinter}. * * @param printer the printer associated with this layout * * @see #getPrinter() */ public void setPrinter(Printer printer) { this.printer = printer; } // Static utility methods static int max2(int[] a, int valueIfEmpty) { Loading Loading @@ -946,8 +971,8 @@ public class GridLayout extends ViewGroup { validateLayoutParams(); lastLayoutParamsHashCode = computeLayoutParamsHashCode(); } else if (lastLayoutParamsHashCode != computeLayoutParamsHashCode()) { Log.w(TAG, "The fields of some layout parameters were modified in between layout " + "operations. Check the javadoc for GridLayout.LayoutParams#rowSpec."); printer.println("The fields of some layout parameters were modified in between " + "layout operations. Check the javadoc for GridLayout.LayoutParams#rowSpec."); invalidateStructure(); consistencyCheck(); } Loading Loading @@ -1529,8 +1554,8 @@ public class GridLayout extends ViewGroup { removed.add(arc); } } Log.d(TAG, axisName + " constraints: " + arcsToString(culprits) + " are inconsistent; " + "permanently removing: " + arcsToString(removed) + ". "); printer.println(axisName + " constraints: " + arcsToString(culprits) + " are inconsistent; permanently removing: " + arcsToString(removed) + ". "); } /* Loading