B2BÍøÂçÈí¼þ

 ÕÒ»ØÃÜÂë
 Á¢¼´×¢²á ÉóºËÍøÕ¾ºÅ:QQ:896757558
ËÑË÷
²é¿´: 4|»Ø¸´: 0
´òÓ¡ ÉÏÒ»Ö÷Ìâ ÏÂÒ»Ö÷Ìâ

Æ»¹ûAIWROKʵÀýµ¥Ñ¡°´Å¥×éÀà[RadioButtonGroup]ÍêÕû×ÛºÏʾÀý

[¸´ÖÆÁ´½Ó]

1048

Ö÷Ìâ

1053

Ìû×Ó

7469

»ý·Ö

abc

Rank: 9Rank: 9Rank: 9

»ý·Ö
7469
Ìø×ªµ½Ö¸¶¨Â¥²ã
Â¥Ö÷



Æ»¹ûAIWROKʵÀýµ¥Ñ¡°´Å¥×éÀà[RadioButtonGroup]ÍêÕû×ÛºÏʾÀý B2BÍøÂçÈí¼þ
Æ»¹ûAIWROKʵÀýµ¥Ñ¡°´Å¥×éÀà[RadioButtonGroup]ÍêÕû×ÛºÏʾÀý
Æ»¹ûAIWROKʵÀýµ¥Ñ¡°´Å¥×éÀà[RadioButtonGroup]ÍêÕû×ÛºÏʾÀý B2BÍøÂçÈí¼þ

  1. // 🎨UI-µ¥Ñ¡°´Å¥×éÀà[RadioButtonGroup]ÍêÕû×ÛºÏʾÀý
  2. // È«ÃæÕ¹Ê¾RadioButtonGroupµÄËùÓй¦Äܺͷ½·¨
  3. // 🍎½»Á÷QQȺ711841924Ⱥһ£¬Æ»¹ûÄÚ²âȺ£¬528816639

  4. printl("=== RadioButtonGroupµ¥Ñ¡°´Å¥×éÍêÕû×ÛºÏʾÀýÆô¶¯ ===");

  5. var tab = new TabView();

  6. tab.setTitles(["»ù´¡", "¸ß¼¶", "¶¯Ì¬", "×ÛºÏ", "·µ»Ø"]);

  7. tab.show(function() {
  8.     printl("TabView½çÃæ¼ÓÔØÍê³É");
  9.    
  10.     // ====================== µÚÒ»Ò³£º»ù´¡·½·¨ÑÝʾ ======================
  11.     var basicPage = new Vertical();
  12.     basicPage.setSpacing(10);
  13.     basicPage.setBackgroundColor(255, 255, 255);
  14.    
  15.     var basicDesc = new Label();
  16.     basicDesc.setText("չʾRadioButtonGroupµÄÈý¸öºËÐÄ·½·¨£ºsetID¡¢setDefultSelect¡¢currentSelectedRadio");
  17.     basicDesc.setTextColor(100, 100, 100);
  18.     basicDesc.setFontSize(12);
  19.     basicDesc.setTextAlignment("center");
  20.     basicPage.addView(basicDesc);
  21.    
  22.     // ·½·¨1£ºsetIDÉèÖÿؼþID
  23.     var section1 = new Horizontal();
  24.     section1.setAlignment("center");
  25.     section1.setBackgroundColor(220, 220, 225);
  26.    
  27.     var section1Label = new Label();
  28.     section1Label.setText("·½·¨1£ºsetIDÉèÖÿؼþID");
  29.     section1Label.setTextColor(60, 60, 60);
  30.     section1Label.setFontSize(15);
  31.     section1.addView(section1Label);
  32.    
  33.     basicPage.addView(section1);
  34.    
  35.     var idDemoContainer = new Vertical();
  36.     idDemoContainer.setSpacing(10);
  37.     idDemoContainer.setBackgroundColor(255, 255, 255);
  38.    
  39.     var idDesc = new Label();
  40.     idDesc.setText("Ϊµ¥Ñ¡°´Å¥×éÉèÖÃΨһ±êʶ·û£¬·½±ãºóÐøÍ¨¹ýconfig¶ÁÈ¡ÅäÖÃ");
  41.     idDesc.setTextColor(100, 100, 100);
  42.     idDesc.setFontSize(12);
  43.     idDemoContainer.addView(idDesc);
  44.    
  45.     var idCodeLabel = new Label();
  46.     idCodeLabel.setText("var rg = new RadioButtonGroup();\nrg.setID(\"abc\");\n// ¶ÁȡʹÓÃ\nconfig.getConfig(\"abc\");");
  47.     idCodeLabel.setTextColor(50, 50, 150);
  48.     idCodeLabel.setFontSize(11);
  49.     idCodeLabel.setBackgroundColor(245, 245, 255);
  50.     idDemoContainer.addView(idCodeLabel);
  51.    
  52.     var idDemoGroup = new RadioButtonGroup();
  53.     idDemoGroup.setID("demo_group_1");
  54.     idDemoGroup.setDefultSelect("Ñ¡ÏîA");
  55.    
  56.     // ´´½¨µ¥Ñ¡°´Å¥²¢¹ØÁªµ½×é
  57.     var optionA = new RadioButton();
  58.     optionA.setText("Ñ¡ÏîA");
  59.     optionA.setGroup(idDemoGroup);
  60.    
  61.     var optionB = new RadioButton();
  62.     optionB.setText("Ñ¡ÏîB");
  63.     optionB.setGroup(idDemoGroup);
  64.    
  65.     var optionC = new RadioButton();
  66.     optionC.setText("Ñ¡ÏîC");
  67.     optionC.setGroup(idDemoGroup);
  68.    
  69.     // Ìí¼Óµ¥Ñ¡°´Å¥µ½ÈÝÆ÷
  70.     var radioContainer = new Horizontal();
  71.     radioContainer.setSpacing(20);
  72.     radioContainer.addView(optionA);
  73.     radioContainer.addView(optionB);
  74.     radioContainer.addView(optionC);
  75.     idDemoContainer.addView(radioContainer);
  76.    
  77.     var idResultLabel = new Label();
  78.     idResultLabel.setText("¿Ø¼þIDÒÑÉèÖÃΪ£ºdemo_group_1");
  79.     idResultLabel.setTextColor(0, 128, 0);
  80.     idResultLabel.setFontSize(12);
  81.     idDemoContainer.addView(idResultLabel);
  82.    
  83.     var idGetValueButton = new Button();
  84.     idGetValueButton.setText("»ñÈ¡µ±Ç°Öµ");
  85.     idGetValueButton.setColor(70, 130, 180);
  86.     idGetValueButton.setTextColor(255, 255, 255);
  87.     idGetValueButton.onClick(function() {
  88.         var selected = idDemoGroup.currentSelectedRadio();
  89.         var selectedText = selected ? selected.getText() : "δѡÔñ";
  90.         printl("·½·¨1µ±Ç°Ñ¡ÖÐÏî: " + selectedText);
  91.         idResultLabel.setText("¿Ø¼þIDÒÑÉèÖÃΪ£ºdemo_group_1£¬µ±Ç°Ñ¡ÖÐ: " + selectedText);
  92.     });
  93.     idDemoContainer.addView(idGetValueButton);
  94.    
  95.     basicPage.addView(idDemoContainer);
  96.    
  97.     // ·½·¨2£ºsetDefultSelectÉèÖÃĬÈÏÖµ
  98.     var section2 = new Horizontal();
  99.     section2.setAlignment("center");
  100.     section2.setBackgroundColor(220, 220, 225);
  101.    
  102.     var section2Label = new Label();
  103.     section2Label.setText("·½·¨2£ºsetDefultSelectÉèÖÃĬÈÏÖµ");
  104.     section2Label.setTextColor(60, 60, 60);
  105.     section2Label.setFontSize(15);
  106.     section2.addView(section2Label);
  107.    
  108.     basicPage.addView(section2);
  109.    
  110.     var defaultDemoContainer = new Vertical();
  111.     defaultDemoContainer.setSpacing(10);
  112.     defaultDemoContainer.setBackgroundColor(255, 255, 255);
  113.    
  114.     var defaultDesc = new Label();
  115.     defaultDesc.setText("ÉèÖõ¥Ñ¡°´Å¥×éµÄĬÈÏÑ¡ÖÐÏ³õʼ»¯Ê±×Ô¶¯Ñ¡ÖÐÖ¸¶¨Ñ¡Ïî");
  116.     defaultDesc.setTextColor(100, 100, 100);
  117.     defaultDesc.setFontSize(12);
  118.     defaultDemoContainer.addView(defaultDesc);
  119.    
  120.     var defaultCodeLabel = new Label();
  121.     defaultCodeLabel.setText("var rg = new RadioButtonGroup();\nrg.setID(\"ÐÔ±ð\")\nrg.setDefultSelect(\"ÄÐ\");");
  122.     defaultCodeLabel.setTextColor(50, 50, 150);
  123.     defaultCodeLabel.setFontSize(11);
  124.     defaultCodeLabel.setBackgroundColor(245, 245, 255);
  125.     defaultDemoContainer.addView(defaultCodeLabel);
  126.    
  127.     var genderGroup = new RadioButtonGroup();
  128.     genderGroup.setID("gender_group");
  129.     genderGroup.setDefultSelect("ÄÐ");
  130.    
  131.     // ´´½¨µ¥Ñ¡°´Å¥²¢¹ØÁªµ½×é
  132.     var maleOption = new RadioButton();
  133.     maleOption.setText("ÄÐ");
  134.     maleOption.setGroup(genderGroup);
  135.    
  136.     var femaleOption = new RadioButton();
  137.     femaleOption.setText("Å®");
  138.     femaleOption.setGroup(genderGroup);
  139.    
  140.     var otherOption = new RadioButton();
  141.     otherOption.setText("ÆäËû");
  142.     otherOption.setGroup(genderGroup);
  143.    
  144.     // Ìí¼Óµ¥Ñ¡°´Å¥µ½ÈÝÆ÷
  145.     var genderContainer = new Horizontal();
  146.     genderContainer.setSpacing(20);
  147.     genderContainer.addView(maleOption);
  148.     genderContainer.addView(femaleOption);
  149.     genderContainer.addView(otherOption);
  150.     defaultDemoContainer.addView(genderContainer);
  151.    
  152.     var defaultResultLabel = new Label();
  153.     defaultResultLabel.setText("ĬÈÏÑ¡ÖÐÏÄÐ");
  154.     defaultResultLabel.setTextColor(0, 128, 0);
  155.     defaultResultLabel.setFontSize(12);
  156.     defaultDemoContainer.addView(defaultResultLabel);
  157.    
  158.     var defaultGetValueButton = new Button();
  159.     defaultGetValueButton.setText("»ñÈ¡µ±Ç°Öµ");
  160.     defaultGetValueButton.setColor(70, 130, 180);
  161.     defaultGetValueButton.setTextColor(255, 255, 255);
  162.     defaultGetValueButton.onClick(function() {
  163.         var selected = genderGroup.currentSelectedRadio();
  164.         var selectedText = selected ? selected.getText() : "δѡÔñ";
  165.         printl("·½·¨2µ±Ç°Ñ¡ÖÐÏî: " + selectedText);
  166.         defaultResultLabel.setText("ĬÈÏÑ¡ÖÐÏÄУ¬µ±Ç°Ñ¡ÖÐ: " + selectedText);
  167.     });
  168.     defaultDemoContainer.addView(defaultGetValueButton);
  169.    
  170.     basicPage.addView(defaultDemoContainer);
  171.    
  172.     // ·½·¨3£ºcurrentSelectedRadioµ±Ç°Ñ¡Öеĵ¥Ñ¡°´Å¥
  173.     var section3 = new Horizontal();
  174.     section3.setAlignment("center");
  175.     section3.setBackgroundColor(220, 220, 225);
  176.    
  177.     var section3Label = new Label();
  178.     section3Label.setText("·½·¨3£ºcurrentSelectedRadio»ñÈ¡µ±Ç°Ñ¡ÖÐÏî");
  179.     section3Label.setTextColor(60, 60, 60);
  180.     section3Label.setFontSize(15);
  181.     section3.addView(section3Label);
  182.    
  183.     basicPage.addView(section3);
  184.    
  185.     var currentDemoContainer = new Vertical();
  186.     currentDemoContainer.setSpacing(10);
  187.     currentDemoContainer.setBackgroundColor(255, 255, 255);
  188.    
  189.     var currentDesc = new Label();
  190.     currentDesc.setText("»ñÈ¡µ±Ç°Ñ¡Öеĵ¥Ñ¡°´Å¥£¬ÓÃÓÚ¶ÁÈ¡Óû§Ñ¡Ôñ»ò½øÐкóÐø²Ù×÷");
  191.     currentDesc.setTextColor(100, 100, 100);
  192.     currentDesc.setFontSize(12);
  193.     currentDemoContainer.addView(currentDesc);
  194.    
  195.     var currentCodeLabel = new Label();
  196.     currentCodeLabel.setText("new RadioButtonGroup().currentSelectedRadio()");
  197.     currentCodeLabel.setTextColor(50, 50, 150);
  198.     currentCodeLabel.setFontSize(11);
  199.     currentCodeLabel.setBackgroundColor(245, 245, 255);
  200.     currentDemoContainer.addView(currentCodeLabel);
  201.    
  202.     var currentGroup = new RadioButtonGroup();
  203.     currentGroup.setID("current_group");
  204.     currentGroup.setDefultSelect("Ñ¡Ïî1");
  205.    
  206.     // ´´½¨µ¥Ñ¡°´Å¥²¢¹ØÁªµ½×é
  207.     var option1 = new RadioButton();
  208.     option1.setText("Ñ¡Ïî1");
  209.     option1.setGroup(currentGroup);
  210.    
  211.     var option2 = new RadioButton();
  212.     option2.setText("Ñ¡Ïî2");
  213.     option2.setGroup(currentGroup);
  214.    
  215.     var option3 = new RadioButton();
  216.     option3.setText("Ñ¡Ïî3");
  217.     option3.setGroup(currentGroup);
  218.    
  219.     // Ìí¼Óµ¥Ñ¡°´Å¥µ½ÈÝÆ÷
  220.     var currentRadioContainer = new Horizontal();
  221.     currentRadioContainer.setSpacing(20);
  222.     currentRadioContainer.addView(option1);
  223.     currentRadioContainer.addView(option2);
  224.     currentRadioContainer.addView(option3);
  225.     currentDemoContainer.addView(currentRadioContainer);
  226.    
  227.     var currentButton = new Button();
  228.     currentButton.setText("»ñÈ¡µ±Ç°Ñ¡ÖÐÏî");
  229.     currentButton.setColor(70, 130, 180);
  230.     currentButton.setTextColor(255, 255, 255);
  231.     currentButton.onClick(function() {
  232.         var selected = currentGroup.currentSelectedRadio();
  233.         var selectedText = selected ? selected.getText() : "δѡÔñ";
  234.         printl("µ±Ç°Ñ¡ÖÐÏî: " + selectedText);
  235.         currentResultLabel.setText("µ±Ç°Ñ¡ÖÐÏî: " + selectedText);
  236.     });
  237.     currentDemoContainer.addView(currentButton);
  238.    
  239.     var currentResultLabel = new Label();
  240.     currentResultLabel.setText("µ±Ç°Ñ¡ÖÐÏѡÏî1");
  241.     currentResultLabel.setTextColor(0, 128, 0);
  242.     currentResultLabel.setFontSize(12);
  243.     currentDemoContainer.addView(currentResultLabel);
  244.    
  245.     basicPage.addView(currentDemoContainer);
  246.    
  247.     // ====================== µÚ¶þÒ³£º¸ß¼¶Ó¦ÓÃÑÝʾ ======================
  248.     var advancedPage = new Vertical();
  249.     advancedPage.setSpacing(10);
  250.     advancedPage.setBackgroundColor(255, 255, 255);
  251.    
  252.     var advancedDesc = new Label();
  253.     advancedDesc.setText("չʾRadioButtonGroupÔÚʵ¼ÊÓ¦Óó¡¾°ÖеÄʹÓ÷½·¨");
  254.     advancedDesc.setTextColor(100, 100, 100);
  255.     advancedDesc.setFontSize(12);
  256.     advancedDesc.setTextAlignment("center");
  257.     advancedPage.addView(advancedDesc);
  258.    
  259.     // Ó¦ÓÃ1£ºÓû§ÉèÖýçÃæ
  260.     var appSection1 = new Horizontal();
  261.     appSection1.setAlignment("center");
  262.     appSection1.setBackgroundColor(220, 220, 225);
  263.    
  264.     var appSection1Label = new Label();
  265.     appSection1Label.setText("Ó¦ÓÃ1£ºÓû§ÉèÖýçÃæ");
  266.     appSection1Label.setTextColor(60, 60, 60);
  267.     appSection1Label.setFontSize(15);
  268.     appSection1.addView(appSection1Label);
  269.    
  270.     advancedPage.addView(appSection1);
  271.    
  272.     var settingsContainer = new Vertical();
  273.     settingsContainer.setSpacing(12);
  274.     settingsContainer.setBackgroundColor(255, 255, 255);
  275.    
  276.     var settingsDesc = new Label();
  277.     settingsDesc.setText("ʹÓÃRadioButtonGroupʵÏÖÓû§Æ«ºÃÉèÖÃ");
  278.     settingsDesc.setTextColor(100, 100, 100);
  279.     settingsDesc.setFontSize(12);
  280.     settingsContainer.addView(settingsDesc);
  281.    
  282.     // ÓïÑÔÉèÖÃ
  283.     var languageLabel = new Label();
  284.     languageLabel.setText("ÓïÑÔÉèÖÃ");
  285.     languageLabel.setTextColor(60, 60, 60);
  286.     languageLabel.setFontSize(14);
  287.     settingsContainer.addView(languageLabel);
  288.    
  289.     var languageGroup = new RadioButtonGroup();
  290.     languageGroup.setID("language_setting");
  291.     languageGroup.setDefultSelect("¼òÌåÖÐÎÄ");
  292.    
  293.     // ´´½¨µ¥Ñ¡°´Å¥²¢¹ØÁªµ½×é
  294.     var chineseOption = new RadioButton();
  295.     chineseOption.setText("¼òÌåÖÐÎÄ");
  296.     chineseOption.setGroup(languageGroup);
  297.    
  298.     var englishOption = new RadioButton();
  299.     englishOption.setText("English");
  300.     englishOption.setGroup(languageGroup);
  301.    
  302.     // Ìí¼Óµ¥Ñ¡°´Å¥µ½ÈÝÆ÷
  303.     var languageContainer = new Horizontal();
  304.     languageContainer.setSpacing(20);
  305.     languageContainer.setAlignment("center");
  306.     languageContainer.addView(chineseOption);
  307.     languageContainer.addView(englishOption);
  308.     settingsContainer.addView(languageContainer);
  309.    
  310.     // Ö÷ÌâÉèÖÃ
  311.     var themeLabel = new Label();
  312.     themeLabel.setText("Ö÷ÌâÉèÖÃ");
  313.     themeLabel.setTextColor(60, 60, 60);
  314.     themeLabel.setFontSize(14);
  315.     settingsContainer.addView(themeLabel);
  316.    
  317.     var themeGroup = new RadioButtonGroup();
  318.     themeGroup.setID("theme_setting");
  319.     themeGroup.setDefultSelect("dzɫģʽ");
  320.    
  321.     // ´´½¨µ¥Ñ¡°´Å¥²¢¹ØÁªµ½×é
  322.     var lightOption = new RadioButton();
  323.     lightOption.setText("dzɫģʽ");
  324.     lightOption.setGroup(themeGroup);
  325.    
  326.     var darkOption = new RadioButton();
  327.     darkOption.setText("Éîɫģʽ");
  328.     darkOption.setGroup(themeGroup);
  329.    
  330.     // Ìí¼Óµ¥Ñ¡°´Å¥µ½ÈÝÆ÷
  331.     var themeContainer = new Horizontal();
  332.     themeContainer.setSpacing(20);
  333.     themeContainer.setAlignment("center");
  334.     themeContainer.addView(lightOption);
  335.     themeContainer.addView(darkOption);
  336.     settingsContainer.addView(themeContainer);
  337.    
  338.     var saveSettingsButton = new Button();
  339.     saveSettingsButton.setText("±£´æÉèÖÃ");
  340.     saveSettingsButton.setColor(46, 139, 87);
  341.     saveSettingsButton.setTextColor(255, 255, 255);
  342.     saveSettingsButton.onClick(function() {
  343.         var langRadio = languageGroup.currentSelectedRadio();
  344.         var themeRadio = themeGroup.currentSelectedRadio();
  345.         var lang = langRadio ? langRadio.getText() : "δѡÔñ";
  346.         var theme = themeRadio ? themeRadio.getText() : "δѡÔñ";
  347.         printl("±£´æÉèÖà - ÓïÑÔ: " + lang + ", Ö÷Ìâ: " + theme);
  348.         settingsResultLabel.setText("ÉèÖÃÒѱ£´æ: " + lang + ", " + theme);
  349.     });
  350.     settingsContainer.addView(saveSettingsButton);
  351.    
  352.     var settingsResultLabel = new Label();
  353.     settingsResultLabel.setText("µÈ´ý±£´æÉèÖÃ...");
  354.     settingsResultLabel.setTextColor(100, 100, 100);
  355.     settingsResultLabel.setFontSize(12);
  356.     settingsContainer.addView(settingsResultLabel);
  357.    
  358.     var settingsGetValueButton = new Button();
  359.     settingsGetValueButton.setText("»ñÈ¡µ±Ç°Öµ");
  360.     settingsGetValueButton.setColor(70, 130, 180);
  361.     settingsGetValueButton.setTextColor(255, 255, 255);
  362.     settingsGetValueButton.onClick(function() {
  363.         var langRadio = languageGroup.currentSelectedRadio();
  364.         var themeRadio = themeGroup.currentSelectedRadio();
  365.         var lang = langRadio ? langRadio.getText() : "δѡÔñ";
  366.         var theme = themeRadio ? themeRadio.getText() : "δѡÔñ";
  367.         printl("ÉèÖõ±Ç°Öµ - ÓïÑÔ: " + lang + ", Ö÷Ìâ: " + theme);
  368.         settingsResultLabel.setText("µ±Ç°Öµ: ÓïÑÔ=" + lang + ", Ö÷Ìâ=" + theme);
  369.     });
  370.     settingsContainer.addView(settingsGetValueButton);
  371.    
  372.     advancedPage.addView(settingsContainer);
  373.    
  374.     // Ó¦ÓÃ2£º±íµ¥Ñ¡Ôñ
  375.     var appSection2 = new Horizontal();
  376.     appSection2.setAlignment("center");
  377.     appSection2.setBackgroundColor(220, 220, 225);
  378.    
  379.     var appSection2Label = new Label();
  380.     appSection2Label.setText("Ó¦ÓÃ2£º±íµ¥Êý¾ÝÑ¡Ôñ");
  381.     appSection2Label.setTextColor(60, 60, 60);
  382.     appSection2Label.setFontSize(15);
  383.     appSection2.addView(appSection2Label);
  384.    
  385.     advancedPage.addView(appSection2);
  386.    
  387.     var formContainer = new Vertical();
  388.     formContainer.setSpacing(12);
  389.     formContainer.setBackgroundColor(255, 255, 255);
  390.    
  391.     var formDesc = new Label();
  392.     formDesc.setText("ʹÓÃRadioButtonGroupʵÏÖ±íµ¥Öеĵ¥Ñ¡¹¦ÄÜ");
  393.     formDesc.setTextColor(100, 100, 100);
  394.     formDesc.setFontSize(12);
  395.     formContainer.addView(formDesc);
  396.    
  397.     // ÐÔ±ðÑ¡Ôñ
  398.     var genderFormLabel = new Label();
  399.     genderFormLabel.setText("ÐÔ±ð");
  400.     genderFormLabel.setTextColor(60, 60, 60);
  401.     genderFormLabel.setFontSize(14);
  402.     formContainer.addView(genderFormLabel);
  403.    
  404.     var genderFormGroup = new RadioButtonGroup();
  405.     genderFormGroup.setID("form_gender");
  406.     genderFormGroup.setDefultSelect("±£ÃÜ");
  407.    
  408.     // ´´½¨µ¥Ñ¡°´Å¥²¢¹ØÁªµ½×é
  409.     var maleFormOption = new RadioButton();
  410.     maleFormOption.setText("ÄÐ");
  411.     maleFormOption.setGroup(genderFormGroup);
  412.    
  413.     var femaleFormOption = new RadioButton();
  414.     femaleFormOption.setText("Å®");
  415.     femaleFormOption.setGroup(genderFormGroup);
  416.    
  417.     var secretOption = new RadioButton();
  418.     secretOption.setText("±£ÃÜ");
  419.     secretOption.setGroup(genderFormGroup);
  420.    
  421.     // Ìí¼Óµ¥Ñ¡°´Å¥µ½ÈÝÆ÷
  422.     var genderFormContainer = new Horizontal();
  423.     genderFormContainer.setSpacing(20);
  424.     genderFormContainer.addView(maleFormOption);
  425.     genderFormContainer.addView(femaleFormOption);
  426.     genderFormContainer.addView(secretOption);
  427.     formContainer.addView(genderFormContainer);
  428.    
  429.     // ÄêÁä¶ÎÑ¡Ôñ
  430.     var ageLabel = new Label();
  431.     ageLabel.setText("ÄêÁä¶Î");
  432.     ageLabel.setTextColor(60, 60, 60);
  433.     ageLabel.setFontSize(14);
  434.     formContainer.addView(ageLabel);
  435.    
  436.     var ageGroup = new RadioButtonGroup();
  437.     ageGroup.setID("form_age");
  438.     ageGroup.setDefultSelect("18-25Ëê");
  439.    
  440.     // ´´½¨µ¥Ñ¡°´Å¥²¢¹ØÁªµ½×é
  441.     var age1Option = new RadioButton();
  442.     age1Option.setText("18-25Ëê");
  443.     age1Option.setGroup(ageGroup);
  444.    
  445.     var age2Option = new RadioButton();
  446.     age2Option.setText("26-35Ëê");
  447.     age2Option.setGroup(ageGroup);
  448.    
  449.     var age3Option = new RadioButton();
  450.     age3Option.setText("36ËêÒÔÉÏ");
  451.     age3Option.setGroup(ageGroup);
  452.    
  453.     // Ìí¼Óµ¥Ñ¡°´Å¥µ½ÈÝÆ÷
  454.     var ageContainer = new Horizontal();
  455.     ageContainer.setSpacing(20);
  456.     ageContainer.addView(age1Option);
  457.     ageContainer.addView(age2Option);
  458.     ageContainer.addView(age3Option);
  459.     formContainer.addView(ageContainer);
  460.    
  461.     var submitFormButton = new Button();
  462.     submitFormButton.setText("Ìá½»±íµ¥");
  463.     submitFormButton.setColor(70, 130, 180);
  464.     submitFormButton.setTextColor(255, 255, 255);
  465.     submitFormButton.onClick(function() {
  466.         var genderRadio = genderFormGroup.currentSelectedRadio();
  467.         var ageRadio = ageGroup.currentSelectedRadio();
  468.         var gender = genderRadio ? genderRadio.getText() : "δѡÔñ";
  469.         var age = ageRadio ? ageRadio.getText() : "δѡÔñ";
  470.         printl("Ìá½»±íµ¥ - ÐÔ±ð: " + gender + ", ÄêÁä¶Î: " + age);
  471.         formResultLabel.setText("±íµ¥ÒÑÌá½»: " + gender + ", " + age);
  472.     });
  473.     formContainer.addView(submitFormButton);
  474.    
  475.     var formResultLabel = new Label();
  476.     formResultLabel.setText("µÈ´ýÌá½»±íµ¥...");
  477.     formResultLabel.setTextColor(100, 100, 100);
  478.     formResultLabel.setFontSize(12);
  479.     formContainer.addView(formResultLabel);
  480.    
  481.     var formGetValueButton = new Button();
  482.     formGetValueButton.setText("»ñÈ¡µ±Ç°Öµ");
  483.     formGetValueButton.setColor(70, 130, 180);
  484.     formGetValueButton.setTextColor(255, 255, 255);
  485.     formGetValueButton.onClick(function() {
  486.         var genderRadio = genderFormGroup.currentSelectedRadio();
  487.         var ageRadio = ageGroup.currentSelectedRadio();
  488.         var gender = genderRadio ? genderRadio.getText() : "δѡÔñ";
  489.         var age = ageRadio ? ageRadio.getText() : "δѡÔñ";
  490.         printl("±íµ¥µ±Ç°Öµ - ÐÔ±ð: " + gender + ", ÄêÁä¶Î: " + age);
  491.         formResultLabel.setText("µ±Ç°Öµ: ÐÔ±ð=" + gender + ", ÄêÁä¶Î=" + age);
  492.     });
  493.     formContainer.addView(formGetValueButton);
  494.    
  495.     advancedPage.addView(formContainer);
  496.    
  497.     // ====================== µÚÈýÒ³£º¶¯Ì¬¹ÜÀíÑÝʾ ======================
  498.     var dynamicPage = new Vertical();
  499.     dynamicPage.setSpacing(10);
  500.     dynamicPage.setBackgroundColor(255, 255, 255);
  501.    
  502.     var dynamicDesc = new Label();
  503.     dynamicDesc.setText("չʾÈçºÎ¶¯Ì¬´´½¨ºÍ¹ÜÀíRadioButtonGroup£¬ÒÔ¼°ÓëÆäËû¿Ø¼þµÄ½»»¥");
  504.     dynamicDesc.setTextColor(100, 100, 100);
  505.     dynamicDesc.setFontSize(12);
  506.     dynamicDesc.setTextAlignment("center");
  507.     dynamicPage.addView(dynamicDesc);
  508.    
  509.     // ¶¯Ì¬´´½¨RadioButtonGroup
  510.     var dynamicSection1 = new Horizontal();
  511.     dynamicSection1.setAlignment("center");
  512.     dynamicSection1.setBackgroundColor(220, 220, 225);
  513.    
  514.     var dynamicSection1Label = new Label();
  515.     dynamicSection1Label.setText("¶¯Ì¬´´½¨RadioButtonGroup");
  516.     dynamicSection1Label.setTextColor(60, 60, 60);
  517.     dynamicSection1Label.setFontSize(15);
  518.     dynamicSection1.addView(dynamicSection1Label);
  519.    
  520.     dynamicPage.addView(dynamicSection1);
  521.    
  522.     var dynamicCreateContainer = new Vertical();
  523.     dynamicCreateContainer.setSpacing(10);
  524.     dynamicCreateContainer.setBackgroundColor(255, 255, 255);
  525.    
  526.     var dynamicCreateDesc = new Label();
  527.     dynamicCreateDesc.setText("ͨ¹ý´úÂ붯̬´´½¨RadioButtonGroup²¢Ìí¼Óµ½½çÃæ");
  528.     dynamicCreateDesc.setTextColor(100, 100, 100);
  529.     dynamicCreateDesc.setFontSize(12);
  530.     dynamicCreateContainer.addView(dynamicCreateDesc);
  531.    
  532.     var dynamicCreateButton = new Button();
  533.     dynamicCreateButton.setText("´´½¨Ðµĵ¥Ñ¡°´Å¥×é");
  534.     dynamicCreateButton.setColor(70, 130, 180);
  535.     dynamicCreateButton.setTextColor(255, 255, 255);
  536.     dynamicCreateButton.onClick(function() {
  537.         var newGroup = new RadioButtonGroup();
  538.         var groupId = "dynamic_group_" + dynamicCreateContainer.getViewCount();
  539.         newGroup.setID(groupId);
  540.         newGroup.setDefultSelect("Ñ¡ÏîA");
  541.         
  542.         var groupLabel = new Label();
  543.         groupLabel.setText("ÒÑ´´½¨×é: " + groupId);
  544.         groupLabel.setTextColor(0, 128, 0);
  545.         groupLabel.setFontSize(11);
  546.         dynamicCreateContainer.addView(groupLabel);
  547.         
  548.         printl("ÒÑ´´½¨ÐµÄRadioButtonGroup£¬ID: " + groupId);
  549.     });
  550.     dynamicCreateContainer.addView(dynamicCreateButton);
  551.    
  552.     dynamicPage.addView(dynamicCreateContainer);
  553.    
  554.     // ¶¯Ì¬¶ÁÈ¡ÅäÖÃ
  555.     var dynamicSection2 = new Horizontal();
  556.     dynamicSection2.setAlignment("center");
  557.     dynamicSection2.setBackgroundColor(220, 220, 225);
  558.    
  559.     var dynamicSection2Label = new Label();
  560.     dynamicSection2Label.setText("¶¯Ì¬¶ÁÈ¡ÅäÖÃ");
  561.     dynamicSection2Label.setTextColor(60, 60, 60);
  562.     dynamicSection2Label.setFontSize(15);
  563.     dynamicSection2.addView(dynamicSection2Label);
  564.    
  565.     dynamicPage.addView(dynamicSection2);
  566.    
  567.     var dynamicConfigContainer = new Vertical();
  568.     dynamicConfigContainer.setSpacing(10);
  569.     dynamicConfigContainer.setBackgroundColor(255, 255, 255);
  570.    
  571.     var dynamicConfigDesc = new Label();
  572.     dynamicConfigDesc.setText("ͨ¹ýconfig¶ÁÈ¡RadioButtonGroupµÄÅäÖÃÖµ");
  573.     dynamicConfigDesc.setTextColor(100, 100, 100);
  574.     dynamicConfigDesc.setFontSize(12);
  575.     dynamicConfigContainer.addView(dynamicConfigDesc);
  576.    
  577.     var configGroup = new RadioButtonGroup();
  578.     configGroup.setID("config_test_group");
  579.     configGroup.setDefultSelect("ÅäÖÃÏî1");
  580.    
  581.     // ´´½¨µ¥Ñ¡°´Å¥²¢¹ØÁªµ½×é
  582.     var config1Option = new RadioButton();
  583.     config1Option.setText("ÅäÖÃÏî1");
  584.     config1Option.setGroup(configGroup);
  585.    
  586.     var config2Option = new RadioButton();
  587.     config2Option.setText("ÅäÖÃÏî2");
  588.     config2Option.setGroup(configGroup);
  589.    
  590.     // Ìí¼Óµ¥Ñ¡°´Å¥µ½ÈÝÆ÷
  591.     var configContainer = new Horizontal();
  592.     configContainer.setSpacing(20);
  593.     configContainer.addView(config1Option);
  594.     configContainer.addView(config2Option);
  595.     dynamicConfigContainer.addView(configContainer);
  596.    
  597.     var readConfigButton = new Button();
  598.     readConfigButton.setText("¶ÁÈ¡ÅäÖÃ");
  599.     readConfigButton.setColor(46, 139, 87);
  600.     readConfigButton.setTextColor(255, 255, 255);
  601.     readConfigButton.onClick(function() {
  602.         var selectedRadio = configGroup.currentSelectedRadio();
  603.         var selectedText = selectedRadio ? selectedRadio.getText() : "δѡÔñ";
  604.         printl("µ±Ç°Ñ¡ÖÐÖµ: " + selectedText);
  605.         configResultLabel.setText("ÅäÖÃÖµ: " + selectedText);
  606.     });
  607.     dynamicConfigContainer.addView(readConfigButton);
  608.    
  609.     var configResultLabel = new Label();
  610.     configResultLabel.setText("µÈ´ý¶ÁÈ¡ÅäÖÃ...");
  611.     configResultLabel.setTextColor(100, 100, 100);
  612.     configResultLabel.setFontSize(12);
  613.     dynamicConfigContainer.addView(configResultLabel);
  614.    
  615.     var configGetValueButton = new Button();
  616.     configGetValueButton.setText("»ñÈ¡µ±Ç°Öµ");
  617.     configGetValueButton.setColor(70, 130, 180);
  618.     configGetValueButton.setTextColor(255, 255, 255);
  619.     configGetValueButton.onClick(function() {
  620.         var selectedRadio = configGroup.currentSelectedRadio();
  621.         var selectedText = selectedRadio ? selectedRadio.getText() : "δѡÔñ";
  622.         printl("ÅäÖõ±Ç°Öµ: " + selectedText);
  623.         configResultLabel.setText("µ±Ç°Öµ: " + selectedText);
  624.     });
  625.     dynamicConfigContainer.addView(configGetValueButton);
  626.    
  627.     dynamicPage.addView(dynamicConfigContainer);
  628.    
  629.     // ====================== µÚËÄÒ³£º×ÛºÏÑÝʾ ======================
  630.     var comprehensivePage = new Vertical();
  631.     comprehensivePage.setSpacing(10);
  632.     comprehensivePage.setBackgroundColor(255, 255, 255);
  633.    
  634.     var comprehensiveDesc = new Label();
  635.     comprehensiveDesc.setText("չʾRadioButtonGroupÔÚÍêÕûÓ¦Óó¡¾°ÖеÄ×ÛºÏʹÓÃ");
  636.     comprehensiveDesc.setTextColor(100, 100, 100);
  637.     comprehensiveDesc.setFontSize(12);
  638.     comprehensiveDesc.setTextAlignment("center");
  639.     comprehensivePage.addView(comprehensiveDesc);
  640.    
  641.     // ÍêÕûµÄÎʾíµ÷²éʾÀý
  642.     var surveySection = new Horizontal();
  643.     surveySection.setAlignment("center");
  644.     surveySection.setBackgroundColor(220, 220, 225);
  645.    
  646.     var surveySectionLabel = new Label();
  647.     surveySectionLabel.setText("×ÛºÏÓ¦ÓãºÓû§Îʾíµ÷²é");
  648.     surveySectionLabel.setTextColor(60, 60, 60);
  649.     surveySectionLabel.setFontSize(15);
  650.     surveySection.addView(surveySectionLabel);
  651.    
  652.     comprehensivePage.addView(surveySection);
  653.    
  654.     var surveyContainer = new Vertical();
  655.     surveyContainer.setSpacing(15);
  656.     surveyContainer.setBackgroundColor(255, 255, 255);
  657.    
  658.     var surveyTitle = new Label();
  659.     surveyTitle.setText("Óû§ÂúÒâ¶Èµ÷²é");
  660.     surveyTitle.setTextColor(50, 50, 50);
  661.     surveyTitle.setFontSize(16);
  662.     surveyTitle.setTextAlignment("center");
  663.     surveyContainer.addView(surveyTitle);
  664.    
  665.     // ÎÊÌâ1
  666.     var q1Label = new Label();
  667.     q1Label.setText("1. Äú¶Ô²úÆ·µÄÕûÌåÂúÒâ¶ÈÈçºÎ£¿");
  668.     q1Label.setTextColor(60, 60, 60);
  669.     q1Label.setFontSize(14);
  670.     surveyContainer.addView(q1Label);
  671.    
  672.     var q1Group = new RadioButtonGroup();
  673.     q1Group.setID("survey_q1");
  674.     q1Group.setDefultSelect("ÂúÒâ");
  675.    
  676.     // ´´½¨µ¥Ñ¡°´Å¥²¢¹ØÁªµ½×é
  677.     var verySatisfiedOption = new RadioButton();
  678.     verySatisfiedOption.setText("·Ç³£ÂúÒâ");
  679.     verySatisfiedOption.setGroup(q1Group);
  680.    
  681.     var satisfiedOption = new RadioButton();
  682.     satisfiedOption.setText("ÂúÒâ");
  683.     satisfiedOption.setGroup(q1Group);
  684.    
  685.     var neutralOption = new RadioButton();
  686.     neutralOption.setText("Ò»°ã");
  687.     neutralOption.setGroup(q1Group);
  688.    
  689.     var dissatisfiedOption = new RadioButton();
  690.     dissatisfiedOption.setText("²»ÂúÒâ");
  691.     dissatisfiedOption.setGroup(q1Group);
  692.    
  693.     // Ìí¼Óµ¥Ñ¡°´Å¥µ½ÈÝÆ÷
  694.     var q1Container = new Vertical();
  695.     q1Container.setSpacing(10);
  696.    
  697.     var q1Row1 = new Horizontal();
  698.     q1Row1.setSpacing(15);
  699.     q1Row1.addView(verySatisfiedOption);
  700.     q1Row1.addView(satisfiedOption);
  701.    
  702.     var q1Row2 = new Horizontal();
  703.     q1Row2.setSpacing(15);
  704.     q1Row2.addView(neutralOption);
  705.     q1Row2.addView(dissatisfiedOption);
  706.    
  707.     q1Container.addView(q1Row1);
  708.     q1Container.addView(q1Row2);
  709.     surveyContainer.addView(q1Container);
  710.    
  711.     // ÎÊÌâ2
  712.     var q2Label = new Label();
  713.     q2Label.setText("2. ÄúʹÓòúÆ·µÄƵÂÊÊÇ£¿");
  714.     q2Label.setTextColor(60, 60, 60);
  715.     q2Label.setFontSize(14);
  716.     surveyContainer.addView(q2Label);
  717.    
  718.     var q2Group = new RadioButtonGroup();
  719.     q2Group.setID("survey_q2");
  720.     q2Group.setDefultSelect("ÿÌìʹÓÃ");
  721.    
  722.     // ´´½¨µ¥Ñ¡°´Å¥²¢¹ØÁªµ½×é
  723.     var dailyOption = new RadioButton();
  724.     dailyOption.setText("ÿÌìʹÓÃ");
  725.     dailyOption.setGroup(q2Group);
  726.    
  727.     var weeklyOption = new RadioButton();
  728.     weeklyOption.setText("ÿÖÜʹÓÃ");
  729.     weeklyOption.setGroup(q2Group);
  730.    
  731.     var monthlyOption = new RadioButton();
  732.     monthlyOption.setText("ÿÔÂʹÓÃ");
  733.     monthlyOption.setGroup(q2Group);
  734.    
  735.     var rarelyOption = new RadioButton();
  736.     rarelyOption.setText("ºÜÉÙʹÓÃ");
  737.     rarelyOption.setGroup(q2Group);
  738.    
  739.     // Ìí¼Óµ¥Ñ¡°´Å¥µ½ÈÝÆ÷
  740.     var q2Container = new Vertical();
  741.     q2Container.setSpacing(10);
  742.    
  743.     var q2Row1 = new Horizontal();
  744.     q2Row1.setSpacing(15);
  745.     q2Row1.addView(dailyOption);
  746.     q2Row1.addView(weeklyOption);
  747.    
  748.     var q2Row2 = new Horizontal();
  749.     q2Row2.setSpacing(15);
  750.     q2Row2.addView(monthlyOption);
  751.     q2Row2.addView(rarelyOption);
  752.    
  753.     q2Container.addView(q2Row1);
  754.     q2Container.addView(q2Row2);
  755.     surveyContainer.addView(q2Container);
  756.    
  757.     // ÎÊÌâ3
  758.     var q3Label = new Label();
  759.     q3Label.setText("3. Äú»áÍÆ¼ö¸øÅóÓÑÂð£¿");
  760.     q3Label.setTextColor(60, 60, 60);
  761.     q3Label.setFontSize(14);
  762.     surveyContainer.addView(q3Label);
  763.    
  764.     var q3Group = new RadioButtonGroup();
  765.     q3Group.setID("survey_q3");
  766.     q3Group.setDefultSelect("»áÍÆ¼ö");
  767.    
  768.     // ´´½¨µ¥Ñ¡°´Å¥²¢¹ØÁªµ½×é
  769.     var definitelyOption = new RadioButton();
  770.     definitelyOption.setText("¿Ï¶¨»á");
  771.     definitelyOption.setGroup(q3Group);
  772.    
  773.     var yesOption = new RadioButton();
  774.     yesOption.setText("»áÍÆ¼ö");
  775.     yesOption.setGroup(q3Group);
  776.    
  777.     var maybeOption = new RadioButton();
  778.     maybeOption.setText("¿ÉÄÜ»á");
  779.     maybeOption.setGroup(q3Group);
  780.    
  781.     var noOption = new RadioButton();
  782.     noOption.setText("²»»á");
  783.     noOption.setGroup(q3Group);
  784.    
  785.     // Ìí¼Óµ¥Ñ¡°´Å¥µ½ÈÝÆ÷
  786.     var q3Container = new Vertical();
  787.     q3Container.setSpacing(10);
  788.    
  789.     var q3Row1 = new Horizontal();
  790.     q3Row1.setSpacing(15);
  791.     q3Row1.addView(definitelyOption);
  792.     q3Row1.addView(yesOption);
  793.    
  794.     var q3Row2 = new Horizontal();
  795.     q3Row2.setSpacing(15);
  796.     q3Row2.addView(maybeOption);
  797.     q3Row2.addView(noOption);
  798.    
  799.     q3Container.addView(q3Row1);
  800.     q3Container.addView(q3Row2);
  801.     surveyContainer.addView(q3Container);
  802.    
  803.     // Ìá½»°´Å¥
  804.     var submitSurveyButton = new Button();
  805.     submitSurveyButton.setText("Ìá½»µ÷²é");
  806.     submitSurveyButton.setColor(70, 130, 180);
  807.     submitSurveyButton.setTextColor(255, 255, 255);
  808.     submitSurveyButton.setWidth(150);
  809.     submitSurveyButton.setHeight(45);
  810.     submitSurveyButton.onClick(function() {
  811.         var q1Radio = q1Group.currentSelectedRadio();
  812.         var q2Radio = q2Group.currentSelectedRadio();
  813.         var q3Radio = q3Group.currentSelectedRadio();
  814.         
  815.         var q1Answer = q1Radio ? q1Radio.getText() : "δѡÔñ";
  816.         var q2Answer = q2Radio ? q2Radio.getText() : "δѡÔñ";
  817.         var q3Answer = q3Radio ? q3Radio.getText() : "δѡÔñ";
  818.         
  819.         var result = "µ÷²é½á¹û:\n" +
  820.                      "1. ÂúÒâ¶È: " + q1Answer + "\n" +
  821.                      "2. ʹÓÃÆµÂÊ: " + q2Answer + "\n" +
  822.                      "3. ÍÆ¼öÒâÔ¸: " + q3Answer;
  823.         
  824.         printl(result);
  825.         surveyResultLabel.setText(result);
  826.         showToast("µ÷²éÌá½»³É¹¦£¡");
  827.     });
  828.     surveyContainer.addView(submitSurveyButton);
  829.    
  830.     var surveyResultLabel = new Label();
  831.     surveyResultLabel.setText("µÈ´ýÌá½»µ÷²é...");
  832.     surveyResultLabel.setTextColor(100, 100, 100);
  833.     surveyResultLabel.setFontSize(12);
  834.     surveyContainer.addView(surveyResultLabel);
  835.    
  836.     var surveyGetValueButton = new Button();
  837.     surveyGetValueButton.setText("»ñÈ¡µ±Ç°Öµ");
  838.     surveyGetValueButton.setColor(70, 130, 180);
  839.     surveyGetValueButton.setTextColor(255, 255, 255);
  840.     surveyGetValueButton.onClick(function() {
  841.         var q1Radio = q1Group.currentSelectedRadio();
  842.         var q2Radio = q2Group.currentSelectedRadio();
  843.         var q3Radio = q3Group.currentSelectedRadio();
  844.         
  845.         var q1Answer = q1Radio ? q1Radio.getText() : "δѡÔñ";
  846.         var q2Answer = q2Radio ? q2Radio.getText() : "δѡÔñ";
  847.         var q3Answer = q3Radio ? q3Radio.getText() : "δѡÔñ";
  848.         
  849.         var result = "µ±Ç°Öµ:\n" +
  850.                      "1. ÂúÒâ¶È: " + q1Answer + "\n" +
  851.                      "2. ʹÓÃÆµÂÊ: " + q2Answer + "\n" +
  852.                      "3. ÍÆ¼öÒâÔ¸: " + q3Answer;
  853.         
  854.         printl(result);
  855.         surveyResultLabel.setText(result);
  856.     });
  857.     surveyContainer.addView(surveyGetValueButton);
  858.    
  859.     comprehensivePage.addView(surveyContainer);
  860.    
  861.     // ·½·¨×ܽá
  862.     var summarySection = new Horizontal();
  863.     summarySection.setAlignment("center");
  864.     summarySection.setBackgroundColor(220, 220, 225);
  865.    
  866.     var summarySectionLabel = new Label();
  867.     summarySectionLabel.setText("·½·¨×ܽá");
  868.     summarySectionLabel.setTextColor(60, 60, 60);
  869.     summarySectionLabel.setFontSize(15);
  870.     summarySection.addView(summarySectionLabel);
  871.    
  872.     comprehensivePage.addView(summarySection);
  873.    
  874.     var summaryContainer = new Vertical();
  875.     summaryContainer.setSpacing(10);
  876.     summaryContainer.setBackgroundColor(255, 255, 255);
  877.    
  878.     var summaryLabel = new Label();
  879.     summaryLabel.setText("RadioButtonGroupºËÐÄ·½·¨×ܽ᣺\n\n" +
  880.                         "1. setID(id) - ÉèÖÿؼþΨһ±êʶ·û\n" +
  881.                         "   ÓÃ;£ºÎªµ¥Ñ¡°´Å¥×éÉèÖÃID£¬±ãÓÚͨ¹ýconfig¶ÁÈ¡ÅäÖÃ\n" +
  882.                         "   Ê¾Àý£ºrg.setID(\"abc\")\n\n" +
  883.                         "2. setDefultSelect(value) - ÉèÖÃĬÈÏÑ¡ÖÐÏî\n" +
  884.                         "   ÓÃ;£º³õʼ»¯Ê±×Ô¶¯Ñ¡ÖÐÖ¸¶¨µÄÑ¡Ïî\n" +
  885.                         "   Ê¾Àý£ºrg.setDefultSelect(\"ÄÐ\")\n\n" +
  886.                         "3. currentSelectedRadio() - »ñÈ¡µ±Ç°Ñ¡ÖÐÏî\n" +
  887.                         "   ÓÃ;£º»ñÈ¡Óû§µ±Ç°Ñ¡ÔñµÄÑ¡Ïî\n" +
  888.                         "   Ê¾Àý£ºrg.currentSelectedRadio()");
  889.     summaryLabel.setTextColor(60, 60, 60);
  890.     summaryLabel.setFontSize(11);
  891.     summaryLabel.setBackgroundColor(245, 245, 255);
  892.     summaryContainer.addView(summaryLabel);
  893.    
  894.     comprehensivePage.addView(summaryContainer);
  895.    
  896.     // ====================== µÚÎåÒ³£º·µ»Ø×ÀÃæ ======================
  897.     var returnPage = new Vertical();
  898.     returnPage.setSpacing(30);
  899.     returnPage.setBackgroundColor(245, 248, 250);
  900.     returnPage.setAlignment("center");
  901.    
  902.     var returnHeader = new Horizontal();
  903.     returnHeader.setAlignment("center");
  904.     returnHeader.setBackgroundColor(70, 130, 180);
  905.    
  906.     var returnHeaderLabel = new Label();
  907.     returnHeaderLabel.setText("·µ»Ø×ÀÃæ");
  908.     returnHeaderLabel.setTextColor(255, 255, 255);
  909.     returnHeaderLabel.setFontSize(20);
  910.     returnHeader.addView(returnHeaderLabel);
  911.    
  912.     returnPage.addView(returnHeader);
  913.    
  914.     var returnDesc = new Label();
  915.     returnDesc.setText("µã»÷Ï·½°´Å¥·µ»Ø×ÀÃæ");
  916.     returnDesc.setTextColor(100, 100, 100);
  917.     returnDesc.setFontSize(16);
  918.     returnDesc.setTextAlignment("center");
  919.     returnPage.addView(returnDesc);
  920.    
  921.     var returnButton = new Button();
  922.     returnButton.setText("·µ»Ø×ÀÃæ");
  923.     returnButton.setColor(255, 99, 71); // ·¬ÇѺìÉ«±³¾°
  924.     returnButton.setTextColor(255, 255, 255); // °×É«ÎÄ×Ö
  925.     returnButton.setWidth(180);
  926.     returnButton.setHeight(50);
  927.     returnButton.onClick(function() {
  928.         printl("·µ»Ø×ÀÃæ°´Å¥±»µã»÷");
  929.         tab.dismiss();
  930.         showToast("ÒÑ·µ»Ø×ÀÃæ");
  931.     });
  932.     returnPage.addView(returnButton);
  933.    
  934.     // ====================== Ìí¼ÓËùÓÐÒ³Ãæµ½TabView ======================
  935.     tab.addView(0, basicPage);
  936.     tab.addView(1, advancedPage);
  937.     tab.addView(2, dynamicPage);
  938.     tab.addView(3, comprehensivePage);
  939.     tab.addView(4, returnPage);
  940.    
  941.     printl("RadioButtonGroupʾÀýÊÓͼÌí¼ÓÍê³É");
  942. });

  943. // ÏÔʾÌáʾÐÅÏ¢º¯Êý
  944. function showToast(message) {
  945.     printl("Ìáʾ: " + message);
  946. }

  947. // ÈÕÖ¾Êä³öº¯Êý
  948. function printl(message) {
  949.     console.log("[RadioButtonGroup Example] " + message);
  950. }

  951. // ´úÂë˵Ã÷£º
  952. // 1. ±¾Ê¾ÀýÈ«ÃæÕ¹Ê¾ÁËRadioButtonGroupµÄÈý¸öºËÐÄ·½·¨£ºsetID¡¢setDefultSelect¡¢currentSelectedRadio
  953. // 2. µÚһҳչʾÁË»ù´¡·½·¨µÄµ¥¶ÀʹÓúʹúÂëʾÀý
  954. // 3. µÚ¶þҳչʾÁËRadioButtonGroupÔÚʵ¼ÊÓ¦Óó¡¾°ÖеÄʹÓã¬ÈçÓû§ÉèÖá¢±íµ¥Ñ¡ÔñµÈ
  955. // 4. µÚÈýҳչʾÁ˶¯Ì¬´´½¨ºÍ¹ÜÀíRadioButtonGroupµÄ·½·¨
  956. // 5. µÚËÄҳչʾÁË×ÛºÏÓ¦Óó¡¾°£¬°üÀ¨ÍêÕûµÄÎʾíµ÷²éʾÀý
  957. // 6. ´úÂë×ñÑ­AIWROKƽ̨µÄ·½·¨¹æ·¶£¬Ê¹ÓÃES5Óï·¨
  958. // 7. ËùÓÐʾÀý¶¼°üº¬ÏêϸµÄ×¢ÊͺÍ˵Ã÷
  959. // 8. ¿ÉÒÔ¸ù¾Ýʵ¼ÊÐèÇóÐ޸ĺÍÀ©Õ¹¹¦ÄÜ
