I want to replace the music player in the XML code with another one but can't figure out how to do it

11 Views Asked by At
<Trigger action="pause">

    <VariableCommand name="bzmh" expression="#Moe_blur.bmp_width" />

    <VariableCommand name="qmw" expression="#Moe_qm.bmp_width" />

    <VariableCommand name="bzw" expression="#Moe_bz.bmp_width" />

    

    

    

    <AnimationCommand target="cdAni" command="play" condition="ne(#battery_state,0)" />

    

    <VariableCommand name="UnlockMove" expression="0"/>

    <VariableCommand name="Move_Ok" expression="0"/>

    <VariableCommand name="Move1" expression="0" />

    <VariableCommand name="Move2" expression="0" />

    <VariableCommand name="SBE" expression="0" />

    <VariableCommand name="SO" expression="0" />

    <VariableCommand name="PBE" expression="0" />

    <VariableCommand name="PO" expression="0" />

</Trigger>
    <VariableCommand name="bzmh" expression="#Moe_blur.bmp_width" />

    <VariableCommand name="qmw" expression="#Moe_blur.qm_width" />

    <VariableCommand name="bzw" expression="#Moe_bz.bmp_width" />

    

    

    <AnimationCommand target="cdAni" command="play" condition="ne(#battery_state,0)" />

    

    <VariableCommand name="UnlockMove" expression="0"/>

    <VariableCommand name="Move_Ok" expression="0"/>

    <VariableCommand name="Move1" expression="0" />

    <VariableCommand name="Move2" expression="0" />

    <VariableCommand name="SBE" expression="0" />

    <VariableCommand name="SO" expression="0" />

    <VariableCommand name="PBE" expression="0" />

    <VariableCommand name="PO" expression="0" />
 <SensorBinder type="accelerometer">   

    <Variable name="x1" index="0"/>   

    <Variable name="y1" index="1"/>   

 </SensorBinder>   
<Triggers>

    <Trigger action="down">

        <VariableCommand name="Move_Ok" expression="1"/>

    </Trigger>

    <Trigger action="up">

        <VariableCommand name="Move_Ok" expression="0"/>

        <VariableCommand name="SBE" expression="#time" condition="ne(abs(#touch_x-#touch_begin_x),0)*eq(#UnlockMove,0)"/>

        <VariableCommand name="SO" expression="1" condition="gt(#touch_x-#touch_begin_x,200)*eq(#UnlockMove,0)"/>

        <VariableCommand name="SO" expression="0" condition="gt(#touch_x-#touch_begin_x,0)*le(#touch_x-#touch_begin_x,200)*eq(#UnlockMove,0)"/>

        <VariableCommand name="SO" expression="0" condition="lt(#touch_x-#touch_begin_x,-200)*eq(#UnlockMove,0)"/>

        <VariableCommand name="SO" expression="1" condition="ge(#touch_x-#touch_begin_x,-200)*lt(#touch_x-#touch_begin_x,0)*eq(#UnlockMove,0)"/>

        <VariableCommand name="Move1" expression="min(max(#Move2+(#touch_x-#touch_begin_x),0),1080)" condition="eq(#UnlockMove,0)"/>

        <VariableCommand name="Move2" expression="ifelse(gt(abs(#touch_x-#touch_begin_x),200),max(min(#Move2+ifelse(gt(#touch_x,#touch_begin_x),1,-1)*1080,1080),0),#Move2)" condition="eq(#UnlockMove,0)"/>

    </Trigger>

</Triggers>
<StartPoint x="#Home_Move" y="0" w="1080" h="#h" easeType="BounceEaseOut" easeTime="800"/>

<EndPoint x="#Home_Move" y="-#h" w="1080" h="(#h-400)">

    <Path x="0" y="0" tolerance="1000">

        <Position x="0" y="0" />

        <Position x="0" y="-2160*#XZ"/>

    </Path>

