I am creating my first ever android app which is a English-Metric Unit Converter. It contains 5 radio buttons and 2 Spinners. radio buttons are the measurement types(Area, Length, Weight, Volume and temperature) while spinners provides choices whether into what measurement system the user wants to convert it with.Both spinners has the same Value namely : "English" and "Metric". the first spinner is labeled as "Convert from:" while the second is "Convert to:". to convert, user must first identify :
1.Measurement type,
2.From what measurement system and
3.Into what measurement system he wants.
When "NEXT" button it clicked, the conversion layout will open but will depend on this 3.
I wanted it to be:
if spinner1 is set to "English", spinner 2 must be automatically set to "Metric". in additional, spinners must not have the same value. Can anyone help me with this? i needed it badly.
Thanks.
Related
Hi :) I would like to ask you about how to treat elements that compose a list, but whom have assiged a button role and are put in side panel ( so it is not a menu or dropdown). My main problem is how to decide is to where ARROWS should works and where TAB.
Moreover I have a differ types of list items that consist of:
checkbox/ radiobutton only
checkbox/ radiobutton with a link to another panel
two icons/ buttons that has defined an activities etc.
Please look at pictures and help me please :)
PINK - "arrows"
BLUE - "TAB"key
You should hardly decide which component will use TAB key or Arrow Keys. Keyboard accessibility for a large number of components is already defined in WAI-ARIA Authoring Practices.
Adding a different behavior could create issues to both sighted, and non-sighted users because they'll already be knowing which key to use based on the component or they'll know intuitively because of standard roles or they'll know as they use keyboard more to browse.
Offer List
Listbox will work. Arrow Keys to navigate and Enter key to perform the action.
List of Checkboxes and Radio Buttons
I would recommend to keep Checkboxes and Radio Buttons to their default keyboard behavior. Since your cases are more of a list, you can convert the list of checkboxes and radio buttons to Single Select and Multi Select Listboxes and use Checkbox and Radio Button as a font icon or graphic to show the selection, similar to how tick is shown in this Listbox example. When you convert to a Listbox, you'll meet the Arrow Keys requirement.
Selected Fruits List
There are some issues in the required keyboard behavior: How will user know if Arrow-Left or Arrow-Right need to be presed, think about non-sighted users.
Fruit Name and i icon button
In your need, you want both Fruit Name and i icon button to open a panel, suggest to NOT use Arrow-Right to i icon button and only use the Enter key to open the panel. May be you don't need i icon button at all.
Delete icon button
Suggest to use DEL key to delete the item
Conclusion
Remove i icon button. If you can't just keep it as graphic element without any events
Use Enter key to open the panel
Use DEL key to delete the item
I think the whole list will then become a listbox, navigable using Arrow Keys and Enter to invoke an operation
Vegetables List
Neither Accordion nor Nested List works here because you have two actions to do: Make a selection, and Expand and Collapse. I haven't tried TreeView but you can check.
In LibreOffice Calc, if I create four radio buttons on a Basic dialog, with a tab-order of say 11, 12, 13, 14 then they will be treated as a single four-way group.
If I insert any other active form item, such as another text field, (but unfortunately not a dividing line), in the middle, then I get what I want, which is two distinct groups.
Think:
Q.1: * Yes
* No
Q.2: * Yes
* No
All of the documentation seems to be saying that a group is made by giving each button the same name, but this appears to be out of date or out of context, as the dialog editor simply will not allow them to have the same name.
Giving the buttons in each group two different group names also has no effect.
According to https://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Writer_Guide/Form_controls_reference:
If wizards are on, creating a group box launches the Group Element wizard. This creates a group of option buttons (in which only one may be selected at a time). In most cases, using a group box is the best way to create a set of option buttons.
Typically I use group boxes as recommended here. However, instead of the wizard (LibreOffice wizards often give messy results), I find it easier to create the dialog in the dialog editor and then modify the resulting .xdl file using a text editor.
The important thing is the tab index order, as explained at https://wiki.openoffice.org/wiki/Documentation/DevGuide/Basic/Option_Button:
Note, that option buttons that belong to the same group must have consecutive tab indices. Two groups of option buttons can be separated by any control with a tab index that is between the tab indices of the two groups.
A horizontal line will work if that is what you want. For example, here is an example that has two groups. Notice the tab index of 2 for the horizontal line, which is in between the tab indices of the buttons we want to separate (0 to 1 and 3 to 4).
<dlg:radiogroup>
<dlg:radio dlg:id="OptionButton1" dlg:tab-index="0" dlg:left="52" dlg:top="23" dlg:width="50" dlg:height="12" dlg:help-text="&20.Dialog3.OptionButton1.HelpText" dlg:value="&21.Dialog3.OptionButton1.Label" dlg:group-name="a"/>
<dlg:radio dlg:id="OptionButton2" dlg:tab-index="1" dlg:left="52" dlg:top="46" dlg:width="50" dlg:height="12" dlg:help-text="&22.Dialog3.OptionButton2.HelpText" dlg:value="&23.Dialog3.OptionButton2.Label" dlg:group-name="a"/>
</dlg:radiogroup>
<dlg:fixedline dlg:id="FixedLine1" dlg:tab-index="2" dlg:left="50" dlg:top="70" dlg:width="82" dlg:height="6" dlg:help-text="&28.Dialog3.FixedLine1.HelpText" dlg:value="&29.Dialog3.FixedLine1.Label"/>
<dlg:radiogroup>
<dlg:radio dlg:id="OptionButton3" dlg:tab-index="3" dlg:left="52" dlg:top="74" dlg:width="50" dlg:height="12" dlg:help-text="&24.Dialog3.OptionButton3.HelpText" dlg:value="&25.Dialog3.OptionButton3.Label" dlg:group-name="b"/>
<dlg:radio dlg:id="OptionButton4" dlg:tab-index="4" dlg:left="52" dlg:top="93" dlg:width="50" dlg:height="12" dlg:help-text="&26.Dialog3.OptionButton4.HelpText" dlg:value="&27.Dialog3.OptionButton4.Label" dlg:group-name="b"/>
</dlg:radiogroup>
If you don't like the idea of modifying the .xdl file directly, it is possible to do this in the dialog editor without the wizard by selecting each control and changing the value of the tab order field.
When editing the action button properties, it allows an #if statement to flip/flop two choices (lock/unlock). i.e. #If(enlock=1;"Unlock";"Lock") for the "Label" of the action button.
At the bottom of the Action properties, icons can be None, Notes, or Custom. When I select Custom, I want the #if to use either the Locked/Unlocked Notes icons. (actn084.gif and actn085.gif, respectively) Or numbers #62 (locked) and #(I don't know/can't find, the # for the unlock icon).
I've tried formula with the icon number, like in a view, "display as icons" for view column. Using an #if, I've tried the gif on local and server replica's and it didn't give any results.
Please see the example image below.
Image example: http://i.stack.imgur.com/UBac3.png
You have to add actn084.gif and actn085.gif to Resources/Images.
Then, you can use a formula
#If(enlock=1;"actn085.gif";"actn084.gif")
for calculating icon.
As an alternative, you could create two buttons and hide-when them depending on field enlock. You could assign label and icon direct to buttons without formula then.
The hide formula would be enlock=1 for first button and enlock!=1 for the second. In both buttons you would have to add #Command([RefreshHideFormulas]); at the end of your action formula to refresh the action buttons (or Call uiDoc.RefreshHideFormulas for LotusScript action code).
I am working on a mobile 2.0 project that is displaying a list of custom controls (each containing labels and check box). I want to find a better way to keep track of control positions.
The controls are contained within a scrollable panel.
The hierarchy of controls is basically like this
Menu Type 1
Menu Sub Type 1
Menu Item 1
Menu Item 2
Menu Type 2
Menu Sub Type 2
Menu Item 3
Menu Item 4
And the way I add them initially is panel.Controls.Add(controlToAdd)
And each subsequent control's position is determined by the previous control:
newControl.Top = lastControl.Bottom
That works fine on initial load, but I now need to be able to add/remove controls. I know I can just
find where I need to insert it
set the new controls location
change the positions of all controls that follow it (offset based on the height of the new control)
But that seems like a "bad" way since if the control always adds at the front, every single latter control needs updating. Is there a way to better manage the positions of all the controls to ease additions and removals dynamically?
Is it possible to add more than one group of radio buttons to a single Excel worksheet using Aspose Cells for .NET?
I've tried doing this, but they they all seem to share the same group. Adding the radio buttons inside GroupBoxes doesn't seem to help. What am I doing wrong?
The sample code on Aspose's website only adds one set of radio buttons to each worksheet. Is it even possible to add multiple groups? (It works if you set it up manually in Excel.)
It took me a while to figure out what the problem was. The radio buttons in a group must be completely inside the group boxes (they can share a border with the box, but must not stray outside). Any radio buttons that are not completely bounded by a group box are assigned to the default group.
By default the radio buttons have no border or background, so it's not obvious just from looking at the generated Excel worksheet whether or not they are completely inside their grouping box. In my case, the radio buttons were overlapping the border of the grouping box.
Once I reduced the size of the radio buttons so they were contained completely inside the grouping box, it all worked as expected: two independent groups of radio buttons.