WO2023061318A1 - Progress bar generation method and apparatus, and non-volatile computer readable storage medium - Google Patents

Progress bar generation method and apparatus, and non-volatile computer readable storage medium Download PDF

Info

Publication number
WO2023061318A1
WO2023061318A1 PCT/CN2022/124329 CN2022124329W WO2023061318A1 WO 2023061318 A1 WO2023061318 A1 WO 2023061318A1 CN 2022124329 W CN2022124329 W CN 2022124329W WO 2023061318 A1 WO2023061318 A1 WO 2023061318A1
Authority
WO
WIPO (PCT)
Prior art keywords
progress bar
scaled
scales
generating
scale
Prior art date
Application number
PCT/CN2022/124329
Other languages
French (fr)
Chinese (zh)
Inventor
苏小亮
Original Assignee
北京沃东天骏信息技术有限公司
北京京东世纪贸易有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京沃东天骏信息技术有限公司, 北京京东世纪贸易有限公司 filed Critical 北京沃东天骏信息技术有限公司
Publication of WO2023061318A1 publication Critical patent/WO2023061318A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0485Scrolling or panning
    • G06F3/04855Interaction with scrollbars
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0486Drag-and-drop
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/048Indexing scheme relating to G06F3/048
    • G06F2203/04806Zoom, i.e. interaction techniques or interactors for controlling the zooming operation

