1

By default android has the back button as an arrow pointing left. Also by default when I open the Android keyboard, the back button "rotates" now pointing downwards (this is normal, because at that moment the back button would close the keyboard).

I created my own custom keyboard, which has nothing to do with that of the Android system. And now I don't know how to program that back button, so that it "rotate" like it's the system keyboard.

From what I've read, WillPopScope should programmatically override the button, but the crux of the rotation remains, I don't know if it can, or possibly how to rotate that back button so that it points downwards.

// How is the back button when my keyboard opens 2

//How I would like the back button when my keyboard opens 1

Francesco - FL
  • 603
  • 1
  • 4
  • 25
  • The back button is just an icon, I think. Try replacing it with a downward pointing arrow icon instead of thinking how to rotate. – Roslan Amir Jan 06 '23 at 04:14
  • @RoslanAmir https://developer.android.com/guide/navigation/navigation-custom-back – Rahul Variya Jan 06 '23 at 04:15
  • The question is about the arrow pointing downwards instead of left. Nothing about changing the functionality. – Roslan Amir Jan 06 '23 at 04:17
  • @Roslan Amir I'd be fine with it, but the problem is that I don't know how to do it, being a system icon, how do I replace it? – Francesco - FL Jan 06 '23 at 04:33
  • I thought you mentioned you created your own custom keyboard. I would assume that includes all the icons being displayed. Sorry. I have no idea how. – Roslan Amir Jan 06 '23 at 06:45
  • However your comment helped me think of a workaround. I found this article https://www.kindacode.com/article/flutter-customize-the-android-system-navigation-bar/ which explains how to hide and re-enable system navigation bar. I added to my keyboard a bottom banner the size of the navigation bar with a button to lower the keyboard. So when I open the keyboard, I hide the system navigation bar and show the button to lower it. Then when I close it and hide the keyboard, I re-enable the navigation bar. – Francesco - FL Jan 06 '23 at 15:05
  • Unfortunately I found some errors in this regard. On the Motorola g22 Android 12 when I click on my keyboard, the system navigation bar stays hidden as per my command. On a Xiaomi Redmi Note 8 Android 11, however, as soon as I click on my keyboard, the navigation bar automatically reappears – Francesco - FL Jan 25 '23 at 14:58

0 Answers0