</EndPoint>
<VariableAnimation initPause="true" loop="false">   

    <AniFrame value="0" time="0"/>   

    <AniFrame value="0" time="200"/>   

    <AniFrame value="255" time="400"/>   

    <AniFrame value="255" time="2000"/>   

    <AniFrame value="0" time="2500"/>   

    <AniFrame value="0" time="4000000000000000000"/>   

</VariableAnimation>   
-->
<Image x="540+#x1*10" y="#h/2+#y1*18" w="1080*#h*1.2/1920" h="#h*1.2" align="center" alignV="center" src="wall.jpg" visibility="eq(#bzw,0)"/>

<Image x="540+#x1*10" y="#h/2+#y1*18" w="1080*#h*1.2/1920" h="#h*1.2" align="center" alignV="center" src="../../../../../sdcard/qm/bz.png" visibility="ne(#bzw,0)"/>
<Image x="540+#x1*10" y="#h/2+#y1*18" w="1080*#h*1.2/1920" h="#h*1.2" align="center" alignV="center" alpha="#Home_Move/2-max(#UnlockMove/400,-1)*255+500*#PA+255*ne(#call_missed_count,0)+255*ne(#sms_unread_count,0)" src="blur.jpg" visibility="(#Home_Move/2-max(#UnlockMove/400,-1)*255+500*#PA+255*ne(#call_missed_count,0)+255*ne(#sms_unread_count,0))*eq(#bzmh,0)"/>

<Image x="540+#x1*10" y="#h/2+#y1*18" w="1080*#h*1.2/1920" h="#h*1.2" align="center" alignV="center" alpha="#Home_Move/2-max(#UnlockMove/400,-1)*255+500*#PA+255*ne(#call_missed_count,0)+255*ne(#sms_unread_count,0)" src="../../../../../sdcard/qm/mh.png" visibility="(#Home_Move/2-max(#UnlockMove/400,-1)*255+500*#PA+255*ne(#call_missed_count,0)+255*ne(#sms_unread_count,0))*ne(#bzmh,0)"/>
<Image x="540" y="#h/2" w="1080*#h*1.1/1920" h="#h*1.1" align="center" alignV="center" alpha="#Home_Move/2-max(#UnlockMove/400,-1)*255+500*#PA+255*ne(#call_missed_count,0)+255*ne(#sms_unread_count,0)" src="blur.jpg" visibility="(#Home_Move/2-max(#UnlockMove/400,-1)*255+500*#PA+255*ne(#call_missed_count,0)+255*ne(#sms_unread_count,0))*eq(#bzmh,0)"/>

<Image x="540" y="#h/2" w="1080*#h*1.1/1920" h="#h*1.1" align="center" alignV="center" alpha="#Home_Move/2-max(#UnlockMove/400,-1)*255+500*#PA+255*ne(#call_missed_count,0)+255*ne(#sms_unread_count,0)" src="../../../../../sdcard/qm/mh.png" visibility="(#Home_Move/2-max(#UnlockMove/400,-1)*255+500*#PA+255*ne(#call_missed_count,0)+255*ne(#sms_unread_count,0))*ne(#bzmh,0)"/>
<Image x="540" y="150" alpha="255-#Home_Move-500*#PA" align="center" alignV="center" src="lock/lock.png" srcid="le(#UnlockMove,-400)"/>
<Time name="t" x="540+271*(1080-#Home_Move)/1080+500*#Home_Move/1080" y="375" align="right" alignV="center" src="time/time.png"/>

<DateTime name="dd" x="540+#dd.text_width/2*(1080-#Home_Move)/1080+#Home_Move/1080*500" y="528" align="right" alignV="center" size="62" color="#ffffffff" format="M-dd-EEEE"/><!--主屏充电  