Definitions

  • the present disclosure relates to the field of computer technology, and in particular to a method for generating a progress bar, a device for generating a progress bar, and a non-volatile computer-readable storage medium.
  • a progress bar for the media player By setting a progress bar for the media player, it is convenient for the user to adjust the media playback progress according to needs. For example, in the related art, a progress bar with fixed length and precision is set for the media player.
  • the inventors of the present disclosure have found the following problems in the above-mentioned related technologies: the control precision of the progress bar cannot be dynamically adjusted according to requirements, resulting in poor media progress control effect and poor user experience.
  • the present disclosure proposes a technical solution for generating a progress bar, which can dynamically adjust the control accuracy of the progress bar according to requirements, thereby improving the media progress control effect and user experience.
  • a method for generating a progress bar including: determining the number of scales after scaling according to the acquired scaling multiple of the current progress bar; Corresponding to the total duration of the media, determine the time information corresponding to the scaled scale; according to the number of scaled scales and the time information corresponding to the scaled scale, generate a scaled progress bar for controlling the playback progress of the corresponding media.
  • the number of scales after scaling is positively correlated with the scaling factor, and the accuracy of the time information corresponding to the scale is positively correlated with the scaling factor.
  • generating the scaled progress bar according to the number of scaled scales and the time information corresponding to the scaled scales includes: modifying the width attribute of the current progress bar according to the scaling factor to generate the scaled progress bar , the width corresponding to the width attribute is positively related to the scaling factor.
  • generating the scaled progress bar includes: setting a scale node every preset number of scales; displaying its corresponding The time information of , the time information is not displayed on the scale other than the scale node.
  • modifying the width attribute of the current progress bar according to the scaling factor, generating the scaled progress bar includes: externally calling the perfor (performance) () function to pass the width attribute, and modifying the width attribute of the current progress bar through Android attribute animation width property.
  • generating the scaled progress bar according to the number of scaled scales and the time information corresponding to the scaled scales includes: inheriting the properties of the current progress bar as properties of the scaled progress bar; according to the properties, Generate a scaled progress bar.
  • the attribute includes one or more of updating progress through code, changing progress through dragging, customizing the background of the progress bar, and customizing the drag button.
  • the generating method further includes: nesting a HorizontalScrollView (horizontal scrolling view) control, and dragging the scaled progress bar horizontally.
  • a HorizontalScrollView horizontal scrolling view
  • the generating method further includes: increasing the time precision of the scale of the current progress bar as the width of the current progress bar is scaled.
  • determining the number of scales after scaling includes: scaling the scale number of the current progress bar according to the scaling multiple, so as to determine the number of scales after scaling;
  • the number of scaled scales and the total duration of the corresponding media of the current progress bar, and determining the time information corresponding to the scaled scales includes: according to the number of scaled scales, the total duration of the corresponding media is equally divided to determine the scaled scales.
  • a device for generating a progress bar including: a quantity determination unit, configured to determine the number of scaled scales according to the obtained multiplier for scaling the current progress bar; a time determination unit, using Determine the time information corresponding to the scaled scale according to the number of scaled scales and the total duration of the corresponding media of the current progress bar; the generating unit is used to generate according to the number of scaled scales and the time information corresponding to the scaled scale
  • the scaled progress bar is used to control the playback progress of the corresponding media.
  • the number of scales after scaling is positively correlated with the scaling factor, and the accuracy of the time information corresponding to the scale is positively correlated with the scaling factor.
  • the generation unit modifies the width attribute of the current progress bar according to the scaling factor to generate the scaled progress bar, and the width corresponding to the width attribute is positively correlated with the scaling factor.
  • a device for generating a progress bar including: a memory; and a processor coupled to the memory, the processor is configured to execute any one of the above implementations based on instructions stored in the memory device How to generate the progress bar in the example.
  • a non-volatile computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the method for generating the progress bar in any one of the above-mentioned embodiments is implemented.
  • a computer program including: instructions, which, when executed by a processor, cause the processor to execute the method for generating a progress bar according to any one of the above embodiments.
  • the scaled progress bar is generated according to the requirement, and the control accuracy of the progress bar can be dynamically adjusted according to the scaling factor. In this way, the media progress control effect and user experience can be improved.
  • FIG. 1 shows a flowchart of some embodiments of a method for generating a progress bar of the present disclosure
  • FIG. 2 shows a flow chart of another embodiment of the method for generating a progress bar of the present disclosure
  • Figures 3a and 3b show block diagrams of some embodiments of the method for generating a progress bar of the present disclosure
  • Fig. 4 shows a block diagram of some embodiments of the device for generating a progress bar of the present disclosure
  • Fig. 5 shows a block diagram of other embodiments of the device for generating a progress bar of the present disclosure
  • Fig. 6 shows a block diagram of some other embodiments of the device for generating a progress bar of the present disclosure.
  • the technical solution disclosed in the present disclosure can enlarge the progress bar, so that the displayed playback progress is finer.
  • the precision of the progress bar before zooming in is sub-level, and the precision of the progress bar after zooming in can reach the second level. In this way, the progress of media playback can be controlled more precisely and conveniently.
  • the scaled progress bar generated in the present disclosure can realize scale scaling, so that the user's touch control is more accurate and the control scale is more precise.
  • the technical solutions of the present disclosure can be realized through the following embodiments.
  • Fig. 1 shows a flow chart of some embodiments of the method for generating a progress bar of the present disclosure.
  • step 110 according to the acquired scaling factor for the current progress bar, the number of scales after scaling is determined.
  • a scaling control button is provided by customizing the View to control scaling of the progress bar scale.
  • the time precision of the scale increases. For example, the width of the current progress bar is equally divided into 10 scales, and if the width of the progress bar is enlarged by 3 times, the scaled progress bar is divided into 30 scales. In this way, the time precision corresponding to each scale of the progress bar is finer.
  • the custom progress bar (scaled progress bar) can inherit the properties of the native progress bar (current progress bar). For example, it can be inherited by MySeekBar extends SeekBar.
  • the attribute may include at least one of attributes such as support for updating the progress through code, support for changing the progress by manual dragging, support for customizing the background of the progress bar, and support for customizing the drag button.
  • the height attribute of the seekbar can be set through an xml (eXtensible Markup Language, Extensible Markup Language) layout file.
  • step 120 the time information corresponding to the scaled scale is determined according to the number of scaled scales and the total duration of the media corresponding to the current progress bar.
  • the number of scales after scaling is positively correlated with the scaling factor, and the accuracy of the time information corresponding to the scale is positively correlated with the scaling factor.
  • properties such as pen, color, and font size of the scaled progress bar may be initialized.
  • the initialized properties may include a scale line brush, a scale value brush, and the like.
  • a scale node is set every preset number of scales; the corresponding time information is displayed on the scale nodes, and no time information is displayed on the scales other than the scale nodes.
  • the preset number can be 1 scale, 5 scales, 10 scales and so on.
  • the corresponding time information can be displayed at the position of 10 scales.
  • the format of the time information corresponding to the displayed scale can be "hour: minute: second".
  • the total scale number of the progress bar may be scaled by a corresponding multiple; and the total duration of the video may be equally divided into a corresponding number of scales. For example, corresponding time information can be displayed every 10 scales.
  • a scaled progress bar is generated according to the number of scaled scales and the time information corresponding to the scaled scales to control the playing progress of the corresponding media.
  • the width attribute of the current progress bar is modified according to the scaling factor to generate a scaled progress bar, and the width corresponding to the width attribute is positively correlated with the scaling factor.
  • the perfor() function is called externally to pass the width attribute, and the width attribute of the current progress bar is modified through Android attribute animation.
  • call perfor() externally to transfer parameters for the zoom factor; modify the width property of the object through Android property animation; after scaling the width of the progress bar, redraw the scaled scale line and scale value.
  • the properties of the current progress bar are inherited as the properties of the scaled progress bar; according to the properties, the scaled progress bar is generated.
  • the properties include one or more of updating progress through code, changing progress through dragging, customizing the background of the progress bar, and customizing the dragging button.
  • the HorizontalScrollView control is nested, and the scaled progress bar is dragged horizontally. For example, nesting the HorizontalScrollView control (which can make the inner control slide horizontally) can slide the progress bar horizontally.
  • Fig. 2 shows a flow chart of other embodiments of the method for generating a progress bar of the present disclosure.
  • the custom progress bar may inherit the properties of the original progress bar (current progress bar). For example, it can be inherited by MySeekBar extends SeekBar.
  • the attribute may include at least one of attributes such as support for updating the progress through code, support for changing the progress by manual dragging, support for customizing the background of the progress bar, and support for customizing the drag button.
  • the height attribute of seekbar (zoomed progress bar) can be set through the layout file of xml (eXtensible Markup Language, Extensible Markup Language).
  • attributes such as brush, color, and font size of the scaled progress bar may be initialized.
  • the initialized properties may include a scale line brush, a scale value brush, and the like.
  • the preset number can be 1 scale, 5 scales, 10 scales and so on.
  • the corresponding time information can be displayed at the position of 10 scales.
  • the format of the time information corresponding to the displayed scale can be "hour: minute: second".
  • the total scale number of the progress bar may be scaled by a corresponding multiple; and the total duration of the video may be equally divided into a corresponding number of scales. For example, corresponding time information can be displayed every 10 scales.
  • step 240 call perfor() externally to pass parameter processing on the zoom factor; modify the width attribute of the object through the Android attribute animation; after scaling the width of the progress bar, redraw the scaled scale line and scale value.
  • step 250 as the width of the progress bar scales, the time precision of the scale is increased.
  • the width of the current progress bar is equally divided into 10 scales, and if the width of the progress bar is enlarged by 3 times, the scaled progress bar is divided into 30 scales. In this way, the time precision corresponding to each scale of the progress bar is finer.
  • step 260 the HorizontalScrollView control is nested, and the scaled progress bar is horizontally dragged. For example, nesting the HorizontalScrollView control (which can make the inner control slide horizontally) can slide the progress bar horizontally.
  • Figures 3a and 3b show block diagrams of some embodiments of the method for generating a progress bar of the present disclosure.
  • the drag bar under the video is generated by combining two original seekbars.
  • different display styles can be set according to requirements.
  • Buttons can be set on at least one of the two ends of the progress bar, which can be used to display the zoom factor, and can also be used to zoom.
  • Figure 3a shows the progress bar (1 times the width) before scaling
  • Figure 3b shows the progress bar (4 times the width) after scaling the progress bar (2 times the width).
  • the width of the progress bar before scaling is smaller than that of the progress bar before scaling; the time precision corresponding to the scale of the progress bar before scaling is lower than the time precision of the progress bar after scaling.
  • Fig. 4 shows a block diagram of some embodiments of an apparatus for generating a progress bar of the present disclosure.
  • the generating device 4 of the progress bar includes a quantity determining unit 41 , a time determining unit 42 and a generating unit 43 .
  • the quantity determination unit 41 determines the scaled number of scales according to the acquired scaling multiple of the current progress bar. For example, the time precision of the scale of the current progress bar increases as the width of the current progress bar is scaled.
  • the number of scales after scaling is positively correlated with the scaling factor, and the accuracy of the time information corresponding to the scale is positively correlated with the scaling factor.
  • the time determination unit 42 determines the time information corresponding to the scaled scales according to the scaled scale number and the total duration of the media corresponding to the current progress bar.
  • the number determination unit 41 scales the scale number of the current progress bar according to the scaling multiple to determine the scaled scale number; the time determination unit 42 equally divides the total amount of the corresponding media according to the scaled scale number Duration to determine scaled ticks.
  • the generating unit 43 generates a scaled progress bar according to the number of scaled scales and the time information corresponding to the scaled scales, for controlling the playing progress of the corresponding media.
  • the generating unit 43 modifies the width attribute of the current progress bar according to the scaling factor to generate the scaled progress bar, and the width corresponding to the width attribute is positively correlated with the scaling factor.
  • the generating unit 43 sets a scale node every preset number of scales; the corresponding time information is displayed on the scale nodes, and no time information is displayed on the scales other than the scale nodes.
  • the generation unit 43 externally calls the perfor() function to pass the width attribute, and modifies the width attribute of the current progress bar through Android attribute animation.
  • the generation unit 43 inherits the attributes of the current progress bar as the attributes of the scaled progress bar; according to the attributes, the scaled progress bar is generated.
  • the properties include one or more of updating progress through code, changing progress through dragging, customizing the background of the progress bar, and customizing the dragging button.
  • the generating unit 43 nests a HorizontalScrollView control, and drags the scaled progress bar horizontally.
  • Fig. 5 shows a block diagram of other embodiments of the device for generating a progress bar of the present disclosure.
  • the device 5 for generating a progress bar in this embodiment includes: a memory 51 and a processor 52 coupled to the memory 51 , the processor 52 is configured to execute the present disclosure based on instructions stored in the memory 51 .
  • the memory 51 may include, for example, a system memory, a fixed non-volatile storage medium, and the like.
  • the system memory stores, for example, an operating system, an application program, a Boot Loader, a database, and other programs.
  • Fig. 6 shows a block diagram of some other embodiments of the device for generating a progress bar of the present disclosure.
  • the device 6 for generating a progress bar in this embodiment includes: a memory 610 and a processor 620 coupled to the memory 610.
  • the processor 620 is configured to execute any of the foregoing based on instructions stored in the memory 610.
  • a method for generating a progress bar in an embodiment includes: a memory 610 and a processor 620 coupled to the memory 610.
  • the memory 610 may include, for example, a system memory, a fixed non-volatile storage medium, and the like.
  • the system memory stores, for example, an operating system, an application program, a Boot Loader program, and other programs.
  • the device 6 for generating a progress bar may further include an input and output interface 630, a network interface 640, a storage interface 650, and the like. These interfaces 630 , 640 , and 650 , as well as the memory 610 and the processor 620 may be connected through a bus 660 , for example.
  • the input and output interface 630 provides a connection interface for input and output devices such as a display, a mouse, a keyboard, a touch screen, a microphone, and a speaker.
  • the network interface 640 provides a connection interface for various networked devices.
  • the storage interface 650 provides connection interfaces for external storage devices such as SD cards and U disks.
  • the computer program of the present disclosure includes: instructions, which when executed by a processor cause the processor to execute the method for generating a progress bar according to any one of the above embodiments.
  • the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Accordingly, the present disclosure can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable non-transitory storage media including, but not limited to, disk storage, CD-ROM, optical storage, etc., having computer-usable program code embodied therein.
  • the methods and systems of the present disclosure may be implemented in many ways.
  • the methods and systems of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware.
  • the above sequence of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the sequence described above unless specifically stated otherwise.
  • the present disclosure can also be implemented as programs recorded in recording media, the programs including machine-readable instructions for realizing the method according to the present disclosure.
  • the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.

