Android Question Highlight or enlarge or set focus to "active" button in Android TVs

luisftv

Member
Licensed User
Hi,

I searched (maybe not deep enough) through the forum about this question but I didn't find anything.

I recently bought a Sony Android TV with the intention to use the apps I made with B4A. They work flawlessly! Thanks Erel! Your programming languages are awesome.

Now the question...

On the Sony Android TV, the icon or button I am about to press (like the Netflix icon, or the TV Settings icon/button, etc) becomes highlighted or enlarged as I navigate through the options. My apps do not react that way. Once my app is running, inside my app, I have to guess which button I am about to press by counting how many times I press the remote control button (either left or right or up or down).

How or what's the code to make the buttons on my apps show a "highlight" or "Enlarge" or something indicating that if I tap, click, or press "that" button it will activate, and remain highlighted or enlarged (indicating where the cursor or active button is) until I press another button, just like all other apps in the Android TV do?

By the way, I noticed that many apps on phones/tablets do have this "active" or "current" button status highlighting or enlarging feature. How do they do it?

Thanks in advanced.
 

luisftv

Member
Licensed User
I'm glad you got it.

Yes, if I had a complaint about B4A it would be the lack of a dedicated option for width/height and position or grid alignment in the "Designer". I hope Erel adds that soon...

The "Horizontal/Vertical", "Distance from Left/Right", or "Anchor" control are not time saving... they are very useful, but not ideal. There should be an "X, Y" positioning, and the actual/real "Width/Height" of each element, box, object, etc. Erel, please, please, can you add those feature?

At the beginning I was also having trouble making the code work with the emulators. If it worked with the emulator it did not with the actual TV, and vice versa. The emulator is the fastest and more convenient way of testing the app, but the real test is only with the actual devise, the real TV or phone/tablet. I noticed that my TVs keep updating the OS automatically and therefore something withing the code must be changed in my apps, specially (and perhaps mainly), I must keep my java and android.jar versions updated. I have't had any problems since I started updating to the latest versions.

Have fun.
 
Upvote 0

Erel

Administrator
Staff member
Licensed User
There should be an "X, Y" positioning, and the actual/real "Width/Height" of each element, box, object, etc. Erel, please, please, can you add those feature?
Not sure that I understand. This is the default case (if the anchors are set to LEFT and TOP).

Assuming that the variant scale is 1, which it should be, then a length of 160 equals one inch. On all devices.
 
Upvote 0

luisftv

Member
Licensed User
Hi Erel,

I cannot -ever- thank you enough for the awesome software you develop. Thank you. I will always renew my subscription, it's the least I can do.

Please see attached to see what I mean.

I would really love those changes, if possible. It would make it much more easy and faster to adjust the size/positions of objects in the designer. I don't mean that B4A doesn't do it now, just that it's confusing and slows me down a lot. I'm absolutely sure those changes would be loved by novice and advanced users and make the app more friendly.

Thanks.
 

Attachments

  • B4A - Object Alignment Feature Request.pdf
    198.2 KB · Views: 158
  • B4A - Object Alignment Feature Request 2.jpg
    B4A - Object Alignment Feature Request 2.jpg
    5.5 KB · Views: 160
  • B4A - Object Alignment Feature Request 1.jpg
    B4A - Object Alignment Feature Request 1.jpg
    13.8 KB · Views: 152
Last edited:
Upvote 0

luisftv

Member
Licensed User
On this particular example (from the PDF or the screenshots), I have three different layouts (small phones, tablets, and TV). If I don't use BOTH, the buttons don't show in the right place (and I have buttons and labels on top and very close too each other in some activities).

But, the ANCHOR is not the ONE thing I would love implemented (I'm fine with that): It's the Width and Size properties. It's rather cumbersome to figure out the actual width and size of any object since it is not measuring the actual object's perimeter but rather the object's frame (right edge, or left edge, top or bottom edge/frame) distance from the screen edge.

In other words, instead determining the object's size by measuring the object's distance from the edge of the screen, why not measure the object's actual perimeter (also known as width and height) regardless of how far or close to the screen edge?

I know how hard is to re-code a program... so, I'm not going to push it, and as a matter of fact, it only improves the user interaction. B4A works beautifully already. I just thought of expressing my only tiny bitty kind of complaint.

Thanks Erel.
 
Upvote 0

Similar Threads

Top