在锚点处于活动状态时使cardView滚动

时间:2018-04-16 02:17:19

标签: android android-studio android-cardview android-nestedscrollview

我有一个问题,我希望顶部的橙色cardView是这样的:

enter image description here

当用户Scorll我必须使这张橙色卡片滚动时 但我使用坐标布局和卡的锚

当用户向外滚动一点时,我会让它变得不可见但我有这个:

enter image description here

我的问题是如何使这个橙色的cardview保持并滚动其他布局元素?

我的xml文件是:

<html>
 <head>
 <meta name="viewport" content="width=device-width" />
 <title>LED Control</title>
 </head>
     <body>
     LED Control:
     <form method="get" action="gpio.php">
             <input type="submit" value="ON" name="on">
             <input type="submit" value="OFF" name="off">
     </form>
     <?php
     $setmode17 = shell_exec("/usr/local/bin/gpio -g mode 17 out");
     $setmode22 = shell_exec("/usr/local/bin/gpio -g mode 22 out");
     $setmode27 = shell_exec("/usr/local/bin/gpio -g mode 27 out");
     $setmode04 = shell_exec("/usr/local/bin/gpio -g mode 04 out");
     if(isset($_GET['on'])){
             $gpio_on = shell_exec("/usr/local/bin/gpio -g write 17 1");
             $gpio_on = shell_exec("/usr/local/bin/gpio -g write 22 1");
             $gpio_on = shell_exec("/usr/local/bin/gpio -g write 27 1");
             $gpio_on = shell_exec("/usr/local/bin/gpio -g write 04 1");
             echo "LED is on";
         }
         else if(isset($_GET['off'])){
             $gpio_on = shell_exec("/usr/local/bin/gpio -g write 17 0");
             $gpio_on = shell_exec("/usr/local/bin/gpio -g write 22 0");
             $gpio_on = shell_exec("/usr/local/bin/gpio -g write 27 0");
             $gpio_on = shell_exec("/usr/local/bin/gpio -g write 04 0");
             echo "LED is off";
         }
         ?>
         </body>
 </html>

0 个答案:

没有答案