Abstract

The present disclosure relates to the technical field of computers, and relates to a progress bar generation method and apparatus, and a non-volatile computer readable storage medium. The generation method comprises: according to an obtained multiple for performing scaling on the current progress bar, determining a scaled scale number; determining time information corresponding to a scaled scale according to the scaled scale number and the total duration of the corresponding media of the current progress bar; and according to the scaled scale number and the time information corresponding to the scaled scale, generating a scaled progress bar for controlling the playback progress of the corresponding media.

Description

进度条的生成方法、装置和非易失性计算机可读存储介质Method, device and non-volatile computer-readable storage medium for generating progress bar
相关申请的交叉引用Cross References to Related Applications
本申请是以CN申请号为202111187704.0,申请日为2021年10月12日的申请为基础,并主张其优先权,该CN申请的公开内容在此作为整体引入本申请中。This application is based on the application with CN application number 202111187704.0 and the application date is October 12, 2021, and claims its priority. The disclosure content of this CN application is hereby incorporated into this application as a whole.
技术领域technical field
本公开涉及计算机技术领域,特别涉及一种进度条的生成方法、进度条的生成装置和非易失性计算机可读存储介质。The present disclosure relates to the field of computer technology, and in particular to a method for generating a progress bar, a device for generating a progress bar, and a non-volatile computer-readable storage medium.
背景技术Background technique
通过给媒体播放器设置进度条,可以方便用户根据需要对媒体播放进度进行调节。例如,在相关技术中,为媒体播放器设置固定长度和精度的进度条。By setting a progress bar for the media player, it is convenient for the user to adjust the media playback progress according to needs. For example, in the related art, a progress bar with fixed length and precision is set for the media player.
发明内容Contents of the invention
本公开的发明人发现上述相关技术中存在如下问题:无法根据需求动态调节进度条的控制精度,导致媒体进度控制效果差、用户体验差。The inventors of the present disclosure have found the following problems in the above-mentioned related technologies: the control precision of the progress bar cannot be dynamically adjusted according to requirements, resulting in poor media progress control effect and poor user experience.
鉴于此,本公开提出了一种进度条的生成技术方案,能够根据需求动态调节进度条的控制精度,从而提高媒体进度控制效果、用户体验。In view of this, the present disclosure proposes a technical solution for generating a progress bar, which can dynamically adjust the control accuracy of the progress bar according to requirements, thereby improving the media progress control effect and user experience.
根据本公开的一些实施例,提供了一种进度条的生成方法,包括:根据获取的对当前进度条进行缩放的倍数,确定缩放后的刻度数量;根据缩放后的刻度数量和当前进度条的对应媒体的总时长,确定缩放后的刻度对应的时间信息;根据缩放后的刻度数量、缩放后的刻度对应的时间信息,生成缩放后的进度条,用于控制对应媒体的播放进度。According to some embodiments of the present disclosure, there is provided a method for generating a progress bar, including: determining the number of scales after scaling according to the acquired scaling multiple of the current progress bar; Corresponding to the total duration of the media, determine the time information corresponding to the scaled scale; according to the number of scaled scales and the time information corresponding to the scaled scale, generate a scaled progress bar for controlling the playback progress of the corresponding media.
在一些实施例中,缩放后的刻度数量与进行缩放的倍数正相关,刻度对应的时间信息的精度与进行缩放的倍数正相关。In some embodiments, the number of scales after scaling is positively correlated with the scaling factor, and the accuracy of the time information corresponding to the scale is positively correlated with the scaling factor.
在一些实施例中,根据缩放后的刻度数量、缩放后的刻度对应的时间信息,生成缩放后的进度条包括:根据进行缩放的倍数,修改当前进度条的宽度属性,生成缩放后的进度条,宽度属性对应的宽度与进行缩放的倍数正相关。In some embodiments, generating the scaled progress bar according to the number of scaled scales and the time information corresponding to the scaled scales includes: modifying the width attribute of the current progress bar according to the scaling factor to generate the scaled progress bar , the width corresponding to the width attribute is positively related to the scaling factor.
在一些实施例中,据缩放后的刻度数量、缩放后的刻度对应的时间信息,生成缩放后的进度条包括:每隔预设数量的刻度,设置一个刻度节点;在刻度节点上显示其对应的时间信息,在刻度节点以外的刻度上不显示时间信息。In some embodiments, according to the number of scaled scales and the time information corresponding to the scaled scales, generating the scaled progress bar includes: setting a scale node every preset number of scales; displaying its corresponding The time information of , the time information is not displayed on the scale other than the scale node.
在一些实施例中,根据进行缩放的倍数,修改当前进度条的宽度属性,生成缩放后的进度条包括:外部调用perfor(性能)()函数传递宽度属性,通过Android属性动画修改当前进度条的宽度属性。In some embodiments, modifying the width attribute of the current progress bar according to the scaling factor, generating the scaled progress bar includes: externally calling the perfor (performance) () function to pass the width attribute, and modifying the width attribute of the current progress bar through Android attribute animation width property.
在一些实施例中,根据缩放后的刻度数量、缩放后的刻度对应的时间信息,生成缩放后的进度条包括:将当前进度条的属性,继承为缩放后的进度条的属性;根据属性,生成缩放后的进度条。In some embodiments, generating the scaled progress bar according to the number of scaled scales and the time information corresponding to the scaled scales includes: inheriting the properties of the current progress bar as properties of the scaled progress bar; according to the properties, Generate a scaled progress bar.
在一些实施例中,属性包括通过代码更新进度、通过拖拽改变进度、自定义进度条背景、自定义拖拽按钮中的一项或多项。In some embodiments, the attribute includes one or more of updating progress through code, changing progress through dragging, customizing the background of the progress bar, and customizing the drag button.
在一些实施例中,生成方法还包括:嵌套HorizontalScrollView(水平滚动视图)控件,对缩放后的进度条进行横向拖动。In some embodiments, the generating method further includes: nesting a HorizontalScrollView (horizontal scrolling view) control, and dragging the scaled progress bar horizontally.
在一些实施例中,生成方法还包括:随着对当前进度条的宽度进行缩放,增加当前进度条的刻度的时间精度。In some embodiments, the generating method further includes: increasing the time precision of the scale of the current progress bar as the width of the current progress bar is scaled.
在一些实施例中,据获取的对当前进度条进行缩放的倍数,确定缩放后的刻度数量包括:根据缩放的倍数,对当前进度条的刻度数量进行缩放,以确定缩放后的刻度数量;根据缩放后的刻度数量和当前进度条的对应媒体的总时长,确定缩放后的刻度对应的时间信息包括:根据缩放后的刻度数量,均分对应媒体的总时长,以确定缩放后的刻度。In some embodiments, according to the acquired scaling multiple of the current progress bar, determining the number of scales after scaling includes: scaling the scale number of the current progress bar according to the scaling multiple, so as to determine the number of scales after scaling; The number of scaled scales and the total duration of the corresponding media of the current progress bar, and determining the time information corresponding to the scaled scales includes: according to the number of scaled scales, the total duration of the corresponding media is equally divided to determine the scaled scales.
根据本公开的另一些实施例,提供一种进度条的生成装置,包括:数量确定单元,用于根据获取的对当前进度条进行缩放的倍数,确定缩放后的刻度数量;时间确定单元,用于根据缩放后的刻度数量和当前进度条的对应媒体的总时长,确定缩放后的刻度对应的时间信息;生成单元,用于根据缩放后的刻度数量、缩放后的刻度对应的时间信息,生成缩放后的进度条,用于控制对应媒体的播放进度。According to some other embodiments of the present disclosure, a device for generating a progress bar is provided, including: a quantity determination unit, configured to determine the number of scaled scales according to the obtained multiplier for scaling the current progress bar; a time determination unit, using Determine the time information corresponding to the scaled scale according to the number of scaled scales and the total duration of the corresponding media of the current progress bar; the generating unit is used to generate according to the number of scaled scales and the time information corresponding to the scaled scale The scaled progress bar is used to control the playback progress of the corresponding media.
在一些实施例中,缩放后的刻度数量与进行缩放的倍数正相关,刻度对应的时间信息的精度与进行缩放的倍数正相关。In some embodiments, the number of scales after scaling is positively correlated with the scaling factor, and the accuracy of the time information corresponding to the scale is positively correlated with the scaling factor.
在一些实施例中,生成单元根据进行缩放的倍数,修改当前进度条的宽度属性,生成缩放后的进度条,宽度属性对应的宽度与进行缩放的倍数正相关。In some embodiments, the generation unit modifies the width attribute of the current progress bar according to the scaling factor to generate the scaled progress bar, and the width corresponding to the width attribute is positively correlated with the scaling factor.
根据本公开的又一些实施例,提供一种进度条的生成装置,包括:存储器;和耦接至存储器的处理器,处理器被配置为基于存储在存储器装置中的指令,执行上述任一个实施例中的进度条的生成方法。According to some other embodiments of the present disclosure, there is provided a device for generating a progress bar, including: a memory; and a processor coupled to the memory, the processor is configured to execute any one of the above implementations based on instructions stored in the memory device How to generate the progress bar in the example.
根据本公开的再一些实施例,提供一种非易失性计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述任一个实施例中的进度条的生成方法。According to some further embodiments of the present disclosure, a non-volatile computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method for generating the progress bar in any one of the above-mentioned embodiments is implemented.
根据本公开的再一些实施例,提供一种计算机程序,包括:指令,指令当由处理器执行时使处理器执行根据上述任一个实施例中的进度条的生成方法。According to some further embodiments of the present disclosure, a computer program is provided, including: instructions, which, when executed by a processor, cause the processor to execute the method for generating a progress bar according to any one of the above embodiments.
在上述实施例中,根据需求生成缩放后的进度条,能够根据缩放倍数,动态调节进度条的控制精度。这样,可以提高媒体进度控制效果、用户体验。In the above embodiment, the scaled progress bar is generated according to the requirement, and the control accuracy of the progress bar can be dynamically adjusted according to the scaling factor. In this way, the media progress control effect and user experience can be improved.
附图说明Description of drawings
构成说明书的一部分的附图描述了本公开的实施例,并且连同说明书一起用于解释本公开的原理。The accompanying drawings, which constitute a part of this specification, illustrate the embodiments of the disclosure and together with the description serve to explain the principles of the disclosure.
参照附图,根据下面的详细描述,可以更加清楚地理解本公开:The present disclosure can be more clearly understood from the following detailed description with reference to the accompanying drawings:
图1示出本公开的进度条的生成方法的一些实施例的流程图;FIG. 1 shows a flowchart of some embodiments of a method for generating a progress bar of the present disclosure;
图2示出本公开的进度条的生成方法的另一些实施例的流程图;FIG. 2 shows a flow chart of another embodiment of the method for generating a progress bar of the present disclosure;
图3a、3b示出本公开的进度条的生成方法的一些实施例的框图;Figures 3a and 3b show block diagrams of some embodiments of the method for generating a progress bar of the present disclosure;
图4示出本公开的进度条的生成装置的一些实施例的框图;Fig. 4 shows a block diagram of some embodiments of the device for generating a progress bar of the present disclosure;
图5示出本公开的进度条的生成装置的另一些实施例的框图;Fig. 5 shows a block diagram of other embodiments of the device for generating a progress bar of the present disclosure;
图6示出本公开的进度条的生成装置的又一些实施例的框图。Fig. 6 shows a block diagram of some other embodiments of the device for generating a progress bar of the present disclosure.
具体实施方式Detailed ways
现在将参照附图来详细描述本公开的各种示例性实施例。应注意到:除非另外具体说明,否则在这些实施例中阐述的部件和步骤的相对布置、数字表达式和数值不限制本公开的范围。Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that relative arrangements of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
同时,应当明白,为了便于描述,附图中所示出的各个部分的尺寸并不是按照实际的比例关系绘制的。At the same time, it should be understood that, for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
以下对至少一个示例性实施例的描述实际上仅仅是说明性的,决不作为对本公开及其应用或使用的任何限制。The following description of at least one exemplary embodiment is merely illustrative in nature and in no way intended as any limitation of the disclosure, its application or uses.
对于相关领域普通技术人员已知的技术、方法和设备可能不作详细讨论,但在适当情况下,技术、方法和设备应当被视为授权说明书的一部分。Techniques, methods, and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, techniques, methods, and devices should be considered part of the authorized description.
在这里示出和讨论的所有示例中,任何具体值应被解释为仅仅是示例性的,而不是作为限制。因此,示例性实施例的其它示例可以具有不同的值。In all examples shown and discussed herein, any specific values should be construed as exemplary only, and not as limitations. Therefore, other examples of the exemplary embodiment may have different values.
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步讨论。It should be noted that like numerals and letters denote like items in the following figures, therefore, once an item is defined in one figure, it does not require further discussion in subsequent figures.
针对上述技术问题,本公开的技术方案能够放大进度条,使其显示的播放进度更加精细。例如,放大前的进度条的精度为分级别,放大后的进度条的精度可以到秒级别。这样,能够更加精确、方便地控制媒体播放进度。In view of the above technical problems, the technical solution disclosed in the present disclosure can enlarge the progress bar, so that the displayed playback progress is finer. For example, the precision of the progress bar before zooming in is sub-level, and the precision of the progress bar after zooming in can reach the second level. In this way, the progress of media playback can be controlled more precisely and conveniently.
另外,本公开生成的带刻度的进度条能够实现刻度的缩放,使得用户的触摸控制更加准确、控制刻度更加精准。例如,可以通过如下的实施例实现本公开的技术方案。In addition, the scaled progress bar generated in the present disclosure can realize scale scaling, so that the user's touch control is more accurate and the control scale is more precise. For example, the technical solutions of the present disclosure can be realized through the following embodiments.
图1示出本公开的进度条的生成方法的一些实施例的流程图。Fig. 1 shows a flow chart of some embodiments of the method for generating a progress bar of the present disclosure.
如图1所示,在步骤110中,根据获取的对当前进度条进行缩放的倍数,确定缩放后的刻度数量。As shown in FIG. 1 , in step 110 , according to the acquired scaling factor for the current progress bar, the number of scales after scaling is determined.
在一些实施例中,通过自定义View提供缩放控制按钮,控制进度条刻度的缩放。In some embodiments, a scaling control button is provided by customizing the View to control scaling of the progress bar scale.
在一些实施例中,随着进度条宽度的缩放,增加刻度的时间精度。例如,当前进度条的宽度被均分为10个刻度,如果将进度条宽度扩大3倍,则将缩放后的进度条均分为30个刻度。这样,使得进度条每个刻度对应的时间精度更加精细。In some embodiments, as the width of the progress bar scales, the time precision of the scale increases. For example, the width of the current progress bar is equally divided into 10 scales, and if the width of the progress bar is enlarged by 3 times, the scaled progress bar is divided into 30 scales. In this way, the time precision corresponding to each scale of the progress bar is finer.
在一些实施例中,自定义进度条(缩放后的进度条)可以继承原生进度条(当前进度条)的属性。例如,可以通过MySeekBar extends SeekBar来继承。属性可以包括支持通过代码更新进度、支持手动拖动改变进度、支持自定义进度条背景、支持自定义拖拽按钮等属性中的至少一项。In some embodiments, the custom progress bar (scaled progress bar) can inherit the properties of the native progress bar (current progress bar). For example, it can be inherited by MySeekBar extends SeekBar. The attribute may include at least one of attributes such as support for updating the progress through code, support for changing the progress by manual dragging, support for customizing the background of the progress bar, and support for customizing the drag button.
在一些实施例中,可以通过xml(eXtensible Markup Language,可扩展标记语言)的布局文件,设置seekbar(缩放后的进度条)的高度属性。In some embodiments, the height attribute of the seekbar (zoomed progress bar) can be set through an xml (eXtensible Markup Language, Extensible Markup Language) layout file.
在步骤120中,根据缩放后的刻度数量和当前进度条的对应媒体的总时长,确定缩放后的刻度对应的时间信息。In step 120, the time information corresponding to the scaled scale is determined according to the number of scaled scales and the total duration of the media corresponding to the current progress bar.
在一些实施例中,缩放后的刻度数量与进行缩放的倍数正相关,刻度对应的时间信息的精度与进行缩放的倍数正相关。In some embodiments, the number of scales after scaling is positively correlated with the scaling factor, and the accuracy of the time information corresponding to the scale is positively correlated with the scaling factor.
在一些实施例中,可以初始化缩放后的进度条的画笔、颜色、字体大小等属性。 例如,初始化的的属性可以包括刻度线画笔、刻度值画笔等。In some embodiments, properties such as pen, color, and font size of the scaled progress bar may be initialized. For example, the initialized properties may include a scale line brush, a scale value brush, and the like.
在一些实施例中,每隔预设数量的刻度,设置一个刻度节点;在刻度节点上显示其对应的时间信息,在刻度节点以外的刻度上不显示时间信息。In some embodiments, a scale node is set every preset number of scales; the corresponding time information is displayed on the scale nodes, and no time information is displayed on the scales other than the scale nodes.
例如,预设数量可以为1刻度、5刻度、10刻度等。可以在10刻度的位置显示相应的时间信息。显示的刻度对应的时间信息的格式可以为“时:分:秒”。For example, the preset number can be 1 scale, 5 scales, 10 scales and so on. The corresponding time information can be displayed at the position of 10 scales. The format of the time information corresponding to the displayed scale can be "hour: minute: second".
在一些实施例中,可以根据缩放的倍数,将进度条的总刻度数缩放相应的倍数;将视频总时长均分为相应数量的刻度。例如,可以每隔10个刻度显示对应的时间信息。In some embodiments, according to the scaling multiple, the total scale number of the progress bar may be scaled by a corresponding multiple; and the total duration of the video may be equally divided into a corresponding number of scales. For example, corresponding time information can be displayed every 10 scales.
在步骤130中,根据缩放后的刻度数量、缩放后的刻度对应的时间信息,生成缩放后的进度条,用于控制对应媒体的播放进度。In step 130, a scaled progress bar is generated according to the number of scaled scales and the time information corresponding to the scaled scales to control the playing progress of the corresponding media.
在一些实施例中,根据进行缩放的倍数,修改当前进度条的宽度属性,生成缩放后的进度条,宽度属性对应的宽度与进行缩放的倍数正相关。In some embodiments, the width attribute of the current progress bar is modified according to the scaling factor to generate a scaled progress bar, and the width corresponding to the width attribute is positively correlated with the scaling factor.
在一些实施例中,外部调用perfor()函数传递宽度属性,通过Android属性动画修改当前进度条的宽度属性。In some embodiments, the perfor() function is called externally to pass the width attribute, and the width attribute of the current progress bar is modified through Android attribute animation.
例如,外部调用perfor(),对缩放倍数进行传递参数处理;通过Android属性动画,修改对象的width属性;对进度条宽度进行缩放后,重新画出缩放后的刻度线及刻度值。For example, call perfor() externally to transfer parameters for the zoom factor; modify the width property of the object through Android property animation; after scaling the width of the progress bar, redraw the scaled scale line and scale value.
在一些实施例中,将当前进度条的属性,继承为缩放后的进度条的属性;根据属性,生成缩放后的进度条。例如,属性包括通过代码更新进度、通过拖拽改变进度、自定义进度条背景、自定义拖拽按钮中的一项或多项。In some embodiments, the properties of the current progress bar are inherited as the properties of the scaled progress bar; according to the properties, the scaled progress bar is generated. For example, the properties include one or more of updating progress through code, changing progress through dragging, customizing the background of the progress bar, and customizing the dragging button.
在一些实施例中,嵌套HorizontalScrollView控件,对缩放后的进度条进行横向拖动。例如,嵌套HorizontalScrollView控件(可以使内部控件横向滑动),可以横向滑动进度条。In some embodiments, the HorizontalScrollView control is nested, and the scaled progress bar is dragged horizontally. For example, nesting the HorizontalScrollView control (which can make the inner control slide horizontally) can slide the progress bar horizontally.
图2示出本公开的进度条的生成方法的另一些实施例的流程图。Fig. 2 shows a flow chart of other embodiments of the method for generating a progress bar of the present disclosure.
如图2所示,在步骤210中,自定义进度条(缩放后的进度条)可以继承原生进度条(当前进度条)的属性。例如,可以通过MySeekBar extends SeekBar来继承。属性可以包括支持通过代码更新进度、支持手动拖动改变进度、支持自定义进度条背景、支持自定义拖拽按钮等属性中的至少一项。As shown in FIG. 2, in step 210, the custom progress bar (scaled progress bar) may inherit the properties of the original progress bar (current progress bar). For example, it can be inherited by MySeekBar extends SeekBar. The attribute may include at least one of attributes such as support for updating the progress through code, support for changing the progress by manual dragging, support for customizing the background of the progress bar, and support for customizing the drag button.
在步骤220中,可以通过xml(eXtensible Markup Language,可扩展标记 语言)的布局文件,设置seekbar(缩放后的进度条)的高度属性。In step 220, the height attribute of seekbar (zoomed progress bar) can be set through the layout file of xml (eXtensible Markup Language, Extensible Markup Language).
在步骤230中,可以初始化缩放后的进度条的画笔、颜色、字体大小等属性。例如,初始化的的属性可以包括刻度线画笔、刻度值画笔等。In step 230, attributes such as brush, color, and font size of the scaled progress bar may be initialized. For example, the initialized properties may include a scale line brush, a scale value brush, and the like.
例如,预设数量可以为1刻度、5刻度、10刻度等。可以在10刻度的位置显示相应的时间信息。显示的刻度对应的时间信息的格式可以为“时:分:秒”。For example, the preset number can be 1 scale, 5 scales, 10 scales and so on. The corresponding time information can be displayed at the position of 10 scales. The format of the time information corresponding to the displayed scale can be "hour: minute: second".
在一些实施例中,可以根据缩放的倍数,将进度条的总刻度数缩放相应的倍数;将视频总时长均分为相应数量的刻度。例如,可以每隔10个刻度显示对应的时间信息。In some embodiments, according to the scaling multiple, the total scale number of the progress bar may be scaled by a corresponding multiple; and the total duration of the video may be equally divided into a corresponding number of scales. For example, corresponding time information can be displayed every 10 scales.
在步骤240中,外部调用perfor(),对缩放倍数进行传递参数处理;通过Android属性动画,修改对象的width属性;对进度条宽度进行缩放后,重新画出缩放后的刻度线及刻度值。In step 240, call perfor() externally to pass parameter processing on the zoom factor; modify the width attribute of the object through the Android attribute animation; after scaling the width of the progress bar, redraw the scaled scale line and scale value.
在步骤250中,随着进度条宽度的缩放,增加刻度的时间精度。例如,当前进度条的宽度被均分为10个刻度,如果将进度条宽度扩大3倍,则将缩放后的进度条均分为30个刻度。这样,使得进度条每个刻度对应的时间精度更加精细。In step 250, as the width of the progress bar scales, the time precision of the scale is increased. For example, the width of the current progress bar is equally divided into 10 scales, and if the width of the progress bar is enlarged by 3 times, the scaled progress bar is divided into 30 scales. In this way, the time precision corresponding to each scale of the progress bar is finer.
在步骤260中,嵌套HorizontalScrollView控件,对缩放后的进度条进行横向拖动。例如,嵌套HorizontalScrollView控件(可以使内部控件横向滑动),可以横向滑动进度条。In step 260, the HorizontalScrollView control is nested, and the scaled progress bar is horizontally dragged. For example, nesting the HorizontalScrollView control (which can make the inner control slide horizontally) can slide the progress bar horizontally.
图3a、3b示出本公开的进度条的生成方法的一些实施例的框图。Figures 3a and 3b show block diagrams of some embodiments of the method for generating a progress bar of the present disclosure.
如图3a、3b所示,视频下的拖拽条是两个原生的seekbar拼在一起生成的。例如,可以根据需求设置不同的显示风格。可以在进度条的两端中的至少一段设置按钮,用于显示缩放倍数,也可以用于进行缩放。As shown in Figure 3a and 3b, the drag bar under the video is generated by combining two original seekbars. For example, different display styles can be set according to requirements. Buttons can be set on at least one of the two ends of the progress bar, which can be used to display the zoom factor, and can also be used to zoom.
图3a中是缩放前的进度条(1倍宽度),图3b中是缩放后的进度条(2倍宽度)的进度条(4倍宽度)。缩放前的进度条的宽度小于缩放前的进度条;缩放前的进度条的刻度对应的时间精度低于缩放后的进度条的时间精度。Figure 3a shows the progress bar (1 times the width) before scaling, and Figure 3b shows the progress bar (4 times the width) after scaling the progress bar (2 times the width). The width of the progress bar before scaling is smaller than that of the progress bar before scaling; the time precision corresponding to the scale of the progress bar before scaling is lower than the time precision of the progress bar after scaling.
图4示出本公开的进度条的生成装置的一些实施例的框图。Fig. 4 shows a block diagram of some embodiments of an apparatus for generating a progress bar of the present disclosure.
如图4所示,进度条的生成装置4包括数量确定单元41、时间确定单元42和生成单元43。As shown in FIG. 4 , the generating device 4 of the progress bar includes a quantity determining unit 41 , a time determining unit 42 and a generating unit 43 .
数量确定单元41根据获取的对当前进度条进行缩放的倍数,确定缩放后的刻度数量。例如,当前进度条的刻度的时间精度,随着对当前进度条的宽度的缩放增加。The quantity determination unit 41 determines the scaled number of scales according to the acquired scaling multiple of the current progress bar. For example, the time precision of the scale of the current progress bar increases as the width of the current progress bar is scaled.
在一些实施例中,缩放后的刻度数量与进行缩放的倍数正相关,刻度对应的时间信息的精度与进行缩放的倍数正相关。In some embodiments, the number of scales after scaling is positively correlated with the scaling factor, and the accuracy of the time information corresponding to the scale is positively correlated with the scaling factor.
时间确定单元42根据缩放后的刻度数量和当前进度条的对应媒体的总时长,确定缩放后的刻度对应的时间信息。The time determination unit 42 determines the time information corresponding to the scaled scales according to the scaled scale number and the total duration of the media corresponding to the current progress bar.
在一些实施例中,数量确定单元41根据缩放的倍数,对当前进度条的刻度数量进行缩放,以确定缩放后的刻度数量;时间确定单元42根据缩放后的刻度数量,均分对应媒体的总时长,以确定缩放后的刻度。In some embodiments, the number determination unit 41 scales the scale number of the current progress bar according to the scaling multiple to determine the scaled scale number; the time determination unit 42 equally divides the total amount of the corresponding media according to the scaled scale number Duration to determine scaled ticks.
生成单元43根据缩放后的刻度数量、缩放后的刻度对应的时间信息,生成缩放后的进度条,用于控制对应媒体的播放进度。The generating unit 43 generates a scaled progress bar according to the number of scaled scales and the time information corresponding to the scaled scales, for controlling the playing progress of the corresponding media.
在一些实施例中,生成单元43根据进行缩放的倍数,修改当前进度条的宽度属性,生成缩放后的进度条,宽度属性对应的宽度与进行缩放的倍数正相关。In some embodiments, the generating unit 43 modifies the width attribute of the current progress bar according to the scaling factor to generate the scaled progress bar, and the width corresponding to the width attribute is positively correlated with the scaling factor.
在一些实施例中,生成单元43每隔预设数量的刻度,设置一个刻度节点;在刻度节点上显示其对应的时间信息,在刻度节点以外的刻度上不显示时间信息。In some embodiments, the generating unit 43 sets a scale node every preset number of scales; the corresponding time information is displayed on the scale nodes, and no time information is displayed on the scales other than the scale nodes.
在一些实施例中,生成单元43外部调用perfor()函数传递宽度属性,通过Android属性动画修改当前进度条的宽度属性。In some embodiments, the generation unit 43 externally calls the perfor() function to pass the width attribute, and modifies the width attribute of the current progress bar through Android attribute animation.
在一些实施例中,生成单元43将当前进度条的属性,继承为缩放后的进度条的属性;根据属性,生成缩放后的进度条。例如,属性包括通过代码更新进度、通过拖拽改变进度、自定义进度条背景、自定义拖拽按钮中的一项或多项。In some embodiments, the generation unit 43 inherits the attributes of the current progress bar as the attributes of the scaled progress bar; according to the attributes, the scaled progress bar is generated. For example, the properties include one or more of updating progress through code, changing progress through dragging, customizing the background of the progress bar, and customizing the dragging button.
在一些实施例中,生成单元43嵌套HorizontalScrollView控件,对缩放后的进度条进行横向拖动。In some embodiments, the generating unit 43 nests a HorizontalScrollView control, and drags the scaled progress bar horizontally.
图5示出本公开的进度条的生成装置的另一些实施例的框图。Fig. 5 shows a block diagram of other embodiments of the device for generating a progress bar of the present disclosure.
如图5所示,该实施例的进度条的生成装置5包括:存储器51以及耦接至该存储器51的处理器52,处理器52被配置为基于存储在存储器51中的指令,执行本公开中任意一个实施例中的进度条的生成方法。As shown in FIG. 5 , the device 5 for generating a progress bar in this embodiment includes: a memory 51 and a processor 52 coupled to the memory 51 , the processor 52 is configured to execute the present disclosure based on instructions stored in the memory 51 . A method for generating the progress bar in any one of the embodiments.
其中,存储器51例如可以包括系统存储器、固定非易失性存储介质等。系统存储器例如存储有操作系统、应用程序、引导装载程序Boot Loader、数据库以及其他程序等。Wherein, the memory 51 may include, for example, a system memory, a fixed non-volatile storage medium, and the like. The system memory stores, for example, an operating system, an application program, a Boot Loader, a database, and other programs.
图6示出本公开的进度条的生成装置的又一些实施例的框图。Fig. 6 shows a block diagram of some other embodiments of the device for generating a progress bar of the present disclosure.
如图6所示,该实施例的进度条的生成装置6包括:存储器610以及耦接至该存 储器610的处理器620,处理器620被配置为基于存储在存储器610中的指令,执行前述任意一个实施例中的进度条的生成方法。As shown in FIG. 6 , the device 6 for generating a progress bar in this embodiment includes: a memory 610 and a processor 620 coupled to the memory 610. The processor 620 is configured to execute any of the foregoing based on instructions stored in the memory 610. A method for generating a progress bar in an embodiment.
存储器610例如可以包括系统存储器、固定非易失性存储介质等。系统存储器例如存储有操作系统、应用程序、引导装载程序Boot Loader以及其他程序等。The memory 610 may include, for example, a system memory, a fixed non-volatile storage medium, and the like. The system memory stores, for example, an operating system, an application program, a Boot Loader program, and other programs.
进度条的生成装置6还可以包括输入输出接口630、网络接口640、存储接口650等。这些接口630、640、650以及存储器610和处理器620之间例如可以通过总线660连接。其中,输入输出接口630为显示器、鼠标、键盘、触摸屏、麦克、音箱等输入输出设备提供连接接口。网络接口640为各种联网设备提供连接接口。存储接口650为SD卡、U盘等外置存储设备提供连接接口。The device 6 for generating a progress bar may further include an input and output interface 630, a network interface 640, a storage interface 650, and the like. These interfaces 630 , 640 , and 650 , as well as the memory 610 and the processor 620 may be connected through a bus 660 , for example. Wherein, the input and output interface 630 provides a connection interface for input and output devices such as a display, a mouse, a keyboard, a touch screen, a microphone, and a speaker. The network interface 640 provides a connection interface for various networked devices. The storage interface 650 provides connection interfaces for external storage devices such as SD cards and U disks.
在一些实施例中,本公开的计算机程序包括:指令,指令当由处理器执行时使处理器执行根据上述任一个实施例中的进度条的生成方法。In some embodiments, the computer program of the present disclosure includes: instructions, which when executed by a processor cause the processor to execute the method for generating a progress bar according to any one of the above embodiments.
本领域内的技术人员应当明白,本公开的实施例可提供为方法、系统、或计算机程序产品。因此,本公开可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本公开可采用在一个或多个其中包含有计算机可用程序代码的计算机可用非瞬时性存储介质包括但不限于磁盘存储器、CD-ROM、光学存储器等上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Accordingly, the present disclosure can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable non-transitory storage media including, but not limited to, disk storage, CD-ROM, optical storage, etc., having computer-usable program code embodied therein.
至此,已经详细描述了根据本公开的进度条的生成方法、进度条的生成装置和非易失性计算机可读存储介质。为了避免遮蔽本公开的构思,没有描述本领域所公知的一些细节。本领域技术人员根据上面的描述,完全可以明白如何实施这里公开的技术方案。So far, the method for generating a progress bar, the device for generating a progress bar, and the non-volatile computer-readable storage medium according to the present disclosure have been described in detail. Certain details known in the art have not been described in order to avoid obscuring the concept of the present disclosure. Based on the above description, those skilled in the art can fully understand how to implement the technical solutions disclosed herein.
可能以许多方式来实现本公开的方法和系统。例如,可通过软件、硬件、固件或者软件、硬件、固件的任何组合来实现本公开的方法和系统。用于方法的步骤的上述顺序仅是为了进行说明,本公开的方法的步骤不限于以上具体描述的顺序,除非以其它方式特别说明。此外,在一些实施例中,还可将本公开实施为记录在记录介质中的程序,这些程序包括用于实现根据本公开的方法的机器可读指令。因而,本公开还覆盖存储用于执行根据本公开的方法的程序的记录介质。The methods and systems of the present disclosure may be implemented in many ways. For example, the methods and systems of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above sequence of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the sequence described above unless specifically stated otherwise. Furthermore, in some embodiments, the present disclosure can also be implemented as programs recorded in recording media, the programs including machine-readable instructions for realizing the method according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
虽然已经通过示例对本公开的一些特定实施例进行了详细说明,但是本领域的技术人员应该理解,以上示例仅是为了进行说明,而不是为了限制本公开的范围。本领域的技术人员应该理解,可在不脱离本公开的范围和精神的情况下,对以上实施例进 行修改。本公开的范围由所附权利要求来限定。Although some specific embodiments of the present disclosure have been described in detail through examples, those skilled in the art should understand that the above examples are for illustration only, rather than limiting the scope of the present disclosure. Those skilled in the art will appreciate that modifications can be made to the above embodiments without departing from the scope and spirit of the present disclosure. The scope of the present disclosure is defined by the appended claims.

