Impl highlight effect on BatteryChartView slots.
Screenshot: https://screenshot.googleplex.com/F5VrGjj5kdNHMV6 Bug: 284893240 Bug: 291689623 Test: manual Change-Id: I846d95d31e8bb839481b86a94d5191ff205f8328
This commit is contained in:
@@ -55,6 +55,7 @@ class BatteryChartViewModel {
|
||||
private final String[] mFullTexts;
|
||||
|
||||
private int mSelectedIndex = SELECTED_INDEX_ALL;
|
||||
private int mHighlightSlotIndex = SELECTED_INDEX_INVALID;
|
||||
|
||||
BatteryChartViewModel(@NonNull List<Integer> levels, @NonNull List<Long> timestamps,
|
||||
@NonNull AxisLabelPosition axisLabelPosition,
|
||||
@@ -106,6 +107,14 @@ class BatteryChartViewModel {
|
||||
mSelectedIndex = index;
|
||||
}
|
||||
|
||||
public int getHighlightSlotIndex() {
|
||||
return mHighlightSlotIndex;
|
||||
}
|
||||
|
||||
public void setHighlightSlotIndex(int index) {
|
||||
mHighlightSlotIndex = index;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(mLevels, mTimestamps, mSelectedIndex, mAxisLabelPosition);
|
||||
|
Reference in New Issue
Block a user