WO2023061318A1 - 进度条的生成方法、装置和非易失性计算机可读存储介质 - Google Patents
进度条的生成方法、装置和非易失性计算机可读存储介质 Download PDFInfo
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 44
- 230000000875 corresponding effect Effects 0.000 claims description 66
- 230000002596 correlated effect Effects 0.000 claims description 17
- 238000004590 computer program Methods 0.000 claims description 7
- 230000006870 function Effects 0.000 claims description 4
- 230000001276 controlling effect Effects 0.000 claims description 3
- 241000238876 Acari Species 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 8
- 230000000694 effects Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction 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/0485—Scrolling or panning
- G06F3/04855—Interaction with scrollbars
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction 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/0486—Drag-and-drop
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2203/00—Indexing scheme relating to G06F3/00 - G06F3/048
- G06F2203/048—Indexing scheme relating to G06F3/048
- G06F2203/04806—Zoom, 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.
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
本公开涉及一种进度条的生成方法、装置和非易失性计算机可读存储介质,涉及计算机技术领域。该生成方法包括:根据获取的对当前进度条进行缩放的倍数,确定缩放后的刻度数量;根据缩放后的刻度数量和当前进度条的对应媒体的总时长,确定缩放后的刻度对应的时间信息;根据缩放后的刻度数量、缩放后的刻度对应的时间信息,生成缩放后的进度条,用于控制对应媒体的播放进度。
Description
相关申请的交叉引用
本申请是以CN申请号为202111187704.0,申请日为2021年10月12日的申请为基础,并主张其优先权,该CN申请的公开内容在此作为整体引入本申请中。
本公开涉及计算机技术领域,特别涉及一种进度条的生成方法、进度条的生成装置和非易失性计算机可读存储介质。
通过给媒体播放器设置进度条,可以方便用户根据需要对媒体播放进度进行调节。例如,在相关技术中,为媒体播放器设置固定长度和精度的进度条。
发明内容
本公开的发明人发现上述相关技术中存在如下问题:无法根据需求动态调节进度条的控制精度,导致媒体进度控制效果差、用户体验差。
鉴于此,本公开提出了一种进度条的生成技术方案,能够根据需求动态调节进度条的控制精度,从而提高媒体进度控制效果、用户体验。
根据本公开的一些实施例,提供了一种进度条的生成方法,包括:根据获取的对当前进度条进行缩放的倍数,确定缩放后的刻度数量;根据缩放后的刻度数量和当前进度条的对应媒体的总时长,确定缩放后的刻度对应的时间信息;根据缩放后的刻度数量、缩放后的刻度对应的时间信息,生成缩放后的进度条,用于控制对应媒体的播放进度。
在一些实施例中,缩放后的刻度数量与进行缩放的倍数正相关,刻度对应的时间信息的精度与进行缩放的倍数正相关。
在一些实施例中,根据缩放后的刻度数量、缩放后的刻度对应的时间信息,生成缩放后的进度条包括:根据进行缩放的倍数,修改当前进度条的宽度属性,生成缩放后的进度条,宽度属性对应的宽度与进行缩放的倍数正相关。
在一些实施例中,据缩放后的刻度数量、缩放后的刻度对应的时间信息,生成缩放后的进度条包括:每隔预设数量的刻度,设置一个刻度节点;在刻度节点上显示其对应的时间信息,在刻度节点以外的刻度上不显示时间信息。
在一些实施例中,根据进行缩放的倍数,修改当前进度条的宽度属性,生成缩放后的进度条包括:外部调用perfor(性能)()函数传递宽度属性,通过Android属性动画修改当前进度条的宽度属性。
在一些实施例中,根据缩放后的刻度数量、缩放后的刻度对应的时间信息,生成缩放后的进度条包括:将当前进度条的属性,继承为缩放后的进度条的属性;根据属性,生成缩放后的进度条。
在一些实施例中,属性包括通过代码更新进度、通过拖拽改变进度、自定义进度条背景、自定义拖拽按钮中的一项或多项。
在一些实施例中,生成方法还包括:嵌套HorizontalScrollView(水平滚动视图)控件,对缩放后的进度条进行横向拖动。
在一些实施例中,生成方法还包括:随着对当前进度条的宽度进行缩放,增加当前进度条的刻度的时间精度。
在一些实施例中,据获取的对当前进度条进行缩放的倍数,确定缩放后的刻度数量包括:根据缩放的倍数,对当前进度条的刻度数量进行缩放,以确定缩放后的刻度数量;根据缩放后的刻度数量和当前进度条的对应媒体的总时长,确定缩放后的刻度对应的时间信息包括:根据缩放后的刻度数量,均分对应媒体的总时长,以确定缩放后的刻度。
根据本公开的另一些实施例,提供一种进度条的生成装置,包括:数量确定单元,用于根据获取的对当前进度条进行缩放的倍数,确定缩放后的刻度数量;时间确定单元,用于根据缩放后的刻度数量和当前进度条的对应媒体的总时长,确定缩放后的刻度对应的时间信息;生成单元,用于根据缩放后的刻度数量、缩放后的刻度对应的时间信息,生成缩放后的进度条,用于控制对应媒体的播放进度。
在一些实施例中,缩放后的刻度数量与进行缩放的倍数正相关,刻度对应的时间信息的精度与进行缩放的倍数正相关。
在一些实施例中,生成单元根据进行缩放的倍数,修改当前进度条的宽度属性,生成缩放后的进度条,宽度属性对应的宽度与进行缩放的倍数正相关。
根据本公开的又一些实施例,提供一种进度条的生成装置,包括:存储器;和耦接至存储器的处理器,处理器被配置为基于存储在存储器装置中的指令,执行上述任一个实施例中的进度条的生成方法。
根据本公开的再一些实施例,提供一种非易失性计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述任一个实施例中的进度条的生成方法。
根据本公开的再一些实施例,提供一种计算机程序,包括:指令,指令当由处理器执行时使处理器执行根据上述任一个实施例中的进度条的生成方法。
在上述实施例中,根据需求生成缩放后的进度条,能够根据缩放倍数,动态调节进度条的控制精度。这样,可以提高媒体进度控制效果、用户体验。
构成说明书的一部分的附图描述了本公开的实施例,并且连同说明书一起用于解释本公开的原理。
参照附图,根据下面的详细描述,可以更加清楚地理解本公开:
图1示出本公开的进度条的生成方法的一些实施例的流程图;
图2示出本公开的进度条的生成方法的另一些实施例的流程图;
图3a、3b示出本公开的进度条的生成方法的一些实施例的框图;
图4示出本公开的进度条的生成装置的一些实施例的框图;
图5示出本公开的进度条的生成装置的另一些实施例的框图;
图6示出本公开的进度条的生成装置的又一些实施例的框图。
现在将参照附图来详细描述本公开的各种示例性实施例。应注意到:除非另外具体说明,否则在这些实施例中阐述的部件和步骤的相对布置、数字表达式和数值不限制本公开的范围。
同时,应当明白,为了便于描述,附图中所示出的各个部分的尺寸并不是按照实际的比例关系绘制的。
以下对至少一个示例性实施例的描述实际上仅仅是说明性的,决不作为对本公开及其应用或使用的任何限制。
对于相关领域普通技术人员已知的技术、方法和设备可能不作详细讨论,但在适当情况下,技术、方法和设备应当被视为授权说明书的一部分。
在这里示出和讨论的所有示例中,任何具体值应被解释为仅仅是示例性的,而不是作为限制。因此,示例性实施例的其它示例可以具有不同的值。
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步讨论。
针对上述技术问题,本公开的技术方案能够放大进度条,使其显示的播放进度更加精细。例如,放大前的进度条的精度为分级别,放大后的进度条的精度可以到秒级别。这样,能够更加精确、方便地***体播放进度。
另外,本公开生成的带刻度的进度条能够实现刻度的缩放,使得用户的触摸控制更加准确、控制刻度更加精准。例如,可以通过如下的实施例实现本公开的技术方案。
图1示出本公开的进度条的生成方法的一些实施例的流程图。
如图1所示,在步骤110中,根据获取的对当前进度条进行缩放的倍数,确定缩放后的刻度数量。
在一些实施例中,通过自定义View提供缩放控制按钮,控制进度条刻度的缩放。
在一些实施例中,随着进度条宽度的缩放,增加刻度的时间精度。例如,当前进度条的宽度被均分为10个刻度,如果将进度条宽度扩大3倍,则将缩放后的进度条均分为30个刻度。这样,使得进度条每个刻度对应的时间精度更加精细。
在一些实施例中,自定义进度条(缩放后的进度条)可以继承原生进度条(当前进度条)的属性。例如,可以通过MySeekBar extends SeekBar来继承。属性可以包括支持通过代码更新进度、支持手动拖动改变进度、支持自定义进度条背景、支持自定义拖拽按钮等属性中的至少一项。
在一些实施例中,可以通过xml(eXtensible Markup Language,可扩展标记语言)的布局文件,设置seekbar(缩放后的进度条)的高度属性。
在步骤120中,根据缩放后的刻度数量和当前进度条的对应媒体的总时长,确定缩放后的刻度对应的时间信息。
在一些实施例中,缩放后的刻度数量与进行缩放的倍数正相关,刻度对应的时间信息的精度与进行缩放的倍数正相关。
在一些实施例中,可以初始化缩放后的进度条的画笔、颜色、字体大小等属性。 例如,初始化的的属性可以包括刻度线画笔、刻度值画笔等。
在一些实施例中,每隔预设数量的刻度,设置一个刻度节点;在刻度节点上显示其对应的时间信息,在刻度节点以外的刻度上不显示时间信息。
例如,预设数量可以为1刻度、5刻度、10刻度等。可以在10刻度的位置显示相应的时间信息。显示的刻度对应的时间信息的格式可以为“时:分:秒”。
在一些实施例中,可以根据缩放的倍数,将进度条的总刻度数缩放相应的倍数;将视频总时长均分为相应数量的刻度。例如,可以每隔10个刻度显示对应的时间信息。
在步骤130中,根据缩放后的刻度数量、缩放后的刻度对应的时间信息,生成缩放后的进度条,用于控制对应媒体的播放进度。
在一些实施例中,根据进行缩放的倍数,修改当前进度条的宽度属性,生成缩放后的进度条,宽度属性对应的宽度与进行缩放的倍数正相关。
在一些实施例中,外部调用perfor()函数传递宽度属性,通过Android属性动画修改当前进度条的宽度属性。
例如,外部调用perfor(),对缩放倍数进行传递参数处理;通过Android属性动画,修改对象的width属性;对进度条宽度进行缩放后,重新画出缩放后的刻度线及刻度值。
在一些实施例中,将当前进度条的属性,继承为缩放后的进度条的属性;根据属性,生成缩放后的进度条。例如,属性包括通过代码更新进度、通过拖拽改变进度、自定义进度条背景、自定义拖拽按钮中的一项或多项。
在一些实施例中,嵌套HorizontalScrollView控件,对缩放后的进度条进行横向拖动。例如,嵌套HorizontalScrollView控件(可以使内部控件横向滑动),可以横向滑动进度条。
图2示出本公开的进度条的生成方法的另一些实施例的流程图。
如图2所示,在步骤210中,自定义进度条(缩放后的进度条)可以继承原生进度条(当前进度条)的属性。例如,可以通过MySeekBar extends SeekBar来继承。属性可以包括支持通过代码更新进度、支持手动拖动改变进度、支持自定义进度条背景、支持自定义拖拽按钮等属性中的至少一项。
在步骤220中,可以通过xml(eXtensible Markup Language,可扩展标记 语言)的布局文件,设置seekbar(缩放后的进度条)的高度属性。
在步骤230中,可以初始化缩放后的进度条的画笔、颜色、字体大小等属性。例如,初始化的的属性可以包括刻度线画笔、刻度值画笔等。
例如,预设数量可以为1刻度、5刻度、10刻度等。可以在10刻度的位置显示相应的时间信息。显示的刻度对应的时间信息的格式可以为“时:分:秒”。
在一些实施例中,可以根据缩放的倍数,将进度条的总刻度数缩放相应的倍数;将视频总时长均分为相应数量的刻度。例如,可以每隔10个刻度显示对应的时间信息。
在步骤240中,外部调用perfor(),对缩放倍数进行传递参数处理;通过Android属性动画,修改对象的width属性;对进度条宽度进行缩放后,重新画出缩放后的刻度线及刻度值。
在步骤250中,随着进度条宽度的缩放,增加刻度的时间精度。例如,当前进度条的宽度被均分为10个刻度,如果将进度条宽度扩大3倍,则将缩放后的进度条均分为30个刻度。这样,使得进度条每个刻度对应的时间精度更加精细。
在步骤260中,嵌套HorizontalScrollView控件,对缩放后的进度条进行横向拖动。例如,嵌套HorizontalScrollView控件(可以使内部控件横向滑动),可以横向滑动进度条。
图3a、3b示出本公开的进度条的生成方法的一些实施例的框图。
如图3a、3b所示,视频下的拖拽条是两个原生的seekbar拼在一起生成的。例如,可以根据需求设置不同的显示风格。可以在进度条的两端中的至少一段设置按钮,用于显示缩放倍数,也可以用于进行缩放。
图3a中是缩放前的进度条(1倍宽度),图3b中是缩放后的进度条(2倍宽度)的进度条(4倍宽度)。缩放前的进度条的宽度小于缩放前的进度条;缩放前的进度条的刻度对应的时间精度低于缩放后的进度条的时间精度。
图4示出本公开的进度条的生成装置的一些实施例的框图。
如图4所示,进度条的生成装置4包括数量确定单元41、时间确定单元42和生成单元43。
数量确定单元41根据获取的对当前进度条进行缩放的倍数,确定缩放后的刻度数量。例如,当前进度条的刻度的时间精度,随着对当前进度条的宽度的缩放增加。
在一些实施例中,缩放后的刻度数量与进行缩放的倍数正相关,刻度对应的时间信息的精度与进行缩放的倍数正相关。
时间确定单元42根据缩放后的刻度数量和当前进度条的对应媒体的总时长,确定缩放后的刻度对应的时间信息。
在一些实施例中,数量确定单元41根据缩放的倍数,对当前进度条的刻度数量进行缩放,以确定缩放后的刻度数量;时间确定单元42根据缩放后的刻度数量,均分对应媒体的总时长,以确定缩放后的刻度。
生成单元43根据缩放后的刻度数量、缩放后的刻度对应的时间信息,生成缩放后的进度条,用于控制对应媒体的播放进度。
在一些实施例中,生成单元43根据进行缩放的倍数,修改当前进度条的宽度属性,生成缩放后的进度条,宽度属性对应的宽度与进行缩放的倍数正相关。
在一些实施例中,生成单元43每隔预设数量的刻度,设置一个刻度节点;在刻度节点上显示其对应的时间信息,在刻度节点以外的刻度上不显示时间信息。
在一些实施例中,生成单元43外部调用perfor()函数传递宽度属性,通过Android属性动画修改当前进度条的宽度属性。
在一些实施例中,生成单元43将当前进度条的属性,继承为缩放后的进度条的属性;根据属性,生成缩放后的进度条。例如,属性包括通过代码更新进度、通过拖拽改变进度、自定义进度条背景、自定义拖拽按钮中的一项或多项。
在一些实施例中,生成单元43嵌套HorizontalScrollView控件,对缩放后的进度条进行横向拖动。
图5示出本公开的进度条的生成装置的另一些实施例的框图。
如图5所示,该实施例的进度条的生成装置5包括:存储器51以及耦接至该存储器51的处理器52,处理器52被配置为基于存储在存储器51中的指令,执行本公开中任意一个实施例中的进度条的生成方法。
其中,存储器51例如可以包括***存储器、固定非易失性存储介质等。***存储器例如存储有操作***、应用程序、引导装载程序Boot Loader、数据库以及其他程序等。
图6示出本公开的进度条的生成装置的又一些实施例的框图。
如图6所示,该实施例的进度条的生成装置6包括:存储器610以及耦接至该存 储器610的处理器620,处理器620被配置为基于存储在存储器610中的指令,执行前述任意一个实施例中的进度条的生成方法。
存储器610例如可以包括***存储器、固定非易失性存储介质等。***存储器例如存储有操作***、应用程序、引导装载程序Boot Loader以及其他程序等。
进度条的生成装置6还可以包括输入输出接口630、网络接口640、存储接口650等。这些接口630、640、650以及存储器610和处理器620之间例如可以通过总线660连接。其中,输入输出接口630为显示器、鼠标、键盘、触摸屏、麦克、音箱等输入输出设备提供连接接口。网络接口640为各种联网设备提供连接接口。存储接口650为SD卡、U盘等外置存储设备提供连接接口。
在一些实施例中,本公开的计算机程序包括:指令,指令当由处理器执行时使处理器执行根据上述任一个实施例中的进度条的生成方法。
本领域内的技术人员应当明白,本公开的实施例可提供为方法、***、或计算机程序产品。因此,本公开可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本公开可采用在一个或多个其中包含有计算机可用程序代码的计算机可用非瞬时性存储介质包括但不限于磁盘存储器、CD-ROM、光学存储器等上实施的计算机程序产品的形式。
至此,已经详细描述了根据本公开的进度条的生成方法、进度条的生成装置和非易失性计算机可读存储介质。为了避免遮蔽本公开的构思,没有描述本领域所公知的一些细节。本领域技术人员根据上面的描述,完全可以明白如何实施这里公开的技术方案。
可能以许多方式来实现本公开的方法和***。例如,可通过软件、硬件、固件或者软件、硬件、固件的任何组合来实现本公开的方法和***。用于方法的步骤的上述顺序仅是为了进行说明,本公开的方法的步骤不限于以上具体描述的顺序,除非以其它方式特别说明。此外,在一些实施例中,还可将本公开实施为记录在记录介质中的程序,这些程序包括用于实现根据本公开的方法的机器可读指令。因而,本公开还覆盖存储用于执行根据本公开的方法的程序的记录介质。
虽然已经通过示例对本公开的一些特定实施例进行了详细说明,但是本领域的技术人员应该理解,以上示例仅是为了进行说明,而不是为了限制本公开的范围。本领域的技术人员应该理解,可在不脱离本公开的范围和精神的情况下,对以上实施例进 行修改。本公开的范围由所附权利要求来限定。
Claims (16)
- 一种进度条的生成方法,包括:根据获取的对当前进度条进行缩放的倍数,确定缩放后的刻度数量;根据所述缩放后的刻度数量和所述当前进度条的对应媒体的总时长,确定缩放后的刻度对应的时间信息;根据所述缩放后的刻度数量、所述缩放后的刻度对应的时间信息,生成缩放后的进度条,用于控制所述对应媒体的播放进度。
- 根据权利要求1所述的生成方法,其中,所述缩放后的刻度数量与所述进行缩放的倍数正相关,所述刻度对应的时间信息的精度与所述进行缩放的倍数正相关。
- 根据权利要求1所述的生成方法,其中,所述根据所述缩放后的刻度数量、所述缩放后的刻度对应的时间信息,生成缩放后的进度条包括:根据所述进行缩放的倍数,修改所述当前进度条的宽度属性,生成所述缩放后的进度条,所述宽度属性对应的宽度与所述进行缩放的倍数正相关。
- 根据权利要求1所述的生成方法,其中,所述据所述缩放后的刻度数量、所述缩放后的刻度对应的时间信息,生成缩放后的进度条包括:每隔预设数量的刻度,设置一个刻度节点;在所述刻度节点上显示其对应的时间信息,在所述刻度节点以外的刻度上不显示时间信息。
- 根据权利要求3所述的生成方法,其中,所述根据所述进行缩放的倍数,修改所述当前进度条的宽度属性,生成所述缩放后的进度条包括:通过外部调用性能perfor()函数,传递所述宽度属性,通过Android属性动画,修改所述当前进度条的宽度属性。
- 根据权利要求1-5任一项所述的生成方法,其中,所述根据所述缩放后的刻度 数量、所述缩放后的刻度对应的时间信息,生成缩放后的进度条包括:将所述当前进度条的属性,继承为所述缩放后的进度条的属性;根据所述属性,生成所述缩放后的进度条。
- 根据权利要求6所述的生成方法,其中,所述属性包括通过代码更新进度、通过拖拽改变进度、自定义进度条背景、自定义拖拽按钮中的一项或多项。
- 根据权利要求1-5任一项所述的生成方法,还包括:嵌套水平滚动视图HorizontalScrollView控件,对所述缩放后的进度条进行横向拖动。
- 根据权利要求1-5任一项所述的生成方法,还包括:随着对所述当前进度条的宽度进行缩放,增加所述当前进度条的刻度的时间精度。
- 根据权利要求1-5任一项所述的生成方法,其中,所述根据获取的对当前进度条进行缩放的倍数,确定缩放后的刻度数量包括:根据所述缩放的倍数,对所述当前进度条的刻度数量进行缩放,以确定所述缩放后的刻度数量;所述根据所述缩放后的刻度数量和所述当前进度条的对应媒体的总时长,确定缩放后的刻度对应的时间信息包括:根据所述缩放后的刻度数量,对所述对应媒体的总时长进行均分,以确定缩放后的刻度。
- 一种进度条的生成装置,包括:数量确定单元,用于根据获取的对当前进度条进行缩放的倍数,确定缩放后的刻度数量;时间确定单元,用于根据所述缩放后的刻度数量和所述当前进度条的对应媒体的总时长,确定缩放后的刻度对应的时间信息;生成单元,用于根据所述缩放后的刻度数量、所述缩放后的刻度对应的时间信息,生成缩放后的进度条,用于控制所述对应媒体的播放进度。
- 根据权利要求11所述的生成装置,其中,所述缩放后的刻度数量与所述进行缩放的倍数正相关,所述刻度对应的时间信息的精度与所述进行缩放的倍数正相关。
- 根据权利要求11所述的生成装置,其中,所述生成单元根据所述进行缩放的倍数,修改所述当前进度条的宽度属性,生成所述缩放后的进度条,所述宽度属性对应的宽度与所述进行缩放的倍数正相关。
- 一种进度条的生成装置,包括:存储器;和耦接至所述存储器的处理器,所述处理器被配置为基于存储在所述存储器中的指令,执行权利要求1-10任一项所述的进度条的生成方法。
- 一种非易失性计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现权利要求1-10任一项所述的进度条的生成方法。
- 一种计算机程序,包括:指令,所述指令当由处理器执行时使所述处理器执行根据权利要求1-10任一项所述的进度条的生成方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111187704.0A CN113934423A (zh) | 2021-10-12 | 2021-10-12 | 进度条的生成方法、装置和非易失性计算机可读存储介质 |
CN202111187704.0 | 2021-10-12 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023061318A1 true WO2023061318A1 (zh) | 2023-04-20 |
Family
ID=79278433
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/124329 WO2023061318A1 (zh) | 2021-10-12 | 2022-10-10 | 进度条的生成方法、装置和非易失性计算机可读存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113934423A (zh) |
WO (1) | WO2023061318A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117641057A (zh) * | 2023-12-06 | 2024-03-01 | 北京达佳互联信息技术有限公司 | 视频播放方法、装置、终端及存储介质 |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113934423A (zh) * | 2021-10-12 | 2022-01-14 | 北京沃东天骏信息技术有限公司 | 进度条的生成方法、装置和非易失性计算机可读存储介质 |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104199611A (zh) * | 2014-08-29 | 2014-12-10 | 广东欧珀移动通信有限公司 | 一种移动终端调整播放进度的方法及装置 |
WO2014194527A1 (zh) * | 2013-06-08 | 2014-12-11 | 华为终端有限公司 | 一种多媒体浏览进度控制的方法及终端 |
US20160266781A1 (en) * | 2015-03-11 | 2016-09-15 | Microsoft Technology Licensing, Llc | Customizable media player controls |
CN111741265A (zh) * | 2020-06-23 | 2020-10-02 | 浙江大华技术股份有限公司 | 一种视频播放控制方法、装置、电子设备和存储介质 |
CN112328353A (zh) * | 2021-01-06 | 2021-02-05 | 腾讯科技(深圳)有限公司 | 子应用播放器的展示方法、装置、电子设备和存储介质 |
CN112540713A (zh) * | 2020-11-13 | 2021-03-23 | 广州市百果园网络科技有限公司 | 视频预览进度条缩放方法、***、设备及存储介质 |
CN113934423A (zh) * | 2021-10-12 | 2022-01-14 | 北京沃东天骏信息技术有限公司 | 进度条的生成方法、装置和非易失性计算机可读存储介质 |
-
2021
- 2021-10-12 CN CN202111187704.0A patent/CN113934423A/zh active Pending
-
2022
- 2022-10-10 WO PCT/CN2022/124329 patent/WO2023061318A1/zh unknown
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014194527A1 (zh) * | 2013-06-08 | 2014-12-11 | 华为终端有限公司 | 一种多媒体浏览进度控制的方法及终端 |
CN104199611A (zh) * | 2014-08-29 | 2014-12-10 | 广东欧珀移动通信有限公司 | 一种移动终端调整播放进度的方法及装置 |
US20160266781A1 (en) * | 2015-03-11 | 2016-09-15 | Microsoft Technology Licensing, Llc | Customizable media player controls |
CN111741265A (zh) * | 2020-06-23 | 2020-10-02 | 浙江大华技术股份有限公司 | 一种视频播放控制方法、装置、电子设备和存储介质 |
CN112540713A (zh) * | 2020-11-13 | 2021-03-23 | 广州市百果园网络科技有限公司 | 视频预览进度条缩放方法、***、设备及存储介质 |
CN112328353A (zh) * | 2021-01-06 | 2021-02-05 | 腾讯科技(深圳)有限公司 | 子应用播放器的展示方法、装置、电子设备和存储介质 |
CN113934423A (zh) * | 2021-10-12 | 2022-01-14 | 北京沃东天骏信息技术有限公司 | 进度条的生成方法、装置和非易失性计算机可读存储介质 |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117641057A (zh) * | 2023-12-06 | 2024-03-01 | 北京达佳互联信息技术有限公司 | 视频播放方法、装置、终端及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN113934423A (zh) | 2022-01-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2023061318A1 (zh) | 进度条的生成方法、装置和非易失性计算机可读存储介质 | |
JP5284509B2 (ja) | ページ分割されたコンテンツを表示し、それと対話するための方法およびシステム | |
KR101213809B1 (ko) | 전자 문서 스타일 매트릭스 | |
US9772978B2 (en) | Touch input visualizations based on user interface context | |
US8812975B2 (en) | Managing windows through policies | |
CN110300966B (zh) | 增强的数据透视表的创建和交互 | |
US20140325418A1 (en) | Automatically manipulating visualized data based on interactivity | |
US20140208203A1 (en) | Key-Frame based Authoring and Generation of Highly Resizable Document Layout | |
KR101773574B1 (ko) | 데이터 테이블의 차트 시각화 방법 | |
KR20140045301A (ko) | 인서션 포인트에 기초한 사용자 인터페이스 상호작용 동작 | |
US20140331179A1 (en) | Automated Presentation of Visualized Data | |
US20190179499A1 (en) | Systems and methods for providing a digital content reader and collection display application implementing 3d graphical user interfaces and interactions | |
WO2019052115A1 (zh) | 应用控件样式自定义方法、装置以及计算机可读存储介质 | |
CN109213316B (zh) | 自动布局引擎 | |
CN110663017A (zh) | 多笔画智能墨水手势语言 | |
US11837206B2 (en) | Multidimensional gestures for music creation applications | |
US20140325404A1 (en) | Generating Screen Data | |
JP6330348B2 (ja) | 情報処理装置 | |
CN108268190A (zh) | 频谱仪自定义菜单设置方法及装置 | |
KR101910179B1 (ko) | 데이터 시각화를 위한 웹 기반 차트 라이브러리 시스템 | |
KR101809601B1 (ko) | 애니메이션 제작 장치 및 방법 | |
WO2023131112A1 (zh) | 视频的处理方法、装置和非易失性计算机可读存储介质 | |
US10409575B2 (en) | System and method for developing software applications of wearable devices | |
CN111782309B (zh) | 显示信息的方法、装置及计算机可读存储介质 | |
TW202127222A (zh) | 使用者介面調整方法與觸控顯示裝置 |
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 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |