summaryrefslogtreecommitdiff
path: root/src/com/android/deskclock/timer/TimerSetupView.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/deskclock/timer/TimerSetupView.java')
-rw-r--r--src/com/android/deskclock/timer/TimerSetupView.java31
1 files changed, 2 insertions, 29 deletions
diff --git a/src/com/android/deskclock/timer/TimerSetupView.java b/src/com/android/deskclock/timer/TimerSetupView.java
index 557a7d61a..105d2006d 100644
--- a/src/com/android/deskclock/timer/TimerSetupView.java
+++ b/src/com/android/deskclock/timer/TimerSetupView.java
@@ -17,11 +17,10 @@
package com.android.deskclock.timer;
import android.content.Context;
-import android.content.res.ColorStateList;
import android.content.res.Resources;
-import android.graphics.PorterDuff;
+
import androidx.annotation.IdRes;
-import androidx.core.view.ViewCompat;
+
import android.text.BidiFormatter;
import android.text.TextUtils;
import android.text.format.DateUtils;
@@ -36,7 +35,6 @@ import android.widget.TextView;
import com.android.deskclock.FabContainer;
import com.android.deskclock.FormattedTextUtils;
import com.android.deskclock.R;
-import com.android.deskclock.ThemeUtils;
import com.android.deskclock.uidata.UiDataModel;
import java.io.Serializable;
@@ -55,7 +53,6 @@ public class TimerSetupView extends LinearLayout implements View.OnClickListener
private TextView mTimeView;
private View mDeleteView;
- private View mDividerView;
private TextView[] mDigitViews;
/** Updates to the fab are requested via this container. */
@@ -91,7 +88,6 @@ public class TimerSetupView extends LinearLayout implements View.OnClickListener
mTimeView = (TextView) findViewById(R.id.timer_setup_time);
mDeleteView = findViewById(R.id.timer_setup_delete);
- mDividerView = findViewById(R.id.timer_setup_divider);
mDigitViews = new TextView[] {
(TextView) findViewById(R.id.timer_setup_digit_0),
(TextView) findViewById(R.id.timer_setup_digit_1),
@@ -105,18 +101,6 @@ public class TimerSetupView extends LinearLayout implements View.OnClickListener
(TextView) findViewById(R.id.timer_setup_digit_9),
};
- // Tint the divider to match the disabled control color by default and used the activated
- // control color when there is valid input.
- final Context dividerContext = mDividerView.getContext();
- final int colorControlActivated = ThemeUtils.resolveColor(dividerContext,
- R.attr.colorControlActivated);
- final int colorControlDisabled = ThemeUtils.resolveColor(dividerContext,
- R.attr.colorControlNormal, new int[] { ~android.R.attr.state_enabled });
- ViewCompat.setBackgroundTintList(mDividerView, new ColorStateList(
- new int[][] { { android.R.attr.state_activated }, {} },
- new int[] { colorControlActivated, colorControlDisabled }));
- ViewCompat.setBackgroundTintMode(mDividerView, PorterDuff.Mode.SRC);
-
// Initialize the digit buttons.
final UiDataModel uidm = UiDataModel.getUiDataModel();
for (final TextView digitView : mDigitViews) {
@@ -129,7 +113,6 @@ public class TimerSetupView extends LinearLayout implements View.OnClickListener
mDeleteView.setOnLongClickListener(this);
updateTime();
- updateDeleteAndDivider();
}
public void setFabContainer(FabContainer fabContainer) {
@@ -219,12 +202,6 @@ public class TimerSetupView extends LinearLayout implements View.OnClickListener
r.getQuantityString(R.plurals.seconds, seconds, seconds)));
}
- private void updateDeleteAndDivider() {
- final boolean enabled = hasValidInput();
- mDeleteView.setEnabled(enabled);
- mDividerView.setActivated(enabled);
- }
-
private void updateFab() {
mFabContainer.updateFab(FAB_SHRINK_AND_EXPAND);
}
@@ -258,7 +235,6 @@ public class TimerSetupView extends LinearLayout implements View.OnClickListener
// Update the fab, delete, and divider when we have valid input.
if (mInputPointer == 0) {
updateFab();
- updateDeleteAndDivider();
}
}
@@ -285,7 +261,6 @@ public class TimerSetupView extends LinearLayout implements View.OnClickListener
// Update the fab, delete, and divider when we no longer have valid input.
if (mInputPointer == -1) {
updateFab();
- updateDeleteAndDivider();
}
}
@@ -294,7 +269,6 @@ public class TimerSetupView extends LinearLayout implements View.OnClickListener
Arrays.fill(mInput, 0);
mInputPointer = -1;
updateTime();
- updateDeleteAndDivider();
}
}
@@ -331,7 +305,6 @@ public class TimerSetupView extends LinearLayout implements View.OnClickListener
}
}
updateTime();
- updateDeleteAndDivider();
}
}
}