<Group x="540+(#NY.text_width+#NN.text_width)/2*(1080-#Home_Move)/1080+#Home_Move/1080*500">

    <DateTime name="NN" x="0" y="562" align="right" alignV="center" size="46" color="#ffffffff" format="NNNN"/>

    <Text name="NY" x="-#NN.text_width" y="562" color="#ffffff" align="right" alignV="center" size="46" format="%s%s" paras="@TG,@DZ"/>

</Group> -->    
<Image x="354" y="700" src="cdAni/bg.png"/>

<Image x="354" y="700" src="cdAni/bg.png" srcid="#battery_level/6%18"/>

<Text x="540" y="930" align="center" alignV="center"color="#ffffff"  size="62" format="Current power %d%%" paras="#battery_level" visibility="eq(#battery_state,1)"/>

<Text x="540" y="930" align="center" alignV="center"color="#ffffff"  size="62" format="low battery %d%%" paras="#battery_level" visibility="eq(#battery_state,2)"/>

<Text x="540" y="930" align="center" alignV="center"color="#ffffff"  size="62" format="Full battery %d%%" paras="#battery_level" visibility="eq(#battery_state,3)"/>
<Image x="138" y="#h-636" src="../../../../../sdcard/qm/qm.png"/>

<Image x="540" y="#h-60" w="386+max(#UnlockMove/400,-1)*386" h="14+max(#UnlockMove/400,-1)*14" align="center" alignV="center" src="bottom/line.png"/>

<Image x="204" y="#h-233" w="144+max(#UnlockMove/400,-1)*144" h="144+max(#UnlockMove/400,-1)*144" align="center" alignV="center" src="bottom/light.png"/>

<Button x="132" y="#h-305" w="144" h="144">

    <Triggers>

        <Trigger action="up">

            <IntentCommand action="android.intent.action.MAIN" package="com.android.systemui" class="com.android.systemui.flashlight.FlashlightActivity" condition="#BtnVis" />

            <ExternCommand command="unlock" condition="#BtnVis"/>

        </Trigger>

    </Triggers>

</Button>



<Image x="876" y="#h-233" w="144+max(#UnlockMove/400,-1)*144" h="144+max(#UnlockMove/400,-1)*144" align="center" alignV="center" src="bottom/cam.png"/>

<Button x="804" y="#h-305" w="144" h="144">

    <Triggers>

        <Trigger action="up">

            <IntentCommand action="android.intent.action.MAIN" package="com.huawei.camera" class="com.huawei.camera" condition="#BtnVis" />

            <ExternCommand command="unlock" condition="#BtnVis"/>

        </Trigger>

    </Triggers>

</Button>



<Image x="425" y="#h-24" alignV="bottom" src="bottom/up.png">   

    <AlphaAnimation>

        <Alpha a="0" time="0"/>

        <Alpha a="250" time="2000"/>

        <Alpha a="250" time="3000"/>

        <Alpha a="0" time="5000"/>

    </AlphaAnimation> 

     <PositionAnimation>

         <Position x="0" y="0" time="100"/>

         <Position x="0" y="-80" time="800"/>

         <Position x="0" y="-80" time="1400000000000000000"/>

      </PositionAnimation>

</Image>
<Image x="30" y="105" src="left/leftscreen.png"/>



<Image x="90" y="1419" alignV="center" src="left/bg.png"/>

<Image x="90" y="1419" alignV="center" src="left/bg.png" srcid="#battery_level/6%17"/>



<Text x="894" y="1286" alignV="center" color="#ffffff" alpha="255*0.6" alignV="center" size="42" format="%d%%" paras="#battery_level"/>
<!--Search语音-->

<Button x="30" y="105" w="1020" h="100">

    <Triggers>

        <Trigger action="up">

            <IntentCommand action="android.intent.action.MAIN" package="com.google.android.googlequicksearchbox" class="com.google.android.googlequicksearchbox.SearchActivityFromTranslate" condition="#BtnVis*gt(#touch_x,30)*lt(#touch_x,830)"/>

            <IntentCommand action="android.intent.action.MAIN" package="com.google.android.googlequicksearchbox" class="com.google.android.googlequicksearchbox.SearchActivityFromTranslate" condition="#BtnVis*gt(#touch_x,830)*lt(#touch_x,1050)"/>

            <ExternCommand command="unlock" condition="#BtnVis"/>

        </Trigger>

    </Triggers>

