Merge pull request #322 from nightscout/dependabot/gradle/dev/wearableVersion-2.8.1
Bump wearableVersion from 2.4.0 to 2.8.1
This commit is contained in:
commit
2f7374aca8
|
@ -19,7 +19,7 @@ jacoco {
|
||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
wearableVersion = "2.4.0"
|
wearableVersion = "2.8.1"
|
||||||
playServicesWearable = "17.0.0"
|
playServicesWearable = "17.0.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
package info.nightscout.androidaps.interaction.utils;
|
package info.nightscout.androidaps.interaction.utils;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.drawable.GradientDrawable;
|
|
||||||
import android.support.wearable.view.WearableListView;
|
import android.support.wearable.view.WearableListView;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
@ -21,8 +19,6 @@ public class WearableListItemLayout extends LinearLayout
|
||||||
private TextView mName;
|
private TextView mName;
|
||||||
|
|
||||||
private final float mFadedTextAlpha;
|
private final float mFadedTextAlpha;
|
||||||
private final int mFadedCircleColor;
|
|
||||||
private final int mChosenCircleColor;
|
|
||||||
|
|
||||||
public WearableListItemLayout(Context context) {
|
public WearableListItemLayout(Context context) {
|
||||||
this(context, null);
|
this(context, null);
|
||||||
|
@ -37,27 +33,22 @@ public class WearableListItemLayout extends LinearLayout
|
||||||
super(context, attrs, defStyle);
|
super(context, attrs, defStyle);
|
||||||
|
|
||||||
mFadedTextAlpha = 40 / 100f;
|
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
|
// Get references to the icon and text in the item layout definition
|
||||||
@Override
|
@Override
|
||||||
protected void onFinishInflate() {
|
protected void onFinishInflate() {
|
||||||
super.onFinishInflate();
|
super.onFinishInflate();
|
||||||
//mCircle = (ImageView) findViewById(R.id.circle);
|
|
||||||
mName = findViewById(R.id.actionitem);
|
mName = findViewById(R.id.actionitem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCenterPosition(boolean animate) {
|
public void onCenterPosition(boolean animate) {
|
||||||
mName.setAlpha(1f);
|
mName.setAlpha(1f);
|
||||||
//((GradientDrawable) mCircle.getDrawable()).setColor(mChosenCircleColor);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNonCenterPosition(boolean animate) {
|
public void onNonCenterPosition(boolean animate) {
|
||||||
//((GradientDrawable) mCircle.getDrawable()).setColor(mFadedCircleColor);
|
|
||||||
mName.setAlpha(mFadedTextAlpha);
|
mName.setAlpha(mFadedTextAlpha);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue