66import android .os .Build ;
77import android .os .Parcelable ;
88import android .util .AttributeSet ;
9- import android .util .Log ;
109import android .view .Gravity ;
1110import android .view .View ;
1211import android .widget .LinearLayout ;
@@ -175,8 +174,12 @@ public TransformersLayout<T> apply(@Nullable TransformersOptions options){
175174 scrollBarHeight = options .scrollBarHeight <= 0 ? scrollBarHeight : options .scrollBarHeight ;
176175 scrollBarRadius = options .scrollBarRadius < 0 ? scrollBarHeight /2f : options .scrollBarRadius ;
177176 scrollBarTopMargin = options .scrollBarTopMargin <= 0 ? scrollBarTopMargin : options .scrollBarTopMargin ;
178- scrollBarTrackColor = options .scrollBarTrackColor <= 0 ? DEFAULT_TRACK_COLOR : options .scrollBarTrackColor ;
179- scrollBarThumbColor = options .scrollBarThumbColor <= 0 ? DEFAULT_THUMB_COLOR : options .scrollBarThumbColor ;
177+
178+ // Log.e(TAG, "trackColor = " + options.scrollBarTrackColor);
179+ // Log.e(TAG, "thumbColor = " + options.scrollBarThumbColor);
180+ // Log.e(TAG, "radius = " + options.scrollBarRadius);
181+ scrollBarTrackColor = options .scrollBarTrackColor == 0 ? DEFAULT_TRACK_COLOR : options .scrollBarTrackColor ;
182+ scrollBarThumbColor = options .scrollBarThumbColor == 0 ? DEFAULT_THUMB_COLOR : options .scrollBarThumbColor ;
180183
181184 if (newLines != lines ){
182185 recyclerView .setLayoutManager (new GridLayoutManager (getContext (), lines , GridLayoutManager .HORIZONTAL , false ));
@@ -191,7 +194,7 @@ public TransformersLayout<T> apply(@Nullable TransformersOptions options){
191194 */
192195 @ Override
193196 protected void onAttachedToWindow () {
194- Log .e (TAG , "----------onAttachedToWindow()" );
197+ // Log.e(TAG, "----------onAttachedToWindow()");
195198 super .onAttachedToWindow ();
196199// attached = true;
197200 if (savedState != null ) {
@@ -205,7 +208,7 @@ protected void onAttachedToWindow() {
205208 */
206209 @ Override
207210 protected void onDetachedFromWindow () {
208- Log .e (TAG , "----------onDetachedFromWindow()" );
211+ // Log.e(TAG, "----------onDetachedFromWindow()");
209212 super .onDetachedFromWindow ();
210213// attached = false;
211214 savedState = layoutManager .onSaveInstanceState ();
@@ -231,7 +234,7 @@ public void scrollToStart(boolean smooth){
231234 scrollBar .setScrollBySelf (true );
232235 if (recyclerView != null ) {
233236 if (recyclerView .computeHorizontalScrollOffset () > 0 ) {
234- Log .e (TAG , "----------scrollToStart()" );
237+ // Log.e(TAG, "----------scrollToStart()");
235238 if (smooth ) {
236239 recyclerView .smoothScrollToPosition (0 );
237240 } else {
0 commit comments