9
9
import android .os .Build ;
10
10
import android .support .v4 .view .ViewCompat ;
11
11
import android .util .AttributeSet ;
12
+ import android .util .Log ;
12
13
import android .view .MotionEvent ;
13
14
import android .view .View ;
14
15
import android .view .ViewGroup ;
@@ -304,7 +305,7 @@ public void setScrollThresHold(float threshold) {
304
305
/**
305
306
* Set a drawable used for edge shadow.
306
307
*
307
- * @param shadow Drawable to use
308
+ * @param shadow Drawable to use
308
309
* @param edgeFlag Combination of edge flags describing the edge to set
309
310
* @see #EDGE_LEFT
310
311
* @see #EDGE_RIGHT
@@ -324,7 +325,7 @@ public void setShadow(Drawable shadow, int edgeFlag) {
324
325
/**
325
326
* Set a drawable used for edge shadow.
326
327
*
327
- * @param resId Resource of drawable to use
328
+ * @param resId Resource of drawable to use
328
329
* @param edgeFlag Combination of edge flags describing the edge to set
329
330
* @see #EDGE_LEFT
330
331
* @see #EDGE_RIGHT
@@ -460,11 +461,12 @@ public void attachToActivity(Activity activity) {
460
461
a .recycle ();
461
462
462
463
ViewGroup decor = (ViewGroup ) activity .getWindow ().getDecorView ();
464
+ Log .i ("TAG" , activity .getClass ().getName () + ":" + decor .getChildCount ());
463
465
ViewGroup decorChild ;
464
466
//测试状态栏冲突问题
465
- if (Build .VERSION_CODES .KITKAT == Build .VERSION .SDK_INT ){
467
+ if (Build .VERSION_CODES .KITKAT == Build .VERSION .SDK_INT ) {
466
468
decorChild = (ViewGroup ) decor .getChildAt (1 );
467
- }else {
469
+ } else {
468
470
decorChild = (ViewGroup ) decor .getChildAt (0 );
469
471
}
470
472
decorChild .setBackgroundResource (background );
0 commit comments