Forum > Android

[LAMW] jButton - problems of using

(1/3) > >>

bmcsoft:
We use in our program Jbutton as part of the chessboard.
There are 2 problem:

1. On the different Android device Jbutton captions looks very different. I run the same apk file on 2 different devices. 
On  the first  the first device the captions of Jbuttons is good (see attached screenshot 1), but on the second device the captions almost invisible (see attached screenshot 2).

Can this problem be solved? Can Jbutton caption be seen properly on any type of Android device?

2.We need to have 2 different types of pressing JButton. On PC It was left and right mouse click. Can 2 types of pressing be made with the Jbutton? For example short tap and long tap?

jmpessoa:

--- Quote ---Can Jbutton caption be seen properly on any type of Android device?

--- End quote ---

How you set properties "LayoutParamHeight'    and LayoutParamWidth" ?



--- Quote ---Can 2 types of pressing be made with the Jbutton? For example short tap and long tap?

--- End quote ---

I will try some solution...

mihhim:

--- Quote from: jmpessoa on February 06, 2021, 07:43:13 pm ---
--- Quote ---Can Jbutton caption be seen properly on any type of Android device?

--- End quote ---

How you set properties "LayoutParamHeight'    and LayoutParamWidth" ?


--- End quote ---
LayoutParamHeight and LayoutParamWidth = IpExact


--- Quote ---
--- Quote ---Can 2 types of pressing be made with the Jbutton? For example short tap and long tap?

--- End quote ---

I will try some solution...

--- End quote ---
Thanks

bmcsoft:
Mihhim and me work together on the same problem. We want to create playable chessboard with figures and symbols on it.

jmpessoa, if we will use jGridView instead of jButton, can we use 2 types of pressing?

Also we need to swipe board left to show chatbox. Where we can read about using navigation gestures in LAMW?

jmpessoa:

--- Quote ---LayoutParamHeight and LayoutParamWidth = IpExact

--- End quote ---

"IpExact"  not scale ....

So, on the different Android devices Jbutton looks very different!

You need jPanel and more jPanels.....

I will try to do some example and put here....

Navigation

[0] Message Index

[#] Next page

Go to full version