From 251cc9652892fc93f6ef9310b9181f61bac833a9 Mon Sep 17 00:00:00 2001 From: Luis Guzman Date: Thu, 6 Aug 2026 13:38:31 -0600 Subject: [PATCH] ADFA-4947: make the feedback FAB distinct from cards (teal tint) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The draggable feedback FAB used the default FloatingActionButton background, which resolved to the same surface as k2go_card_bg (k2go_surface) in both light and dark themes. Since the button floats and can be moved over any card, it blended into whatever card it hovered over and was hard to make out. Tint it in FeedbackFab.installOn with the teal accent (k2go_teal) and an on-teal icon (k2go_on_teal) — both flip day/night — so it stays distinct from the cards in either theme; the FAB's default elevation already provides the floating shadow. Applies to every redesign screen, since the FAB is created centrally in installOn. The terminal's FAB (main.xml, over a black background) is left as-is. --- .../controller/feedback/presentation/FeedbackFab.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/controller/app/src/main/java/org/iiab/controller/feedback/presentation/FeedbackFab.java b/controller/app/src/main/java/org/iiab/controller/feedback/presentation/FeedbackFab.java index e1e94b1c..712a10f2 100644 --- a/controller/app/src/main/java/org/iiab/controller/feedback/presentation/FeedbackFab.java +++ b/controller/app/src/main/java/org/iiab/controller/feedback/presentation/FeedbackFab.java @@ -134,12 +134,21 @@ public static void installOn(android.app.Activity activity, String screenTag, in if (root == null || root.findViewById(org.iiab.controller.R.id.fab_feedback) != null) { return; } + float d = activity.getResources().getDisplayMetrics().density; FloatingActionButton fab = new FloatingActionButton(activity); fab.setId(org.iiab.controller.R.id.fab_feedback); fab.setImageResource(org.iiab.controller.R.drawable.ic_feedback_24); fab.setContentDescription(activity.getString(org.iiab.controller.R.string.feedback_send)); fab.setUseCompatPadding(true); - float d = activity.getResources().getDisplayMetrics().density; + // ADFA-4947: the default FAB background resolved to the same surface as k2go_card_bg + // (k2go_surface) in both themes, so this floating, draggable button blended into whatever card + // it hovered over. Tint it with the teal accent + on-teal icon (both flip day/night) so it + // stays clearly distinct from the cards in either theme (the FAB's default elevation already + // gives the floating shadow). + fab.setBackgroundTintList(android.content.res.ColorStateList.valueOf( + androidx.core.content.ContextCompat.getColor(activity, org.iiab.controller.R.color.k2go_teal))); + fab.setImageTintList(android.content.res.ColorStateList.valueOf( + androidx.core.content.ContextCompat.getColor(activity, org.iiab.controller.R.color.k2go_on_teal))); int m = Math.round(16 * d); android.widget.FrameLayout.LayoutParams lp = new android.widget.FrameLayout.LayoutParams( android.view.ViewGroup.LayoutParams.WRAP_CONTENT,