Selaa lähdekoodia

Add license in library class.

zhpanvip 2 vuotta sitten
vanhempi
commit
1eb78a4493
19 muutettua tiedostoa jossa 299 lisäystä ja 5 poistoa
  1. 15 0
      bannerview/src/main/java/com/zhpan/bannerview/BannerViewPager.java
  2. 16 0
      bannerview/src/main/java/com/zhpan/bannerview/BaseBannerAdapter.java
  3. 15 0
      bannerview/src/main/java/com/zhpan/bannerview/BaseViewHolder.java
  4. 16 0
      bannerview/src/main/java/com/zhpan/bannerview/annotation/AIndicatorGravity.java
  5. 16 0
      bannerview/src/main/java/com/zhpan/bannerview/annotation/APageStyle.java
  6. 16 0
      bannerview/src/main/java/com/zhpan/bannerview/annotation/Visibility.java
  7. 16 0
      bannerview/src/main/java/com/zhpan/bannerview/constants/IndicatorGravity.java
  8. 16 0
      bannerview/src/main/java/com/zhpan/bannerview/constants/PageStyle.java
  9. 19 3
      bannerview/src/main/java/com/zhpan/bannerview/indicator/DrawableIndicator.kt
  10. 16 0
      bannerview/src/main/java/com/zhpan/bannerview/manager/AttributeController.java
  11. 16 0
      bannerview/src/main/java/com/zhpan/bannerview/manager/BannerManager.java
  12. 16 0
      bannerview/src/main/java/com/zhpan/bannerview/manager/BannerOptions.java
  13. 16 0
      bannerview/src/main/java/com/zhpan/bannerview/provider/ReflectLayoutManager.java
  14. 14 0
      bannerview/src/main/java/com/zhpan/bannerview/provider/RoundViewOutlineProvider.java
  15. 16 0
      bannerview/src/main/java/com/zhpan/bannerview/provider/ScrollDurationManger.java
  16. 13 0
      bannerview/src/main/java/com/zhpan/bannerview/provider/ViewStyleSetter.java
  17. 17 2
      bannerview/src/main/java/com/zhpan/bannerview/transform/OverlapPageTransformer.kt
  18. 15 0
      bannerview/src/main/java/com/zhpan/bannerview/transform/ScaleInTransformer.java
  19. 15 0
      bannerview/src/main/java/com/zhpan/bannerview/utils/BannerUtils.java

+ 15 - 0
bannerview/src/main/java/com/zhpan/bannerview/BannerViewPager.java

@@ -1,3 +1,18 @@
+/*
+Copyright 2017 zhpanvip The BannerViewPager Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+ */
 package com.zhpan.bannerview;
 
 import android.content.Context;

+ 16 - 0
bannerview/src/main/java/com/zhpan/bannerview/BaseBannerAdapter.java

@@ -1,3 +1,19 @@
+/*
+Copyright 2017 zhpanvip The BannerViewPager Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+ */
+
 package com.zhpan.bannerview;
 
 import android.view.LayoutInflater;

+ 15 - 0
bannerview/src/main/java/com/zhpan/bannerview/BaseViewHolder.java

@@ -1,3 +1,18 @@
+/*
+Copyright 2017 zhpanvip The BannerViewPager Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+ */
 package com.zhpan.bannerview;
 
 import android.graphics.Bitmap;

+ 16 - 0
bannerview/src/main/java/com/zhpan/bannerview/annotation/AIndicatorGravity.java

@@ -1,3 +1,19 @@
+/*
+Copyright 2017 zhpanvip The BannerViewPager Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+ */
+
 package com.zhpan.bannerview.annotation;
 
 import androidx.annotation.IntDef;

+ 16 - 0
bannerview/src/main/java/com/zhpan/bannerview/annotation/APageStyle.java

@@ -1,3 +1,19 @@
+/*
+Copyright 2017 zhpanvip The BannerViewPager Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+ */
+
 package com.zhpan.bannerview.annotation;
 
 import androidx.annotation.IntDef;

+ 16 - 0
bannerview/src/main/java/com/zhpan/bannerview/annotation/Visibility.java

@@ -1,3 +1,19 @@
+/*
+Copyright 2017 zhpanvip The BannerViewPager Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+ */
+
 package com.zhpan.bannerview.annotation;
 
 import android.view.View;

+ 16 - 0
bannerview/src/main/java/com/zhpan/bannerview/constants/IndicatorGravity.java

@@ -1,3 +1,19 @@
+/*
+Copyright 2017 zhpanvip The BannerViewPager Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+ */
+
 package com.zhpan.bannerview.constants;
 
 /**

+ 16 - 0
bannerview/src/main/java/com/zhpan/bannerview/constants/PageStyle.java

@@ -1,3 +1,19 @@
+/*
+Copyright 2017 zhpanvip The BannerViewPager Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+ */
+
 package com.zhpan.bannerview.constants;
 
 /**

+ 19 - 3
bannerview/src/main/java/com/zhpan/bannerview/indicator/DrawableIndicator.kt

@@ -1,3 +1,19 @@
+/*
+Copyright 2017 zhpanvip The BannerViewPager Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+ */
+
 package com.zhpan.bannerview.indicator
 
 import android.content.Context