</Button>

<!--com.google.android.googlequicksearchbox.SearchActivityFromTranslate-->

<!--first-->

<Button x="76" y="650" w="849" h="190">

    <Triggers>

        <Trigger action="up">

            <IntentCommand action="android.intent.action.MAIN" package="com.facebook.katana" class="com.facebook.katana.LoginActivity" condition="#BtnVis*gt(#touch_x,76)*lt(#touch_x,240)"/>

            

            <IntentCommand action="android.intent.action.MAIN" package="com.whatsapp" class="com.whatsapp.Main" condition="#BtnVis*gt(#touch_x,289)*lt(#touch_x,460)"/>

                            

            <ExternCommand command="unlock" condition="#BtnVis*gt(#touch_x,76)*lt(#touch_x,240)+#BtnVis*gt(#touch_x,289)*lt(#touch_x,460)"/>

        </Trigger>

    </Triggers>

</Button>





<!--Second-->

<Button x="76" y="851" w="849" h="190">

    <Triggers>

        <Trigger action="up">

            <IntentCommand action="android.intent.action.MAIN" package="com.android.gallery3d" class="com.huawei.gallery.app.GalleryMain" condition="#BtnVis*gt(#touch_x,76)*lt(#touch_x,240)"/>

            

            <IntentCommand action="android.intent.action.MAIN" package="com.huawei.camera" class="com.huawei.camera" condition="#BtnVis*gt(#touch_x,289)*lt(#touch_x,460)"/>

        

            

            <ExternCommand command="unlock" condition="#BtnVis*gt(#touch_x,76)*lt(#touch_x,240)+#BtnVis*gt(#touch_x,289)*lt(#touch_x,460)"/>

        </Trigger>

    </Triggers>

</Button>



<!--3rd-->

<Button x="565" y="650" w="849" h="190">

    <Triggers>

        <Trigger action="up">

            <IntentCommand action="android.intent.action.MAIN" package="com.android.mms" class="com.android.mms.ui.ConversationList" condition="#BtnVis*gt(#touch_x,565)*lt(#touch_x,707)"/>

            

            <IntentCommand action="android.intent.action.MAIN" package="com.android.systemui" class="com.android.systemui.flashlight.FlashlightActivity" condition="#BtnVis*gt(#touch_x,747)*lt(#touch_x,918)"/>

                            

            <ExternCommand command="unlock" condition="#BtnVis*gt(#touch_x,565)*lt(#touch_x,707)+#BtnVis*gt(#touch_x,707)*lt(#touch_x,918)"/>

        </Trigger>

    </Triggers>

</Button>



<!--4th-->

<Button x="565" y="851" w="849" h="190">

    <Triggers>

        <Trigger action="up">

            <IntentCommand action="android.intent.action.MAIN" package="com.tencent.mm" class="com.tencent.mm.plugin.offline.ui.WalletOfflineCoinPurseUI" condition="#BtnVis*gt(#touch_x,565)*lt(#touch_x,707)"/>

            

            <IntentCommand action="android.intent.action.MAIN" package="com.huawei.android.totemweather" class="com.huawei.android.totemweather.WeatherHome" condition="#BtnVis*gt(#touch_x,747)*lt(#touch_x,918)"/>

        

            

            <ExternCommand command="unlock" condition="#BtnVis*gt(#touch_x,565)*lt(#touch_x,707)+#BtnVis*gt(#touch_x,747)*lt(#touch_x,918)"/>

        </Trigger>

    </Triggers>

</Button>















<!--APP-->

