diff --git a/app/build.gradle b/app/build.gradle index a02c8ad3..f728c46d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -63,7 +63,7 @@ dependencies { implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0' implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0' implementation 'com.pkmmte.view:circularimageview:1.1' - implementation 'com.github.varunest:sparkbutton:1.0.5' + implementation 'com.github.connyduck:sparkbutton:1.0.0' implementation 'com.github.chrisbanes:PhotoView:2.1.3' implementation 'com.mikepenz:google-material-typeface:3.0.1.2.original@aar' implementation('com.theartofdev.edmodo:android-image-cropper:2.7.0') { diff --git a/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java b/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java index 015721b2..b5f8342f 100644 --- a/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java @@ -114,7 +114,7 @@ import com.keylesspalace.tusky.view.TootButton; import com.mikepenz.google_material_typeface_library.GoogleMaterial; import com.mikepenz.iconics.IconicsDrawable; import com.squareup.picasso.Picasso; -import com.varunest.sparkbutton.helpers.Utils; +import at.connyduck.sparkbutton.helpers.Utils; import org.jetbrains.annotations.NotNull; diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java index 091612a3..062781f6 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java @@ -31,8 +31,8 @@ import com.keylesspalace.tusky.view.RoundedTransformation; import com.keylesspalace.tusky.viewdata.StatusViewData; import com.mikepenz.iconics.utils.Utils; import com.squareup.picasso.Picasso; -import com.varunest.sparkbutton.SparkButton; -import com.varunest.sparkbutton.SparkEventListener; +import at.connyduck.sparkbutton.SparkButton; +import at.connyduck.sparkbutton.SparkEventListener; import java.util.Date; import java.util.List; diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusViewHolder.java b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusViewHolder.java index f18e3c7b..0dc0d74c 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusViewHolder.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusViewHolder.java @@ -28,7 +28,7 @@ import com.keylesspalace.tusky.util.ThemeUtils; import com.keylesspalace.tusky.view.RoundedTransformation; import com.keylesspalace.tusky.viewdata.StatusViewData; import com.squareup.picasso.Picasso; -import com.varunest.sparkbutton.helpers.Utils; +import at.connyduck.sparkbutton.helpers.Utils; public class StatusViewHolder extends StatusBaseViewHolder { private ImageView avatarReblog; diff --git a/app/src/main/java/com/keylesspalace/tusky/fragment/ViewThreadFragment.java b/app/src/main/java/com/keylesspalace/tusky/fragment/ViewThreadFragment.java index b5871e7d..05e1cdd7 100644 --- a/app/src/main/java/com/keylesspalace/tusky/fragment/ViewThreadFragment.java +++ b/app/src/main/java/com/keylesspalace/tusky/fragment/ViewThreadFragment.java @@ -216,7 +216,7 @@ public final class ViewThreadFragment extends SFragment implements StatusViewData.Concrete newViewData = viewDataBuilder.createStatusViewData(); statuses.setPairedItem(position, newViewData); - adapter.setItem(position, newViewData, true); + adapter.setItem(position, newViewData, false); } } @@ -249,7 +249,7 @@ public final class ViewThreadFragment extends SFragment implements StatusViewData.Concrete newViewData = viewDataBuilder.createStatusViewData(); statuses.setPairedItem(position, newViewData); - adapter.setItem(position, newViewData, true); + adapter.setItem(position, newViewData, false); } } diff --git a/app/src/main/java/com/keylesspalace/tusky/view/ProgressImageView.java b/app/src/main/java/com/keylesspalace/tusky/view/ProgressImageView.java index c6c215df..9e61417a 100644 --- a/app/src/main/java/com/keylesspalace/tusky/view/ProgressImageView.java +++ b/app/src/main/java/com/keylesspalace/tusky/view/ProgressImageView.java @@ -28,7 +28,7 @@ import android.support.v7.widget.AppCompatImageView; import android.util.AttributeSet; import com.keylesspalace.tusky.R; -import com.varunest.sparkbutton.helpers.Utils; +import at.connyduck.sparkbutton.helpers.Utils; public final class ProgressImageView extends AppCompatImageView { diff --git a/app/src/main/res/layout/item_status.xml b/app/src/main/res/layout/item_status.xml index dd71db81..09d0fb79 100644 --- a/app/src/main/res/layout/item_status.xml +++ b/app/src/main/res/layout/item_status.xml @@ -1,10 +1,13 @@ @@ -124,7 +127,6 @@ android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:layout_below="@+id/status_name_bar" - android:layout_marginBottom="4dp" android:layout_toEndOf="@+id/status_avatar" android:focusable="true" android:lineSpacingMultiplier="1.1" @@ -137,7 +139,6 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/status_content" - android:layout_marginBottom="4dp" android:layout_marginTop="@dimen/status_media_preview_margin_top" android:layout_toEndOf="@+id/status_avatar"> @@ -285,12 +286,13 @@ android:clipChildren="false" android:clipToPadding="false" android:orientation="horizontal" - android:paddingBottom="4dp"> + android:paddingBottom="4dp" + android:paddingTop="4dp"> - + sparkbutton:activeImage="@drawable/reblog_active" + sparkbutton:iconSize="24dp" + sparkbutton:inactiveImage="?attr/status_reblog_inactive_drawable" + sparkbutton:primaryColor="@color/status_reblog_button_marked_dark" + sparkbutton:secondaryColor="@color/status_reblog_button_marked_light" /> - + sparkbutton:activeImage="?attr/status_favourite_active_drawable" + sparkbutton:iconSize="24dp" + sparkbutton:inactiveImage="?attr/status_favourite_inactive_drawable" + sparkbutton:primaryColor="@color/status_favourite_button_marked_dark" + sparkbutton:secondaryColor="@color/status_favourite_button_marked_light" /> @@ -330,18 +333,18 @@ android:layout_height="match_parent" android:layout_weight="1" /> - + sparkbutton:activeImage="@drawable/reblog_active" + sparkbutton:iconSize="28dp" + sparkbutton:inactiveImage="?attr/status_reblog_inactive_drawable" + sparkbutton:primaryColor="@color/status_reblog_button_marked_dark" + sparkbutton:secondaryColor="@color/status_reblog_button_marked_light" /> - + sparkbutton:activeImage="?attr/status_favourite_active_drawable" + sparkbutton:iconSize="28dp" + sparkbutton:inactiveImage="?attr/status_favourite_inactive_drawable" + sparkbutton:primaryColor="@color/status_favourite_button_marked_dark" + sparkbutton:secondaryColor="@color/status_favourite_button_marked_light" /> 4dp 10dp 8dp - 4dp + 8dp 100dp 130dp 8dp