fix for wearableVersion update

This commit is contained in:
AdrianLxM 2021-02-14 18:20:31 +01:00 committed by GitHub
parent 738c3585d5
commit fc2389e8c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,10 +1,8 @@
package info.nightscout.androidaps.interaction.utils;
import android.content.Context;
import android.graphics.drawable.GradientDrawable;
import android.support.wearable.view.WearableListView;
import android.util.AttributeSet;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
@ -21,8 +19,6 @@ public class WearableListItemLayout extends LinearLayout
private TextView mName;
private final float mFadedTextAlpha;
private final int mFadedCircleColor;
private final int mChosenCircleColor;
public WearableListItemLayout(Context context) {
this(context, null);
@ -37,27 +33,22 @@ public class WearableListItemLayout extends LinearLayout
super(context, attrs, defStyle);
mFadedTextAlpha = 40 / 100f;
mFadedCircleColor = getResources().getColor(R.color.grey);
mChosenCircleColor = getResources().getColor(R.color.blue);
}
// Get references to the icon and text in the item layout definition
@Override
protected void onFinishInflate() {
super.onFinishInflate();
//mCircle = (ImageView) findViewById(R.id.circle);
mName = findViewById(R.id.actionitem);
}
@Override
public void onCenterPosition(boolean animate) {
mName.setAlpha(1f);
//((GradientDrawable) mCircle.getDrawable()).setColor(mChosenCircleColor);
}
@Override
public void onNonCenterPosition(boolean animate) {
//((GradientDrawable) mCircle.getDrawable()).setColor(mFadedCircleColor);
mName.setAlpha(mFadedTextAlpha);
}
}