Claims (16)

  1. 一种进度条的生成方法,包括:A method for generating a progress bar, comprising:
    根据获取的对当前进度条进行缩放的倍数,确定缩放后的刻度数量;Determine the number of scaled scales according to the obtained scaling multiple of the current progress bar;
    根据所述缩放后的刻度数量和所述当前进度条的对应媒体的总时长,确定缩放后的刻度对应的时间信息;Determine the time information corresponding to the scaled scale according to the scaled scale number and the total duration of the corresponding media of the current progress bar;
    根据所述缩放后的刻度数量、所述缩放后的刻度对应的时间信息,生成缩放后的进度条,用于控制所述对应媒体的播放进度。A scaled progress bar is generated according to the number of scaled scales and time information corresponding to the scaled scales to control the playing progress of the corresponding media.
  2. 根据权利要求1所述的生成方法,其中,所述缩放后的刻度数量与所述进行缩放的倍数正相关,所述刻度对应的时间信息的精度与所述进行缩放的倍数正相关。The generation method according to claim 1, wherein the number of scales after scaling is positively correlated with the scaling multiple, and the accuracy of the time information corresponding to the scale is positively correlated with the scaling multiple.
  3. 根据权利要求1所述的生成方法,其中,所述根据所述缩放后的刻度数量、所述缩放后的刻度对应的时间信息,生成缩放后的进度条包括:The generating method according to claim 1, wherein said generating the scaled progress bar according to the number of scaled scales and the time information corresponding to the scaled scales comprises:
    根据所述进行缩放的倍数,修改所述当前进度条的宽度属性,生成所述缩放后的进度条,所述宽度属性对应的宽度与所述进行缩放的倍数正相关。Modifying the width attribute of the current progress bar according to the zooming multiple to generate the zoomed progress bar, where the width corresponding to the width attribute is positively correlated with the zooming multiple.
  4. 根据权利要求1所述的生成方法,其中,所述据所述缩放后的刻度数量、所述缩放后的刻度对应的时间信息,生成缩放后的进度条包括:The generation method according to claim 1, wherein, according to the number of scales after scaling and the time information corresponding to the scaling after scaling, generating the scaled progress bar comprises:
    每隔预设数量的刻度,设置一个刻度节点;Set a tick node every preset number of ticks;
    在所述刻度节点上显示其对应的时间信息,在所述刻度节点以外的刻度上不显示时间信息。The corresponding time information is displayed on the scale nodes, and no time information is displayed on the scales other than the scale nodes.
  5. 根据权利要求3所述的生成方法,其中,所述根据所述进行缩放的倍数,修改所述当前进度条的宽度属性,生成所述缩放后的进度条包括:The generating method according to claim 3, wherein, modifying the width attribute of the current progress bar according to the scaling factor, and generating the scaled progress bar includes:
    通过外部调用性能perfor()函数,传递所述宽度属性,通过Android属性动画,修改所述当前进度条的宽度属性。By calling the performance perfor() function externally, passing the width attribute, and modifying the width attribute of the current progress bar through Android attribute animation.
  6. 根据权利要求1-5任一项所述的生成方法,其中,所述根据所述缩放后的刻度 数量、所述缩放后的刻度对应的时间信息,生成缩放后的进度条包括:The generation method according to any one of claims 1-5, wherein, according to the time information corresponding to the scale quantity after the scale and the scale after the scale, generating a scaled progress bar comprises:
    将所述当前进度条的属性,继承为所述缩放后的进度条的属性;Inheriting the attributes of the current progress bar as the attributes of the scaled progress bar;
    根据所述属性,生成所述缩放后的进度条。According to the property, generate the scaled progress bar.
  7. 根据权利要求6所述的生成方法,其中,The generating method according to claim 6, wherein,
    所述属性包括通过代码更新进度、通过拖拽改变进度、自定义进度条背景、自定义拖拽按钮中的一项或多项。The attributes include one or more of updating progress through code, changing progress through dragging, customizing the background of the progress bar, and customizing the dragging button.
  8. 根据权利要求1-5任一项所述的生成方法,还包括:The generating method according to any one of claims 1-5, further comprising:
    嵌套水平滚动视图HorizontalScrollView控件,对所述缩放后的进度条进行横向拖动。Nest the HorizontalScrollView control to horizontally drag the scaled progress bar.
  9. 根据权利要求1-5任一项所述的生成方法,还包括:The generating method according to any one of claims 1-5, further comprising:
    随着对所述当前进度条的宽度进行缩放,增加所述当前进度条的刻度的时间精度。As the width of the current progress bar is scaled, the time precision of the scale of the current progress bar is increased.
  10. 根据权利要求1-5任一项所述的生成方法,其中,所述根据获取的对当前进度条进行缩放的倍数,确定缩放后的刻度数量包括:The generation method according to any one of claims 1-5, wherein said determining the number of scaled scales according to the acquired scaling multiple of the current progress bar comprises:
    根据所述缩放的倍数,对所述当前进度条的刻度数量进行缩放,以确定所述缩放后的刻度数量;Scaling the number of scales of the current progress bar according to the scaling multiple to determine the scaled number of scales;
    所述根据所述缩放后的刻度数量和所述当前进度条的对应媒体的总时长,确定缩放后的刻度对应的时间信息包括:According to the number of scaled scales and the total duration of the corresponding media of the current progress bar, determining the time information corresponding to the scaled scales includes:
    根据所述缩放后的刻度数量,对所述对应媒体的总时长进行均分,以确定缩放后的刻度。According to the number of scaled scales, the total duration of the corresponding media is equally divided to determine scaled scales.
  11. 一种进度条的生成装置,包括:A device for generating a progress bar, comprising:
    数量确定单元,用于根据获取的对当前进度条进行缩放的倍数,确定缩放后的刻度数量;The quantity determination unit is used to determine the number of scales after scaling according to the obtained scaling multiple of the current progress bar;
    时间确定单元,用于根据所述缩放后的刻度数量和所述当前进度条的对应媒体的总时长,确定缩放后的刻度对应的时间信息;A time determining unit, configured to determine the time information corresponding to the scaled scale according to the scaled scale number and the total duration of the corresponding media of the current progress bar;
    生成单元,用于根据所述缩放后的刻度数量、所述缩放后的刻度对应的时间信息,生成缩放后的进度条,用于控制所述对应媒体的播放进度。A generating unit, configured to generate a scaled progress bar according to the scaled number of scales and time information corresponding to the scaled scales, for controlling the playing progress of the corresponding media.
  12. 根据权利要求11所述的生成装置,其中,所述缩放后的刻度数量与所述进行缩放的倍数正相关,所述刻度对应的时间信息的精度与所述进行缩放的倍数正相关。The generating device according to claim 11, wherein the scaled number of scales is positively correlated with the scaling multiple, and the accuracy of time information corresponding to the scales is positively correlated with the scaling multiple.
  13. 根据权利要求11所述的生成装置,其中,The generating device according to claim 11, wherein,
    所述生成单元根据所述进行缩放的倍数,修改所述当前进度条的宽度属性,生成所述缩放后的进度条,所述宽度属性对应的宽度与所述进行缩放的倍数正相关。The generating unit modifies the width attribute of the current progress bar according to the zooming multiple to generate the zoomed progress bar, and the width corresponding to the width attribute is positively correlated with the zooming multiple.
  14. 一种进度条的生成装置,包括:A device for generating a progress bar, comprising:
    存储器;和memory; and
    耦接至所述存储器的处理器,所述处理器被配置为基于存储在所述存储器中的指令,执行权利要求1-10任一项所述的进度条的生成方法。A processor coupled to the memory, the processor configured to execute the method for generating a progress bar according to any one of claims 1-10 based on instructions stored in the memory.
  15. 一种非易失性计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现权利要求1-10任一项所述的进度条的生成方法。A non-volatile computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the method for generating the progress bar according to any one of claims 1-10 is implemented.
  16. 一种计算机程序,包括:A computer program comprising:
    指令,所述指令当由处理器执行时使所述处理器执行根据权利要求1-10任一项所述的进度条的生成方法。An instruction, the instruction, when executed by a processor, causes the processor to execute the method for generating a progress bar according to any one of claims 1-10.
