Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace CircularImageView with ShapeableImageView #181

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
7 changes: 2 additions & 5 deletions library/src/main/java/candybar/lib/adapters/AboutAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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(
Expand Down
12 changes: 5 additions & 7 deletions library/src/main/res/layout-land/fragment_about_item_header.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,15 @@
app:heightRatio="7"
app:widthRatio="16" />

<com.mikhaellopez.circularimageview.CircularImageView
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/profile"
android:layout_width="@dimen/about_profile"
android:layout_height="@dimen/about_profile"
android:layout_marginTop="@dimen/about_profile_margin_top"
android:layout_gravity="center_horizontal"
app:civ_border_color="?cb_cardBackground"
app:civ_border_width="@dimen/about_profile_border"
app:civ_shadow="true"
app:civ_shadow_radius="12"
app:civ_shadow_color="#22000000" />
android:layout_marginTop="@dimen/about_profile_margin_top"
android:background="?cb_cardBackground"
android:elevation="4dp"
app:shapeAppearanceOverlay="@style/ShapeAppearance.Material3.Corner.Full" />

<TextView
android:layout_width="match_parent"
Expand Down
12 changes: 5 additions & 7 deletions library/src/main/res/layout/fragment_about_item_header.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@
app:heightRatio="7"
app:widthRatio="16" />

<com.mikhaellopez.circularimageview.CircularImageView
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/profile"
android:layout_width="@dimen/about_profile"
android:layout_height="@dimen/about_profile"
android:layout_marginTop="@dimen/about_profile_margin_top"
android:layout_gravity="center_horizontal"
app:civ_border_color="?cb_cardBackground"
app:civ_border_width="@dimen/about_profile_border"
app:civ_shadow="true"
app:civ_shadow_radius="12"
app:civ_shadow_color="#22000000" />
android:layout_marginTop="@dimen/about_profile_margin_top"
android:background="?cb_cardBackground"
android:elevation="4dp"
app:shapeAppearanceOverlay="@style/ShapeAppearance.Material3.Corner.Full" />

<TextView
android:layout_width="match_parent"
Expand Down
16 changes: 0 additions & 16 deletions library/src/main/res/xml/dashboard_licenses.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,22 +121,6 @@
limitations under the License.
</license>

<license name="Circular ImageView">
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.
</license>

<license name="DrawMe">
Copyright (c) 2016 Rafał Kobyłko

Expand Down
Loading