Widget/compatibility

This commit is contained in:
M66B 2022-05-10 22:21:43 +02:00
parent 3b0f2afd7b
commit beb1c3dda8
3 changed files with 4 additions and 3 deletions

View File

@ -63,7 +63,8 @@ public class WidgetSync extends AppWidgetProvider {
views.setOnClickPendingIntent(R.id.ivSync, pi);
views.setImageViewResource(R.id.ivSync, enabled ? R.drawable.twotone_sync_24 : R.drawable.twotone_sync_disabled_24);
views.setFloat(R.id.ivSync, "setAlpha", !enabled || connected ? 1.0f : Helper.LOW_LIGHT);
views.setInt(R.id.ivSync, "setImageAlpha",
!enabled || connected ? 255 : Math.round(Helper.LOW_LIGHT * 255));
if (!daynight && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
views.setColorStateListAttr(R.id.background, "setBackgroundTintList", 0);

View File

@ -95,5 +95,5 @@
android:id="@+id/separator"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:colorControlNormal" />
android:background="@color/grey" />
</LinearLayout>

View File

@ -57,7 +57,7 @@
android:id="@+id/separator"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:colorControlNormal" />
android:background="@color/grey" />
<ListView
android:id="@+id/lv"