Device, software version: s60 3rd edition and FP1
Nokia E70, Nokia E90, Nokia n93, Nokia N95
Command button array (CBA) is generally located at the bottom of the s60 mobile phone screen. If the mobile phone supports horizontal screen and vertical screen switching, the position of the CBA is not fixed (depending on the screen ). After the control panel in s60 UI is correctly placed, it can be scaled.ProgramYou should know the correct position of the CBA key.
In some mobile phones (such as Nokia E70, Nokia E90, Nokia n93, and Nokia N95), function keys appear on the left or right of the screen in Landscape mode. If the program needs to adjust the UI (function key position) based on the orientation, you can use
Aknlayoututils: cbalocation ();
To obtain the CBA location.
We will get the following return values:
Enum takncbalocation
{
Eakncbalocationbottom, // landscape and portrait
Eakncbalocationright, // only landscape
Eakncbalocationleft // only landscape
};
When the CBA is located at the bottom of the screen, the OK/options key is always defined on the left, while the opposite cancel/back key is always defined on the right.
When the CBA key is at both ends of the screen, the left function key of most devices is always at the bottom, but there are also columns, such as Nokia E90, which is at the top.
Without an API, you can directly solve the function key sequence problem, but you can monitor the key position using the following method:
Tbool isoptionsbuttonontop ()
{
Ceikbuttongroupcontainer * CBA = ceikbuttongroupcontainer: Current ();
If (! CBA)
{
Return efalse;
}
// Assumes that CBA has options and Exit commands
Ccoecontrol * Options = CBA-> controlornull (eaknsoftkeyoptions );
Ccoecontrol * exit = CBA-> controlornull (eaknsoftkeyexit );
If (options & Exit)
{
If (options-> position (). Iy <exit-> position (). Iy)
{
Return etrue;
}
}
Return efalse;
}
Related wiki articles
no related wiki articles found