0

This is my first question, so I hope I didn't miss anything :)

In my project I encounter this issue: when I try to use an Android clipboard it appears with really big padding. I know that in API 33 Android added a new clipboard, so I also tried it on API level 30 - still this problem.

screen_1

screen_1 with clipboard

screen_2

screen_2 with clipboard

My first guess - I messed up with popup windows (I use them in my project). So I deleted all usages of the popup window in my code, cleaned the build, deleted the app and restarted the phone - still the same. I tried to change some versions of libraries - still the same. Then I tried to create a new project with a popup window just like in my project - and everything is okay. I don't know what code I can add here because I don't understand that can be related, but here is a link to github rep

UPD. I found a solution. In my case my teammate added this line:

<item name="android:background">@color/background</item>

instead of

<item name="android:windowBackground">@color/background</item>

In other words, be careful when you are using themes :)

  • It's a nice question, however, can you post a snipet of your code? Also, they are all EditText fields, right? Because, if so, the clipboard menu should apear with no additional implementation – Leonardo Sibela Mar 02 '23 at 22:05
  • @leonardo, added popup and editText. Do you need smth else? – Андрей Юрко Mar 02 '23 at 22:15
  • I still wonder: The EditText already come with menu with the clipboard option Out-of-the-Box. Isn't that enough for you? – Leonardo Sibela Mar 02 '23 at 22:32
  • I found out you can cofig it if you want: https://stackoverflow.com/a/39532052/3590155 – Leonardo Sibela Mar 02 '23 at 22:34
  • @leonardo Yes, but I use popup not for the clipboard, but for menus (I need more style options). Edittext popup looks like on images I added (this out of the box not working properly and I wonder why) – Андрей Юрко Mar 02 '23 at 22:37
  • So in other words I don't touch the clipboard and use popup windows for different purposes and get this error. I want this out-of-the-box solution to work correctly and I tried to figure out what happened - and still have no clue. – Андрей Юрко Mar 02 '23 at 22:45

1 Answers1

0

I found a solution. In my case my teammate added this line:

<item name="android:background">@color/background</item>

instead of

<item name="android:windowBackground">@color/background</item>

If I understand correctly, "android:background" sets the background color to all widgets, even for the clipboard - and then some mess appears because of some conflicts. This is my guess, so if anyone knows smth about it, please, tell me so I could understand that's going on correctly :)