PCT/CN2022/124329 2021-10-12 2022-10-10 Progress bar generation method and apparatus, and non-volatile computer readable storage medium WO2023061318A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111187704.0 2021-10-12
CN202111187704.0A CN113934423A (en) 2021-10-12 2021-10-12 Method and device for generating progress bar and non-volatile computer-readable storage medium

Publications (1)

Publication Number Publication Date
WO2023061318A1 true WO2023061318A1 (en) 2023-04-20

Family

ID=79278433

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/124329 WO2023061318A1 (en) 2021-10-12 2022-10-10 Progress bar generation method and apparatus, and non-volatile computer readable storage medium

Country Status (2)

Country Link
CN (1) CN113934423A (en)
WO (1) WO2023061318A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113934423A (en) * 2021-10-12 2022-01-14 北京沃东天骏信息技术有限公司 Method and device for generating progress bar and non-volatile computer-readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104199611A (en) * 2014-08-29 2014-12-10 广东欧珀移动通信有限公司 Method and device for adjusting playing progress through mobile terminal
WO2014194527A1 (en) * 2013-06-08 2014-12-11 华为终端有限公司 Method for controlling multimedia browsing progress and terminal
US20160266781A1 (en) * 2015-03-11 2016-09-15 Microsoft Technology Licensing, Llc Customizable media player controls
CN111741265A (en) * 2020-06-23 2020-10-02 浙江大华技术股份有限公司 Video playing control method and device, electronic equipment and storage medium
CN112328353A (en) * 2021-01-06 2021-02-05 腾讯科技(深圳)有限公司 Display method and device of sub-application player, electronic equipment and storage medium
CN112540713A (en) * 2020-11-13 2021-03-23 广州市百果园网络科技有限公司 Video preview progress bar scaling method, system, device and storage medium
CN113934423A (en) * 2021-10-12 2022-01-14 北京沃东天骏信息技术有限公司 Method and device for generating progress bar and non-volatile computer-readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014194527A1 (en) * 2013-06-08 2014-12-11 华为终端有限公司 Method for controlling multimedia browsing progress and terminal
CN104199611A (en) * 2014-08-29 2014-12-10 广东欧珀移动通信有限公司 Method and device for adjusting playing progress through mobile terminal
US20160266781A1 (en) * 2015-03-11 2016-09-15 Microsoft Technology Licensing, Llc Customizable media player controls
CN111741265A (en) * 2020-06-23 2020-10-02 浙江大华技术股份有限公司 Video playing control method and device, electronic equipment and storage medium
CN112540713A (en) * 2020-11-13 2021-03-23 广州市百果园网络科技有限公司 Video preview progress bar scaling method, system, device and storage medium
CN112328353A (en) * 2021-01-06 2021-02-05 腾讯科技(深圳)有限公司 Display method and device of sub-application player, electronic equipment and storage medium
CN113934423A (en) * 2021-10-12 2022-01-14 北京沃东天骏信息技术有限公司 Method and device for generating progress bar and non-volatile computer-readable storage medium

