Page 1 of 1

Radio button on Android

Posted: Thu Sep 25, 2014 7:43 am
by Johnny6773854

Hi there

I change the label.text value with a radio button. In browser it works fine but on phone it does not work.

What I have is a panel with 2 radio buttons. In the one radio button i use Appery('lbltemp').text("°F"); to set the label.text.

Can you advice me on this?


Radio button on Android

Posted: Thu Sep 25, 2014 8:17 am
by Evgene Karachevtsev

Hello Johnny,

We were unable to reproduce this issue, we can change the value of the label when clicking on RadioButton and everything works. Could you please clarify, do we understand the steps correctly?


Radio button on Android

Posted: Thu Sep 25, 2014 8:24 am
by Johnny6773854

In browser it works but on my S4 it does not work.
I shared my program. the name is calc with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a

  1. Go to the panel by clicking on the button in the header.

  2. You will see 2 radio buttons.

  3. When clicking on it the label on the home page must change.

    If possible see on android phone.

    Thank you for helping


Radio button on Android

Posted: Thu Sep 25, 2014 10:10 am
by Evgene Karachevtsev

Johny,

Please add "Value Change" event to radio buttons group with the following callback: preif ( $(this).val() === "c" ) {
Appery('lbltemp').text("°C");
} else {
Appery('lbltemp').text("°F");
}/pre
And please don't forget to remove other changes of the label ( I mean 'click' callbacks of your radio buttons )


Radio button on Android

Posted: Thu Sep 25, 2014 10:24 am
by Johnny6773854

it works!!

Thank you for the help!


Radio button on Android

Posted: Thu Oct 09, 2014 2:11 pm
by EJLD

Hi There,

I hv displayed a radio group of 2 buttons.
when pressing one of both, it stores the value in a localStorage.
I can get the value from the localStorage meaning up to that point it works.

but when I want the selected button to be set on opening page,
it works on the browser viewer but not on my android OS.

here is my code;

var radioVal = localStorage.getItem("osType");
if (radioVal == "androidOS") {
$('input[name="startPanelOSradioGroup"][value="androidOS]').attr('checked', true);
} else { // if not, then iOS
$('input[name="startPanelOSradioGroup"][value="iOS]').attr('checked', true);
}
$('input[name="startPanelOSradioGroup"]').checkboxradio("refresh");

any idea ?

thks in advance,
Eric


Radio button on Android

Posted: Fri Oct 10, 2014 1:16 am
by Yurii Orishchuk

Hi Eric,

I see problem with your code. May be did not copy it correctly.
http://prntscr.com/4uooaq/direct

Please try following code instead of yours:

pre

var radioVal = localStorage.getItem("osType");
if (radioVal == "androidOS") {
$('input[name="startPanelOSradioGroup"][value="androidOS"]').prop("checked", true).trigger("click");
} else { // if not, then iOS
$('input[name="startPanelOSradioGroup"][value="iOS"]').prop("checked", true).trigger("click");
}

//Note: you don't need to invoke "refresh" method in this case.

/pre

Also please run this code on event when your radiobuttons are ready( "page show" for static group and "service success" for group populated by service).

Regards.


Radio button on Android

Posted: Fri Oct 10, 2014 3:42 am
by EJLD

sorry I had found it out n removed my question but ... still u got it. thks for your reply again