@@ -184,11 +200,11 @@ class DrawableIndicator @JvmOverloads constructor(
     drawable?.let {
       if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
         drawable = DrawableCompat.wrap(drawable!!)
-            .mutate()
+          .mutate()
       }
       val bitmap = Bitmap.createBitmap(
-          drawable!!.intrinsicWidth,
-          drawable!!.intrinsicHeight, Bitmap.Config.ARGB_8888
+        drawable!!.intrinsicWidth,
+        drawable!!.intrinsicHeight, Bitmap.Config.ARGB_8888
       )
       val canvas = Canvas(bitmap)
       drawable!!.setBounds(0, 0, canvas.width, canvas.height)

+ 16 - 0
bannerview/src/main/java/com/zhpan/bannerview/manager/AttributeController.java

@@ -1,3 +1,19 @@
+/*
+Copyright 2017 zhpanvip The BannerViewPager Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+ */
+
 package com.zhpan.bannerview.manager;
 
 import android.content.Context;

+ 16 - 0
bannerview/src/main/java/com/zhpan/bannerview/manager/BannerManager.java

@@ -1,3 +1,19 @@
+/*
+Copyright 2017 zhpanvip The BannerViewPager Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+ */
+
 package com.zhpan.bannerview.manager;
 
 import android.content.Context;

+ 16 - 0
bannerview/src/main/java/com/zhpan/bannerview/manager/BannerOptions.java

@@ -1,3 +1,19 @@
+/*
+Copyright 2017 zhpanvip The BannerViewPager Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+ */
+
 package com.zhpan.bannerview.manager;
 
 import android.view.View;

+ 16 - 0
bannerview/src/main/java/com/zhpan/bannerview/provider/ReflectLayoutManager.java

@@ -1,3 +1,19 @@
+/*
+Copyright 2017 zhpanvip The BannerViewPager Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+ */
+
 package com.zhpan.bannerview.provider;
 
 import androidx.recyclerview.widget.LinearLayoutManager;

+ 14 - 0
bannerview/src/main/java/com/zhpan/bannerview/provider/RoundViewOutlineProvider.java

@@ -1,4 +1,18 @@
+/*
+Copyright 2017 zhpanvip The BannerViewPager Open Source Project
 
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+ */
 
 package com.zhpan.bannerview.provider;
 

+ 16 - 0
bannerview/src/main/java/com/zhpan/bannerview/provider/ScrollDurationManger.java

@@ -1,3 +1,19 @@
+/*
+Copyright 2017 zhpanvip The BannerViewPager Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+ */
+
 package com.zhpan.bannerview.provider;
 
 import android.graphics.Rect;

+ 13 - 0
bannerview/src/main/java/com/zhpan/bannerview/provider/ViewStyleSetter.java

@@ -1,5 +1,18 @@
+/*
+Copyright 2017 zhpanvip The BannerViewPager Open Source Project
 
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
 
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+ */
 package com.zhpan.bannerview.provider;
 
 import android.os.Build;

+ 17 - 2
bannerview/src/main/java/com/zhpan/bannerview/transform/OverlapPageTransformer.kt

@@ -1,3 +1,18 @@
+/*
+Copyright 2017 zhpanvip The BannerViewPager Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+ */
 package com.zhpan.bannerview.transform
 
 import android.os.Build
@@ -24,7 +39,7 @@ class OverlapPageTransformer(
   init {
     require(minScale in 0f..1f) { "minScale value should be between 1.0 to 0.0" }
     require(
-        unSelectedItemAlpha in 0f..1f
+      unSelectedItemAlpha in 0f..1f
     ) { "unSelectedItemAlpha value should be between 1.0 to 0.0" }
   }
 
@@ -72,7 +87,7 @@ class OverlapPageTransformer(
               }
         }
         else -> throw IllegalArgumentException(
-            "Gives correct orientation value, ViewPager2.ORIENTATION_HORIZONTAL or ViewPager2.ORIENTATION_VERTICAL"
+          "Gives correct orientation value, ViewPager2.ORIENTATION_HORIZONTAL or ViewPager2.ORIENTATION_VERTICAL"
         )
       }
 

+ 15 - 0
bannerview/src/main/java/com/zhpan/bannerview/transform/ScaleInTransformer.java

@@ -1,3 +1,18 @@
+/*
+Copyright 2017 zhpanvip The BannerViewPager Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+ */
 package com.zhpan.bannerview.transform;
 
 import android.view.View;

+ 15 - 0
bannerview/src/main/java/com/zhpan/bannerview/utils/BannerUtils.java

@@ -1,3 +1,18 @@
+/*
+Copyright 2017 zhpanvip The BannerViewPager Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+ */
 package com.zhpan.bannerview.utils;
 
 import android.content.res.Resources;