Android Question IME HeightChanged event in a custom view

LucaMs

Expert
Licensed User
Longtime User
I have to ask a complicated question and, unfortunately, in English.

How to manage the HeightChanged event within a custom view.

For the moment, I "force" the user (programmer) to add the IME library in its Activity and call a routine of the view class, for example: Public Sub Keyboard_HeightChanged.

In addition, we must consider that the user can have more than one custom view in a layout.

Can I do it in a different way?

This makes me think of a question for which I open this new thread.
 

LucaMs

Expert
Licensed User
Longtime User
I'm struggling with the construction of a sort of SpinnerSearch.

I have a custom spinner, consisting of an EditText and two buttons.
I would like to replace the EditText with a SearchView (yours with a few changes).

The SearchView contains a ListView, which is added to the Parent of SpinnerSearch (let's Main Activity).

Depending on the position of the SpinnerSearch, the listview must be positioned above or below, according to the space available and the spinner must change its position when the keyboard changes appears/disappears.

In short, it's complicated!

It works, but forcing the programmer to do what I wrote in #1.

I could create the SpinnerSearch in a single class module, and probably I would not have that problem, but I would also like to be able to reuse the code, in this case the SearchView.


Another problem (yes, I will open a new post for this ) is that the ListView must close when the SpinnerSearch loses focus, but the spinner does not lose focus if you click on a button, for example.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…