ProgressView: remove dead code

This commit is contained in:
Alibek Omarov 2020-01-11 12:41:44 +03:00
parent 24c0c8f656
commit b7db21d8d4
3 changed files with 2 additions and 27 deletions

View File

@ -1,21 +0,0 @@
/* Copyright 2017 Andrew Dawson
*
* This file is a part of Tusky.
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
*
* Tusky is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License along with Tusky; if not,
* see <http://www.gnu.org/licenses>. */
package com.keylesspalace.tusky.components.compose.view;
public interface IProgressView {
public void setProgress(int progress);
public void setChecked(boolean checked);
}

View File

@ -32,7 +32,7 @@ import android.util.AttributeSet;
import com.keylesspalace.tusky.R;
import at.connyduck.sparkbutton.helpers.Utils;
public final class ProgressImageView extends AppCompatImageView implements IProgressView {
public final class ProgressImageView extends AppCompatImageView {
private int progress = -1;
private final RectF progressRect = new RectF();
@ -70,7 +70,6 @@ public final class ProgressImageView extends AppCompatImageView implements IProg
captionDrawable = AppCompatResources.getDrawable(getContext(), R.drawable.spellcheck);
}
@Override
public void setProgress(int progress) {
this.progress = progress;
if (progress != -1) {
@ -81,7 +80,6 @@ public final class ProgressImageView extends AppCompatImageView implements IProg
invalidate();
}
@Override
public void setChecked(boolean checked) {
this.markBgPaint.setColor(ContextCompat.getColor(getContext(),
checked ? R.color.tusky_blue : R.color.description_marker_unselected));

View File

@ -32,7 +32,7 @@ import android.util.AttributeSet;
import com.keylesspalace.tusky.R;
import at.connyduck.sparkbutton.helpers.Utils;
public final class ProgressTextView extends AppCompatTextView implements IProgressView {
public final class ProgressTextView extends AppCompatTextView {
private int progress = -1;
private final RectF progressRect = new RectF();
@ -70,13 +70,11 @@ public final class ProgressTextView extends AppCompatTextView implements IProgre
captionDrawable = AppCompatResources.getDrawable(getContext(), R.drawable.spellcheck);
}
@Override
public void setProgress(int progress) {
this.progress = progress;
invalidate();
}
@Override
public void setChecked(boolean checked) {
this.markBgPaint.setColor(ContextCompat.getColor(getContext(),
checked ? R.color.tusky_blue : R.color.description_marker_unselected));