<Button x="99" y="1800" w="882" h="214">

    <Triggers>

        <Trigger action="up">

            <IntentCommand action="android.intent.action.MAIN" package="com.android.contact" class="com.android.contacts.ContactShortcut" condition="#BtnVis*gt(#touch_x,87)*lt(#touch_x,260)"/>

            

            <IntentCommand action="android.intent.action.MAIN" package="com.huawei.camera" class="com.huawei.camera" condition="#BtnVis*gt(#touch_x,307)*lt(#touch_x,474)"/>

            

            <IntentCommand action="android.intent.action.MAIN" package="com.android.chrome" class="com.google.android.apps.chrome.Main" condition="#BtnVis*gt(#touch_x,530)*lt(#touch_x,700)"/>

            

            <IntentCommand action="android.intent.action.MAIN" package="com.android.settings" class="com.android.settings.HWSettings" condition="#BtnVis*gt(#touch_x,755)*lt(#touch_x,930)"/>

            

            <ExternCommand command="unlock" condition="#BtnVis*gt(#touch_x,755)*lt(#touch_x,930)+#BtnVis*gt(#touch_x,530)*lt(#touch_x,700)+#BtnVis*gt(#touch_x,307)*lt(#touch_x,474)+#BtnVis*gt(#touch_x,87)*lt(#touch_x,1718)"/>

        </Trigger>

    </Triggers>

</Button>
<Triggers>

    <Trigger action="up">

        <VariableCommand name="PBE" expression="#time" condition="#BtnVis"/>

        <VariableCommand name="PO" expression="not(#PO)" condition="#BtnVis"/>

    </Trigger>

</Triggers>
<Triggers>

    <Trigger action="up">

        <VariableCommand name="PBE" expression="#time" condition="lt(#touch_begin_y-#touch_y,-200)"/>

        <VariableCommand name="PO" expression="not(#PO)" condition="lt(#touch_begin_y-#touch_y,-200)"/>

    </Trigger>

</Triggers>
<Image x="78" y="#h-1345" src="panel/panel.png"/>

<Image x="329" y="#h-1294" src="panel/zl.png" srcid="not(#zl_switch)"/>

<Image x="130" y="#h-1095" src="panel/circle.png" srcid="#circle_switch"/>

<Image x="329" y="#h-1095" src="panel/mh.png" srcid="not(#mh_switch)"/>



<Image x="78" y="#h-861" src="panel/lh.png" srcid="#lh_switch"/>

<Image x="78" y="#h-619" src="panel/fyp.png" srcid="not(#fyp_switch)"/>



<DateTime x="420" y="#h-762" align="center" alignV="center" size="44" color="#ff000000" format="HH:mm"/>



<Image x="562" y="#h-861" src="panel/bg.png" srcid="#battery_level/6%17"/>



<!--scanner-->

<Button x="130" y="#h-1294" w="140" h="140">

    <Triggers>

        <Trigger action="up">

            <IntentCommand action="android.intent.action.MAIN" package="com.huawei.scanner" class="com.huawei.scanner.view.ScannerActivity" condition="#BtnVis"/>

            <ExternCommand command="unlock" condition="#BtnVis"/>

        </Trigger>

    </Triggers>

</Button>



<!--zl switch-->

<Button x="329" y="#h-1294" w="140" h="140">

    <Triggers>

        <Trigger action="up">

            <VariableCommand name="zl_switch" expression="not(#zl_switch)" condition="#BtnVis"/>

        </Trigger>

    </Triggers>

</Button>



<!--circle switch-->

<Button x="130" y="#h-1095" w="140" h="140">

    <Triggers>

        <Trigger action="up">

            <VariableCommand name="circle_switch" expression="not(#circle_switch)" condition="#BtnVis"/>

        </Trigger>

    </Triggers>

</Button>



<!--note-->

<Button x="329" y="#h-1095" w="140" h="140">

    <Triggers>

        <Trigger action="up">

            <VariableCommand name="mh_switch" expression="not(#mh_switch)" condition="#BtnVis"/>

        </Trigger>

    </Triggers>

