Music Player and Volume Adjustment

Music Player

Specify a name, so that the display can be controlled by another button or not, such as double-click. Must contain four Button and a Text, and name were specified name. It may contain any other interface elements such as Image and so on.

  • autoShow true / false if they go into lock screen when playing music, whether to automatically display MusicControl
  • music_state playback status 0 stopped 1 player
  • After updating the music player supports song title and artist name are shown separately, respectively @ music_control.title and @ music_control.artist Examples

    <MusicControl name = "music_control" x = "" y = "">
    <! - Album cover, in addition to ordinary Image as album cover image is bound to, you can specify the size, plus Mask, etc. ->
    <Image name = "music_album_cover" />
    
    <! - Song title and artist display text ->
    <Text name = "music_display" />
    
    <! - On the one button ->
    <Button name = "music_prev" />
    
    <! - Next track button ->
    <Button name = "music_next" />
    
    <! - Play button ->
    <Button name = "music_play" />
    
    <! - Pause button ->
    <Button name = "music_pause" />
    </ MusicControl>
    
    // Example: Double-click Control music control display hidden
    <Button x = "178" y = "529" w = "126" h = "126">
    <Triggers>
       <Trigger action = "double" target = "music_control" property = "visibility" value = "toggle" />
    </ Triggers>
    </ Button>
    
    <MusicControl x = "0" y = "300" name = "music_control" visibility = "false">
    <Image name = "music_album_cover" x = "240" y = "40" alpha = "150" align = "center" alignV = "center" />
    <! - Background ->
    <Image src = "music_bg.png" x = "40" y = "0" alpha = "100" />
    
    <-! Text Added automatic scrolling feature, if developed width and scroll speed marqueeSpeed, will automatically scroll the text exceeds the width of the time ->
    <Text name = "music_display" x = "240" y = "10" w = "300" marqueeSpeed ​​= "30" size = "24" color = "# FFFFFF" alpha = "150" align = "center" />
    
    <Button name = "music_prev" x = "40" y = "40" w = "108" h = "84">
       <Normal>
          <Image src = "music_previous_n.png" x = "40" y = "40" />
       </ Normal>
       <Pressed>
          <Image src = "music_previous_p.png" x = "40" y = "40" />
       </ Pressed>
    </ Button>
    <Button name = "music_next" x = "332" y = "40" w = "108" h = "84">
       <Normal>
          <Image src = "music_next_n.png" x = "332" y = "40" />
       </ Normal>
       <Pressed>
          <Image src = "music_next_p.png" x = "332" y = "40" />
       </ Pressed>
    </ Button>  
    <Button name = "music_play" x = "186" y = "40" w = "108" h = "84">
       <Normal>
          <Image src = "music_play_n.png" x = "186" y = "40" />
       </ Normal>
       <Pressed>
          <Image src = "music_play_p.png" x = "186" y = "40" />
       </ Pressed>
    </ Button>
    <Button name = "music_pause" x = "186" y = "40" w = "108" h = "84">
       <Normal>
          <Image src = "music_pause_n.png" x = "186" y = "40" />
             </ Normal>
          <Pressed>
             <Image src = "music_pause_p.png" x = "186" y = "40" />
          </ Pressed>
    </ Button>
    </ MusicControl>
    

Volume Adjustment

  • volume_level volume now
  • volume_level_old adjust the volume of the previous value: 1-15 based on comparison of the two judgments is increasing or decreasing
  • volume_type
    • 0 call volume
    • 1 system volume
    • 2 phone ring tones, SMS tones
    • 3 music player volume
    • 4 alarm volume
    • 5 Notification volume
    • 6 Connectivity Bluetooth when call volume
    • 7 In some countries compulsory system volume
    • 8 DTMF volume
    • 9 TTS volume
    • 10 FM volume
  • Under normal lock screen can only tune 3 (volume player volume)
  • volume_type> = 0 indicates the volume is being adjusted, the adjusted value of -1 is completed according to the volume display to show or hide

results matching ""

    No results matching ""