From 1eb78a449323dc4298b938ac9173cfa163967f91 Mon Sep 17 00:00:00 2001 From: zhpanvip Date: Sat, 10 Sep 2022 14:43:52 +0800 Subject: [PATCH] Add license in library class. --- .../com/zhpan/bannerview/BannerViewPager.java | 15 +++++++++++++ .../zhpan/bannerview/BaseBannerAdapter.java | 16 ++++++++++++++ .../com/zhpan/bannerview/BaseViewHolder.java | 15 +++++++++++++ .../annotation/AIndicatorGravity.java | 16 ++++++++++++++ .../bannerview/annotation/APageStyle.java | 16 ++++++++++++++ .../bannerview/annotation/Visibility.java | 16 ++++++++++++++ .../constants/IndicatorGravity.java | 16 ++++++++++++++ .../zhpan/bannerview/constants/PageStyle.java | 16 ++++++++++++++ .../bannerview/indicator/DrawableIndicator.kt | 22 ++++++++++++++++--- .../manager/AttributeController.java | 16 ++++++++++++++ .../bannerview/manager/BannerManager.java | 16 ++++++++++++++ .../bannerview/manager/BannerOptions.java | 16 ++++++++++++++ .../provider/ReflectLayoutManager.java | 16 ++++++++++++++ .../provider/RoundViewOutlineProvider.java | 14 ++++++++++++ .../provider/ScrollDurationManger.java | 16 ++++++++++++++ .../bannerview/provider/ViewStyleSetter.java | 13 +++++++++++ .../transform/OverlapPageTransformer.kt | 19 ++++++++++++++-- .../transform/ScaleInTransformer.java | 15 +++++++++++++ .../zhpan/bannerview/utils/BannerUtils.java | 15 +++++++++++++ 19 files changed, 299 insertions(+), 5 deletions(-) diff --git a/bannerview/src/main/java/com/zhpan/bannerview/BannerViewPager.java b/bannerview/src/main/java/com/zhpan/bannerview/BannerViewPager.java index 76efd11..7826ea8 100644 --- a/bannerview/src/main/java/com/zhpan/bannerview/BannerViewPager.java +++ b/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; diff --git a/bannerview/src/main/java/com/zhpan/bannerview/BaseBannerAdapter.java b/bannerview/src/main/java/com/zhpan/bannerview/BaseBannerAdapter.java index 16bf9cd..4bffde2 100644 --- a/bannerview/src/main/java/com/zhpan/bannerview/BaseBannerAdapter.java +++ b/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; diff --git a/bannerview/src/main/java/com/zhpan/bannerview/BaseViewHolder.java b/bannerview/src/main/java/com/zhpan/bannerview/BaseViewHolder.java index 080dae9..16892ba 100644 --- a/bannerview/src/main/java/com/zhpan/bannerview/BaseViewHolder.java +++ b/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; diff --git a/bannerview/src/main/java/com/zhpan/bannerview/annotation/AIndicatorGravity.java b/bannerview/src/main/java/com/zhpan/bannerview/annotation/AIndicatorGravity.java index a439195..18806a3 100644 --- a/bannerview/src/main/java/com/zhpan/bannerview/annotation/AIndicatorGravity.java +++ b/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; diff --git a/bannerview/src/main/java/com/zhpan/bannerview/annotation/APageStyle.java b/bannerview/src/main/java/com/zhpan/bannerview/annotation/APageStyle.java index ccb10f7..3294d21 100644 --- a/bannerview/src/main/java/com/zhpan/bannerview/annotation/APageStyle.java +++ b/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; diff --git a/bannerview/src/main/java/com/zhpan/bannerview/annotation/Visibility.java b/bannerview/src/main/java/com/zhpan/bannerview/annotation/Visibility.java index 1378d3c..1fe9c7d 100644 --- a/bannerview/src/main/java/com/zhpan/bannerview/annotation/Visibility.java +++ b/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; diff --git a/bannerview/src/main/java/com/zhpan/bannerview/constants/IndicatorGravity.java b/bannerview/src/main/java/com/zhpan/bannerview/constants/IndicatorGravity.java index 0450493..be553e1 100644 --- a/bannerview/src/main/java/com/zhpan/bannerview/constants/IndicatorGravity.java +++ b/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; /** diff --git a/bannerview/src/main/java/com/zhpan/bannerview/constants/PageStyle.java b/bannerview/src/main/java/com/zhpan/bannerview/constants/PageStyle.java index 69c63b1..34b5815 100644 --- a/bannerview/src/main/java/com/zhpan/bannerview/constants/PageStyle.java +++ b/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; /** diff --git a/bannerview/src/main/java/com/zhpan/bannerview/indicator/DrawableIndicator.kt b/bannerview/src/main/java/com/zhpan/bannerview/indicator/DrawableIndicator.kt index 0951b62..d53d5bc 100644 --- a/bannerview/src/main/java/com/zhpan/bannerview/indicator/DrawableIndicator.kt +++ b/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) diff --git a/bannerview/src/main/java/com/zhpan/bannerview/manager/AttributeController.java b/bannerview/src/main/java/com/zhpan/bannerview/manager/AttributeController.java index 8519010..8c328b4 100644 --- a/bannerview/src/main/java/com/zhpan/bannerview/manager/AttributeController.java +++ b/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; diff --git a/bannerview/src/main/java/com/zhpan/bannerview/manager/BannerManager.java b/bannerview/src/main/java/com/zhpan/bannerview/manager/BannerManager.java index a228f25..233646a 100644 --- a/bannerview/src/main/java/com/zhpan/bannerview/manager/BannerManager.java +++ b/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; diff --git a/bannerview/src/main/java/com/zhpan/bannerview/manager/BannerOptions.java b/bannerview/src/main/java/com/zhpan/bannerview/manager/BannerOptions.java index 1079ef6..ecbadf7 100644 --- a/bannerview/src/main/java/com/zhpan/bannerview/manager/BannerOptions.java +++ b/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; diff --git a/bannerview/src/main/java/com/zhpan/bannerview/provider/ReflectLayoutManager.java b/bannerview/src/main/java/com/zhpan/bannerview/provider/ReflectLayoutManager.java index fdb8967..37aadd5 100644 --- a/bannerview/src/main/java/com/zhpan/bannerview/provider/ReflectLayoutManager.java +++ b/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; diff --git a/bannerview/src/main/java/com/zhpan/bannerview/provider/RoundViewOutlineProvider.java b/bannerview/src/main/java/com/zhpan/bannerview/provider/RoundViewOutlineProvider.java index cd1b3f6..4041323 100644 --- a/bannerview/src/main/java/com/zhpan/bannerview/provider/RoundViewOutlineProvider.java +++ b/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; diff --git a/bannerview/src/main/java/com/zhpan/bannerview/provider/ScrollDurationManger.java b/bannerview/src/main/java/com/zhpan/bannerview/provider/ScrollDurationManger.java index d1b9919..4a4b0d6 100644 --- a/bannerview/src/main/java/com/zhpan/bannerview/provider/ScrollDurationManger.java +++ b/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; diff --git a/bannerview/src/main/java/com/zhpan/bannerview/provider/ViewStyleSetter.java b/bannerview/src/main/java/com/zhpan/bannerview/provider/ViewStyleSetter.java index 017e891..473a7a4 100644 --- a/bannerview/src/main/java/com/zhpan/bannerview/provider/ViewStyleSetter.java +++ b/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; diff --git a/bannerview/src/main/java/com/zhpan/bannerview/transform/OverlapPageTransformer.kt b/bannerview/src/main/java/com/zhpan/bannerview/transform/OverlapPageTransformer.kt index a7ec729..e0976f9 100644 --- a/bannerview/src/main/java/com/zhpan/bannerview/transform/OverlapPageTransformer.kt +++ b/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" ) } diff --git a/bannerview/src/main/java/com/zhpan/bannerview/transform/ScaleInTransformer.java b/bannerview/src/main/java/com/zhpan/bannerview/transform/ScaleInTransformer.java index 3b00554..e0e6fa9 100644 --- a/bannerview/src/main/java/com/zhpan/bannerview/transform/ScaleInTransformer.java +++ b/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; diff --git a/bannerview/src/main/java/com/zhpan/bannerview/utils/BannerUtils.java b/bannerview/src/main/java/com/zhpan/bannerview/utils/BannerUtils.java index a0db88e..36a335d 100644 --- a/bannerview/src/main/java/com/zhpan/bannerview/utils/BannerUtils.java +++ b/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;