</Button>



<!--music-->

<Button x="562" y="#h-1354" w="440" h="370">

    <Triggers>

        <Trigger action="up">

            <IntentCommand action="android.intent.action.MAIN" package="com.android.mediacenter" class="com.android.mediacenter.PageActivity" condition="#BtnVis" />

            <ExternCommand command="unlock" condition="#BtnVis"/>

        </Trigger>

    </Triggers>

</Button>



<!--lh switch-->

<Button x="78" y="#h-861" w="198" h="198">

    <Triggers>

        <Trigger action="up">

            <VariableCommand name="lh_switch" expression="not(#lh_switch)" condition="#BtnVis"/>

        </Trigger>

    </Triggers>

</Button>



<!--fyp switch-->

<Button x="78" y="#h-619" w="310" h="198">

    <Triggers>

        <Trigger action="up">

            <VariableCommand name="fyp_switch" expression="not(#fyp_switch)" condition="#BtnVis"/>

        </Trigger>

    </Triggers>

</Button>



<!--ringmode-->

<Button x="804" y="#h-861" w="200" h="440">

    <Triggers>

        <Trigger action="up">

            <IntentCommand action="android.intent.action.MAIN" package="com.android.settings" class="com.android.settings.RingerVolumePreferenceDialogActivity" condition="#BtnVis" /><!--5.0-->

            <IntentCommand action="android.intent.action.MAIN" package="com.android.settings" class="com.android.settings.Settings$SoundSettingsActivity" condition="#BtnVis" /><!--8.0-->

            <ExternCommand command="unlock" condition="#BtnVis"/>

        </Trigger>

    </Triggers>

</Button>





<!--app-->

<Button x="78" y="#h-377" w="924" h="200">

    <Triggers>

        <Trigger action="up">

            <IntentCommand action="android.intent.action.MAIN" package="com.android.systemui" class="com.android.systemui.flashlight.FlashlightActivity" condition="gt(#touch_x,78)*lt(#touch_x,276)*#BtnVis"/>

            <IntentCommand action="android.intent.action.MAIN" package="com.android.deskclock" class="com.android.deskclock.AlarmsMainActivity" condition="gt(#touch_x,321)*lt(#touch_x,519)*#BtnVis"/>

            <IntentCommand action="android.intent.action.MAIN" package="com.android.calculator2" class="com.android.calculator2.Calculator" condition="gt(#touch_x,562)*lt(#touch_x,760)*#BtnVis"/>

            <IntentCommand action="android.intent.action.MAIN" package="com.huawei.camera" class="com.huawei.camera" condition="gt(#touch_x,804)*lt(#touch_x,1002)*#BtnVis"/>

            <ExternCommand command="unlock" condition="gt(#touch_x,804)*lt(#touch_x,1002)*#BtnVis+gt(#touch_x,562)*lt(#touch_x,760)*#BtnVis+gt(#touch_x,321)*lt(#touch_x,519)*#BtnVis+gt(#touch_x,78)*lt(#touch_x,276)*#BtnVis"/>

        </Trigger>

    </Triggers>

</Button>
<Image x="0" y="0" src="element/circle_1.png"/>

<Image x="1011" y="0" src="element/circle_2.png"/>

<Image x="0" y="#h-69" src="element/circle_3.png"/>

<Image x="1011" y="#h-69" src="element/circle_4.png"/>
This is my phone's lock screen XML code I want to replace the music player in the control panel of this code to the one given below

This is a working XML Music Player code which I want to use in the lock screen of my phonebut I am unable to combine both the codes I have tried many times but it doesn't work I have tried replacing the music player but the cold doesn't work tried all the ways possible maybe it is because the trigger of button for the control panel is not the same with the one used in the music player please help

Please give me a code with the music player replaced or show me the method

0

There are 0 best solutions below