魅族主题吧 关注:6,073贴子:16,669

分享动态锁屏制作模块福利

只看楼主收藏回复

都是自己总结网上找的教程,希望对小白作者有帮助
模块总结好的 ,可以直接照写,但是名字和图片位置要改


1楼2017-03-21 19:17回复
    被吞了


    5楼2017-03-21 19:43
    收起回复
      模块1
      图片飘落特效
      <Image x="坐标" y="坐标" centerX="5" centerY="5" src="图片名字.png">
      <PositionAnimation>
      <Position x="0" y="0" time="0"/>
      <Position x="555" y="666" time="3000"/>
      。。。
      </PositionAnimation>
      <RotationAnimation>
      <Rotation angle="0" time="0"/>
      <Rotation angle="360" time="3000"/>
      </RotationAnimation>
      </Image>
      模块2
      图片旋转特效
      <Var name="aaa">
      <VariableAnimation>
      <AniFrame value="0" time="0"/>
      <AniFrame value="-360" time="7000"/>
      </VariableAnimation>
      </Var>
      <Image x="坐标" y="坐标" src="jd.png" pivotX="5【要设置的旋转中心】" pivotY="5【要设置的旋转中心】" align="center" alignV="center" rotation="#aaa" />


      6楼2017-03-21 19:46
      回复
        模块3 自定义壁纸
        <ExternalCommands>
        <Trigger action="resume">
        <VariableCommand name="aaa" expression="0" />
        </Trigger>
        </ExternalCommands>
        <!-- 自定义壁纸 -->
        <Image src="wallpaper/wallpaper.png【文件夹放壁纸 命名和时间一样】" srcid="#switch_wallpaper" y="#screen_height/2" x="#screen_width/2" h="#screen_height" w="#screen_width" align="center" alignV="center" />
        <!--进入壁纸选择按钮 -->
        <Group visibility="not(#aaa)">
        <Button x="坐标" y="坐标" w="长度" h="长度">
        <Triggers>
        <Trigger action="up">
        <VariableCommand name="aaa" expression="1" const="true" />
        </Trigger>
        </Triggers>
        </Button>
        </Group>
        <!-- 壁纸选择 -->
        <Group visibility="#aaa">
        <Image src="wallpaper/set_wallpaper.jpg"【进入壁纸选择的背景 尺寸1080,1920】 align="center" alignV="center" x="#screen_width/2" y="#screen_height/2" />
        <Image src="wallpaper/choose.png"【勾选壁纸的图标,尺寸为1080,1920 多少壁纸就有多少这个选择,命名和时间一样】 align="center" alignV="center" x="#screen_width/2" y="#screen_height/2" srcid="#switch_wallpaper" />
        <!-- 壁纸选择的按钮布置 -->
        <Button x="坐标" y="坐标" w="长度" h="长度">
        <Triggers>
        <Trigger action="up">
        <VariableCommand name="switch_wallpaper" expression="0" />
        </Trigger>
        </Triggers>
        </Button>
        <Button x="坐标" y="坐标" w="长度" h="长度">
        <Triggers>
        <Trigger action="up">
        <VariableCommand name="switch_wallpaper" expression="1" />
        </Trigger>
        </Triggers>
        </Button>
        <Button x="坐标" y="坐标" w="长度" h="长度">
        <Triggers>
        <Trigger action="up">
        <VariableCommand name="switch_wallpaper" expression="2" />
        </Trigger>
        </Triggers>
        </Button>
        <Button x="坐标" y="坐标" w="长度" h="长度">
        <Triggers>
        <Trigger action="up">
        <VariableCommand name="switch_wallpaper" expression="3" />
        </Trigger>
        </Triggers>
        </Button>
        <Button x="坐标" y="坐标" w="长度" h="长度">
        <Triggers>
        <Trigger action="up">
        <VariableCommand name="switch_wallpaper" expression="4" />
        </Trigger>
        </Triggers>
        </Button>
        <Button x="坐标" y="坐标" w="长度" h="长度">
        <Triggers>
        <Trigger action="up">
        <VariableCommand name="switch_wallpaper" expression="5" />
        </Trigger>
        </Triggers>
        </Button>
        <Button x="坐标" y="坐标" w="长度" h="长度">
        <Triggers>
        <Trigger action="up">
        <VariableCommand name="switch_wallpaper" expression="6" />
        </Trigger>
        </Triggers>
        </Button>
        <Button x="坐标" y="坐标" w="长度" h="长度">
        <Triggers>
        <Trigger action="up">
        <VariableCommand name="switch_wallpaper" expression="7" />
        </Trigger>
        </Triggers>
        </Button>
        <Button x="坐标" y="坐标" w="长度" h="长度">
        <Triggers>
        <Trigger action="up">
        <VariableCommand name="switch_wallpaper" expression="8" />
        </Trigger>
        </Triggers>
        </Button>
        返回 确定按钮
        <Button x="坐标" y="坐标" align="center" w="长度" h="长度">
        <Triggers>
        <Trigger action="up">
        <VariableCommand name="aaa" expression="0" />
        </Trigger>
        </Triggers>
        </Button>
        </Group>


        7楼2017-03-21 19:46
        回复
          模块4
          <!-- 点击切换壁纸 -->
          Var const="true" expression="1" name="dianji" type="number"/>
          <Image y="坐标" x="坐标" src="fs.png" align="center" alignV="center" />
          <Button x="坐标" y="坐标" w="250" h="250" >
          <Triggers>
          <Trigger action="down">【double 是双击】
          <VariableCommand expression="ifelse(ge(#dianji,14)【14是壁纸数量】,1, #dianji+1)" name="dianji"/>
          </Trigger>
          </Triggers>
          </Button>
          <Image srcid="#dianji" src="wallpaper/wallpaper.jpg"/>


          8楼2017-03-21 19:47
          回复
            模块6 特效选择
            2个特效为例
            <Var name="m1" expression="0" const="true"/>
            <Var name="m2" expression="0" const="true"/>
            <Group visibility="#m1" >
            中间是图片元素特效 比如飘落 旋转等,超简单
            <Image x="坐标" y="坐标" src="b1.png">
            <PositionAnimation>
            <Position x="0" y="0" time="0"/>
            <Position x="555" y="666" time="30000"/>
            </PositionAnimation>
            <RotationAnimation>
            <Rotation angle="0" time="0"/>
            <Rotation angle="360" time="3000"/>
            </RotationAnimation>
            </Image>
            </Group>
            <Group visibility="#m2" >
            图片元素特效 比如飘落 旋转等,超简单
            <Image x="坐标" y="坐标" src="b1.png">
            <PositionAnimation>
            <Position x="0" y="0" time="0"/>
            <Position x="555" y="666" time="30000"/>
            </PositionAnimation>
            <RotationAnimation>
            <Rotation angle="0" time="0"/>
            <Rotation angle="360" time="3000"/>
            </RotationAnimation>
            </Image>
            </Group>


            9楼2017-03-21 19:47
            回复
              <!-- 特效按钮的布置-->
              <Button x="坐标" y="坐标" w="长度" h="长度" >
              <Triggers>
              <Trigger action="up">
              <VariableCommand name="mm1" expression="1"/>
              <VariableCommand name="mm2" expression="0"/>
              </Trigger>
              </Triggers>
              </Button>
              <Button x="坐标" y="坐标" w="长度" h="长度" >
              <Triggers>
              <Trigger action="up">
              <VariableCommand name="mm1" expression="0"/>
              <VariableCommand name="mm2" expression="1"/>
              </Trigger>
              </Triggers>
              </Button>
              未完待续


              10楼2017-03-21 19:48
              回复
                完全看不懂啊


                IP属地:北京来自Android客户端11楼2017-03-21 23:22
                回复
                  模块7 大家最爱的苹果式上拉菜单
                  <ExternalCommands>
                  <Trigger action="resume">
                  <VariableCommand name="aaa" expression="0"/>
                  </Trigger>
                  </ExternalCommands>
                  <Var name="aaa" expression="0" const="true"/>
                  <Group >
                  <Group visibility="#aaa" >
                  <!-- 上拉菜单背景 -->
                  <Image y="坐标" src="上拉菜单背景名字.png" />
                  <!-- 以下是包含的软件快捷方式qq -->
                  <Button x="坐标" y="坐标" w="长度" h="长度" >
                  <Triggers>
                  <Trigger action="up" >
                  <IntentCommand action="android.intent.action.MAIN" package="com.tencent.mobileqq" class="com.tencent.mobileqq.activity.SplashActivity" />
                  <ExternCommand command="unlock"/>
                  </Trigger>
                  </Triggers>
                  </Button>
                  <!-- 微信 -->
                  <Button x="坐标" y="坐标" w="长度" h="长度" >
                  <Triggers>
                  <Trigger action="up" >
                  <IntentCommand action="android.intent.action.MAIN" package="com.tencent.mm" class="com.tencent.mm.ui.LauncherUI" />
                  <ExternCommand command="unlock"/>
                  </Trigger>
                  </Triggers>
                  </Button>
                  其他快捷。。。。可上网百度
                  </Group>
                  <!-- 打开菜单按钮 -->
                  <Button x="坐标" y="坐标" w="长度" h="长度" visibility="not(#aaa)>
                  <Triggers>
                  <Trigger action="up">
                  <VariableCommand name="aaa" expression="1" />
                  </Trigger>
                  </Triggers>
                  </Button>
                  <!-- 关闭菜单按钮 -->
                  <Button x="坐标" y="坐标" w="长度" h="长度">
                  <Triggers>
                  <Trigger action="up">
                  <VariableCommand name="aaa" expression="0" />
                  </Trigger>
                  </Triggers>
                  </Button>
                  </Group>


                  12楼2017-03-23 18:32
                  回复
                    不懂可以留言


                    13楼2017-03-23 18:34
                    收起回复
                      我也不懂啊,请问这些应该放在哪个文件夹,文件夹里还有什么别的?


                      来自手机贴吧14楼2017-03-24 10:21
                      回复
                        不错,支持!


                        来自Android客户端15楼2017-03-24 23:39
                        回复
                          楼主能加QQ吗?我萌新一枚,对xml不理解,望大神不吝赐教。


                          17楼2017-05-14 09:35
                          回复
                            我是来学习的~


                            18楼2017-05-15 15:11
                            回复
                              楼主知道输入法皮肤怎么改吗?找了好久没找到方法。


                              来自手机贴吧19楼2017-06-09 12:22
                              回复