Also Published As

Publication number Publication date
CN113934423A (en) 2022-01-14

Similar Documents

Publication Publication Date Title
JP5284509B2 (en) Method and system for displaying and interacting with paginated content
KR101213809B1 (en) electronic document style matrix
US8812975B2 (en) Managing windows through policies
US20150220504A1 (en) Visual Annotations for Objects
US20140325418A1 (en) Automatically manipulating visualized data based on interactivity
CN110300966B (en) Enhanced pivot table creation and interaction
KR101773574B1 (en) Method for chart visualizing of data table
US20140223281A1 (en) Touch Input Visualizations
US20140331179A1 (en) Automated Presentation of Visualized Data
WO2023061318A1 (en) Progress bar generation method and apparatus, and non-volatile computer readable storage medium
WO2019052115A1 (en) Application control style customization method and apparatus, and computer-readable storage medium
CN109213316B (en) Automatic layout engine
CN114489648A (en) Page generation method, system, terminal and medium
US20160217018A1 (en) Type Agnostic Data Engine
CN110663017A (en) Multi-stroke intelligent ink gesture language
US11837206B2 (en) Multidimensional gestures for music creation applications
US20140325404A1 (en) Generating Screen Data
JP6330348B2 (en) Information processing device
CN108268190A (en) Frequency spectrograph custom menu setting method and device
KR101809601B1 (en) Apparatus and method for producing animation
WO2023131112A1 (en) Video processing method and apparatus, and nonvolatile computer readable storage medium
US8640055B1 (en) Condensing hierarchies in user interfaces
US10409575B2 (en) System and method for developing software applications of wearable devices
CN111782309B (en) Method and device for displaying information and computer readable storage medium
TW202127222A (en) User interface adjustment method and touch display device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22880257

Country of ref document: EP

Kind code of ref document: A1