¸´ÖÆ´úÂë


»Ø¸´

ʹÓõÀ¾ß ¾Ù±¨

±¾°æ»ý·Ö¹æÔò

¹Ø±Õ

QQ|»ÓªÏúÈí¼þ×ÛºÏÌÖÂÛ|»ÓªÏúÈí¼þÓÐÎʱشð|»ÓªÏúÈí¼þ½Ì³Ì×¨Çø|»ÓªÏúÈí¼þPOST½Å±¾·ÖÏí|»ÓªÏúÈí¼þÆÕͨ½Å±¾·ÖÏí|»ÓªÏúÈí¼þÈí¼þ×ÊѶ|»ÓªÏúÈí¼þ¾«Æ·Èí¼þ|»ÓªÏúÈí¼þ¸üй«¸æ|ÓªÏúÈí¼þ|B2BÈí¼þ|B2BÍøÂçÈí¼þ ( ¾©ICP±¸09078825ºÅ )±¾ÍøÕ¾¿ª·¢µÄÓªÏúÈí¼þÊÇÒ»¿îеÄÍøÂçÓªÏúÈí¼þ£¬Õâ¿îÓªÏú¿ÉÒÔÈ¥ÍøÕ¾Èí¼þ£¬²©¿ÍÈí¼þ£¬B2BÈí¼þ£¬·ÖÀàÐÅÏ¢Íø·¢Ìù£¬¿ÉÒÔÇÀɳ·¢£¬¿ÉÒÔµ½°Ù¶ÈÎÄ¿âÉÏ´«WORDÎĵµ£¬¿ÉÒÔµ½Ò»Ð©ÊÇÏà²áÍøÕ¾×Ô¶¯ÉÏ´«Í¼Æ¬£¬Õâ¸ö×Ô¶¯·¢ÌûÈí¼þ×Ô´øÔÆÖ©Ö룬¼Ó¿ìÊÕ¼£¬ÓÐ6ÖÖ¶Ô½Ó´òÂë½Ó¿Ú£¬·½±ã£¬Ð§Âʸߣ¬Ëٶȿ죬¶øÇÒ¶ÔÍ϶¯µÄÑéÖ¤ÂëÈ«ÍøµÚÒ»¼Ò¶À¼ÒÖ§³Ö£¬È«²¿Ô­´´¼¼Êõ£¬¶À¼ÒÑз¢£¬Õý°æÔ­´´´ø°æÈ¨Èí¼þ¡£Ñ¡ÔñÍòÄÜÓªÏúÈí¼þ£¬¾ÍÑ¡ÔñÁËÒ»ÖÖ׬ǮµÄЧÂÊ£¬´ÓûÓб»³¬Ô½¹ý£¬Ò»Ö±ÔÚŬÁ¦Ñз¢Ð¼¼Êõ¡£·Å·ÉÃÎÏ룬½â·ÅË«ÊÖ£¬À´µã´´Ò⣬³É¾ÍÄãµÄÃÎÏ룬¾ÍÔÚÍòÄÜÓªÏúÈí¼þ¿ªÊ¼

map2

GMT+8, 2026-2-28 00:30 , Processed in 0.329332 second(s), 35 queries .

¿ìËٻظ´ ·µ»Ø¶¥²¿ ·µ»ØÁбí