From 2f6654cf7616773c98ffd410df93b840c677dd1d Mon Sep 17 00:00:00 2001 From: Conny Duck Date: Fri, 8 Mar 2024 10:13:35 +0100 Subject: [PATCH] replace CircularImageView with ShapeableImageView --- library/build.gradle | 1 - .../java/candybar/lib/adapters/AboutAdapter.java | 7 ++----- .../layout-land/fragment_about_item_header.xml | 12 +++++------- .../res/layout/fragment_about_item_header.xml | 12 +++++------- library/src/main/res/xml/dashboard_licenses.xml | 16 ---------------- 5 files changed, 12 insertions(+), 36 deletions(-) diff --git a/library/build.gradle b/library/build.gradle index 1d983cdef..39cd3246e 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -119,7 +119,6 @@ dependencies { implementation 'com.squareup.okhttp3:okhttp:4.3.0' implementation 'com.afollestad.material-dialogs:core:0.9.6.0' implementation 'com.afollestad.material-dialogs:commons:0.9.6.0' - implementation 'com.mikhaellopez:circularimageview:3.0.2' implementation 'com.github.chrisbanes:PhotoView:1.3.1' implementation 'me.grantland:autofittextview:0.2.1' implementation 'com.github.KeepSafe:TapTargetView:1.9.1' diff --git a/library/src/main/java/candybar/lib/adapters/AboutAdapter.java b/library/src/main/java/candybar/lib/adapters/AboutAdapter.java index 2d89a72e8..897e9434d 100644 --- a/library/src/main/java/candybar/lib/adapters/AboutAdapter.java +++ b/library/src/main/java/candybar/lib/adapters/AboutAdapter.java @@ -33,7 +33,6 @@ import com.danimahardhika.android.helpers.core.DrawableHelper; import com.danimahardhika.android.helpers.core.utils.LogUtil; import com.google.android.material.card.MaterialCardView; -import com.mikhaellopez.circularimageview.CircularImageView; import java.util.HashMap; @@ -194,7 +193,7 @@ public int getItemViewType(int position) { private class HeaderViewHolder extends RecyclerView.ViewHolder { private final ImageView image; - private final CircularImageView profile; + private final ImageView profile; HeaderViewHolder(View itemView) { super(itemView); @@ -254,9 +253,7 @@ private class HeaderViewHolder extends RecyclerView.ViewHolder { if (!Preferences.get(mContext).isCardShadowEnabled()) { if (card != null) card.setCardElevation(0); - - profile.setShadowRadius(0f); - profile.setShadowColor(Color.TRANSPARENT); + profile.setElevation(0); } subtitle.setText(HtmlCompat.fromHtml( diff --git a/library/src/main/res/layout-land/fragment_about_item_header.xml b/library/src/main/res/layout-land/fragment_about_item_header.xml index c9a9b5482..b2f74fdfe 100644 --- a/library/src/main/res/layout-land/fragment_about_item_header.xml +++ b/library/src/main/res/layout-land/fragment_about_item_header.xml @@ -27,17 +27,15 @@ app:heightRatio="7" app:widthRatio="16" /> - + android:layout_marginTop="@dimen/about_profile_margin_top" + android:background="?cb_cardBackground" + android:elevation="4dp" + app:shapeAppearanceOverlay="@style/ShapeAppearance.Material3.Corner.Full" /> - + android:layout_marginTop="@dimen/about_profile_margin_top" + android:background="?cb_cardBackground" + android:elevation="4dp" + app:shapeAppearanceOverlay="@style/ShapeAppearance.Material3.Corner.Full" /> - - Copyright (c) 2016 Lopez Mikhael - - 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. - - Copyright (c) 2016 Rafał Kobyłko