CN116048371A - Page component switching method, device, equipment, medium and product in application program - Google Patents

Page component switching method, device, equipment, medium and product in application program Download PDF

Info

Publication number
CN116048371A
CN116048371A CN202310145800.1A CN202310145800A CN116048371A CN 116048371 A CN116048371 A CN 116048371A CN 202310145800 A CN202310145800 A CN 202310145800A CN 116048371 A CN116048371 A CN 116048371A
Authority
CN
China
Prior art keywords
component
sliding
page
activity
preset
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202310145800.1A
Other languages
Chinese (zh)
Inventor
陈海云
吴怡颖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co Ltd
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 Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202310145800.1A priority Critical patent/CN116048371A/en
Publication of CN116048371A publication Critical patent/CN116048371A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the disclosure discloses a method, a device, equipment, a medium and a product for switching page components in an application program, wherein the method comprises the following steps: when a sliding operation in a preset sliding direction is detected in a preset service state of a first service Activity currently displayed by a preset application program, acquiring a screenshot of a second service Activity associated with the first service Activity; filling and displaying the screenshot of the page in an image component arranged in a sliding component of the first service Activity, wherein the image component and the view content in the sliding component are spliced based on a relative position relation matched with a preset sliding direction; and creating and displaying a second service Activity instance according to the sliding progress of the sliding assembly in the preset sliding direction, so as to realize Activity switching in the preset application program. According to the technical scheme, the user can rapidly switch different service functions through the sliding gesture, and the requirements of the user on rapid switching of different service functions are met.

Description

Page component switching method, device, equipment, medium and product in application program
Technical Field
The embodiment of the disclosure relates to the technical field of computer interaction, in particular to a method, a device, equipment, a medium and a product for switching page components in an application program.
Background
In the Android system, different business functions in an application program are mutually independent, and specific business functions are respectively realized in the activities (page components) of the business functions. For the activities, one Activity corresponds to one window page, that is, activities that cannot carry a plurality of service functions in one window page cannot be switched among activities by a sliding operation on the window page.
Disclosure of Invention
The present disclosure provides a method, an apparatus, a device, a medium, and a product for switching a page component in an application program, which can enable a user to quickly implement switching between different service functions through a sliding gesture, thereby meeting the requirements of the user on quick switching use of different service functions.
In a first aspect, an embodiment of the present disclosure provides a method for switching page components in an application, where the method includes:
when a sliding operation in a preset sliding direction is detected in a preset service state of a first service page component currently displayed by a preset application program, acquiring a screenshot of a second service page component associated with the first service page component;
Filling and displaying the screenshot in an image component arranged in a sliding component of the first business page component, wherein the image component and view contents in the sliding component are spliced based on a relative position relation matched with the preset sliding direction;
and creating and displaying the second business page component example according to the sliding progress of the sliding component in the preset sliding direction, so as to realize the page component switching in the preset application program.
In a second aspect, an embodiment of the present disclosure further provides a device for switching a page component in an application program, where the device includes:
the target page component screenshot obtaining module is used for obtaining a screenshot of a second service page component associated with a first service page component when a sliding operation in a preset sliding direction is detected in a preset service state of the first service page component currently displayed by a preset application program;
the screenshot splicing and displaying module is used for filling and displaying the screenshot of the page in an image component arranged in a sliding component of the first business page component, wherein the image component and view contents in the sliding component are spliced based on a relative position relation matched with the preset sliding direction;
And the target page component switching module is used for creating and displaying the second service page component example according to the sliding progress of the sliding component in the preset sliding direction so as to realize page component switching in the preset application program.
In a third aspect, embodiments of the present disclosure further provide an electronic device, including:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method for switching page components in an application as described in any of the embodiments of the present disclosure.
In a fourth aspect, the disclosed embodiments also provide a storage medium containing computer-executable instructions that, when executed by a computer processor, are used to perform a method of page component switching in an application as described in any of the disclosed embodiments.
In a fifth aspect, embodiments of the present disclosure further provide a computer program product, including a computer program, which when executed by a processor implements a method for switching page components in an application program according to any one of the embodiments of the present invention.
According to the embodiment of the disclosure, when a sliding operation in a preset sliding direction is detected in a preset service state of a first service Activity currently displayed by a preset application program, a screenshot of a second service Activity associated with the first service Activity is acquired; filling and displaying the screenshot of the page in an image component arranged in a sliding component of the first service Activity, wherein the image component and the view content in the sliding component are spliced based on a relative position relation matched with a preset sliding direction; in the continuous sliding operation process, under the condition that the second service Activity instance is not created, the page content of the second service Activity to be switched can be displayed, and finally, the second service Activity instance is created and displayed according to the sliding progress of the sliding component in the preset sliding direction, so that the smooth switching process between two different activities in the preset application program is realized, and the creation and display of the second service Activity instance are triggered after the user does not need to find the functional control of the second service. According to the technical scheme, the problem that the switching process between different service functions is low in efficiency is solved, a user can rapidly switch between different service functions through a sliding gesture, and the requirements of the user on rapid switching use of the different service functions are met.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1 is a schematic flow chart of an Activity switching method in an application provided in an embodiment of the present disclosure;
FIG. 2 is a schematic view of a hierarchy of Activity pages provided by an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a content structure of a sliding component in a first business Activity according to an embodiment of the present disclosure;
FIG. 4 is a flowchart of an Activity switching method in an application provided in an embodiment of the present disclosure;
FIG. 5 is a flowchart of an Activity switching method in an application provided in an embodiment of the present disclosure;
fig. 6 is an interface display schematic diagram of switching between a camera function Activity and a video stream function Activity in an application provided by an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an Activity switching device in an application provided in an embodiment of the present disclosure;
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
It will be appreciated that prior to using the technical solutions disclosed in the embodiments of the present disclosure, the user should be informed and authorized of the type, usage range, usage scenario, etc. of the personal information related to the present disclosure in an appropriate manner according to the relevant legal regulations.
For example, in response to receiving an active request from a user, a prompt is sent to the user to explicitly prompt the user that the operation it is requesting to perform will require personal information to be obtained and used with the user. Thus, the user can autonomously select whether to provide personal information to software or hardware such as an electronic device, an application program, a server or a storage medium for executing the operation of the technical scheme of the present disclosure according to the prompt information.
As an alternative but non-limiting implementation, in response to receiving an active request from a user, the manner in which the prompt information is sent to the user may be, for example, a popup, in which the prompt information may be presented in a text manner. In addition, a selection control for the user to select to provide personal information to the electronic device in a 'consent' or 'disagreement' manner can be carried in the popup window.
It will be appreciated that the above-described notification and user authorization process is merely illustrative and not limiting of the implementations of the present disclosure, and that other ways of satisfying relevant legal regulations may be applied to the implementations of the present disclosure.
It will be appreciated that the data (including but not limited to the data itself, the acquisition or use of the data) involved in the present technical solution should comply with the corresponding legal regulations and the requirements of the relevant regulations.
Fig. 1 is a schematic flow chart of an Activity switching method in an application program, which is provided by an embodiment of the present disclosure, where the embodiment of the present disclosure is suitable for a user to switch and use a scenario of different service functions in the application program in an interaction process with the application program, and particularly, a scenario that different service functions in the application program need to be quickly switched.
In an application program, a plurality of service functions are generally included, and each service function implements corresponding service logic in a respective Activity (page component). An Activity includes a plurality of hierarchical interface structures, and reference may be made to the schematic structure shown in fig. 2. Wherein, multiple fragments, such as Fragment1, fragment2, and Fragment3, can be carried in one Activity (page). Sliding switching between fragments can be achieved through View Pager (page control). However, for the property of the Activity itself, one window page corresponds to one Activity, but one window page cannot carry a plurality of activities, so that switching between two activities cannot be directly realized through a sliding operation. When switching between activities of different service functions, a functional control of the next service function to be used is found in the process of using the first service Activity, and the control is triggered to open a corresponding second Activity. However, this process may result in inefficient switching process between different service functions, and is not friendly for users in a scenario where users are required to rapidly switch service functions.
In this embodiment, however, the two different activities are directly switched by the sliding operation by reconfiguring the sliding component in the Activity.
Specifically, as shown in fig. 1, the Activity switching method in the application program includes:
s110, when a sliding operation in a preset sliding direction is detected in a preset service state of a first service Activity currently displayed by a preset application program, acquiring a screenshot of a second service Activity associated with the first service Activity.
The preset application program can be any application program currently operated by the electronic terminal equipment of the user. The first service Activity may be an Activity that is displayed by a preset application program on a window interface of the electronic terminal device, and may be understood as an Activity instance of a service function that is being used by a user.
The preset service state refers to a service state capable of triggering the switching of the Activity instance through sliding in the corresponding Activity instance, and the state is determined according to the functional attribute of the sliding operation in the current Activity instance. In an example, in a certain service function Activity instance, switching of different display contents can be achieved through up-and-down sliding, for example, the switching to the next display content adjacent to the current display content can be achieved through upward sliding. It will be appreciated that the switching of different presentations belongs to a sliding switch between different fragments. The preset service state of the service function Activity instance can be set to be the state of the first content display page when the Activity instance is created in the service function Activity instance through preset configuration, and the preset sliding direction corresponding to the preset service state is downward sliding. Because the content showing page slides up to switch to the next adjacent showing content, and slides down, since the content showing page itself is the first content showing page, other content showing pages cannot be acquired, so that the Activity to switch to another service function can be determined.
And under the condition that the sliding operation in the current Activity instance does not have any functional attribute, the state of the page displayed by the current Activity instance is the corresponding preset service state, so that the preset service state of the target service Activity to be switched can be combined, and the sliding direction of the sliding operation which corresponds to the current Activity instance and can trigger the Activity switching can be further determined.
Further, when the current first service Activity detects a sliding operation in a preset sliding direction, the application program can be triggered to execute a switching operation between different activities. The second service Activity to be switched from the first service Activity is a pre-configured switching relation. There is no strict limitation on specific business activities. The switching relationship chain can be formed by bidirectional mutual switching between the first service Activity and the second service Activity, unidirectional service switching, switching from the first service Activity to the second service Activity and then switching from the second service Activity to the third service Activity.
Specifically, after the switching from the first service Activity to the second service Activity is triggered, the relevant function module in the application program first obtains a screenshot of a page of the second service Activity associated with the first service Activity, so that in the subsequent sliding process, along with the continuation of the sliding gesture, the display content from the view content of the first service Activity to the page of the second service Activity is excessive.
It should be noted that, in the process of obtaining the page screenshot of the second service Activity instance, no real second service Activity instance is created. Instead, a temporary second business Activity instance is created by the local Activity management component (Local Activity Manger). In the process, the temporary second service Activity instance is not displayed on the window view, and is not put into the management range of a real Activity management component (Activity manager), namely the temporary second service Activity instance is not perceived as a real page service and has an independent life cycle. When the loading of the view page in the temporary second business Activity instance is completed, a screenshot operation can be performed through a preset screenshot component, and a page screenshot is obtained. The preset screenshot component may convert the View into a corresponding Bitmap (Bitmap) as a screenshot result. In the process of acquiring the page screenshot of the second service Activity instance, the configuration information of the complete Activity instance is not needed, and only the elements displayed by the acquired Activity instance page are loaded, so that the occupation of the memory can be reduced. In a preferred embodiment, after the screenshot of the page is obtained, the life cycle of the temporary second service Activity instance may be ended, and the corresponding memory may be further released.
And S120, filling and displaying the screenshot in an image component arranged in the sliding component of the first business Activity.
Wherein the sliding component is a configured Activity level sliding component in the present embodiment. When the first service Activity instance is created, a sliding component is created, and a first sub-View of a root layout (device View), that is, content View content of the first service Activity, is added to the sliding component, and the sliding component is further provided with an Image component (Image View) for carrying the screenshot of the second service Activity acquired in the previous step. The view contents in the image component and the sliding component are spliced based on the relative position relation matched with the preset sliding direction. For example, the preset sliding direction is sliding upwards, and the image component can be spliced to the lower edge of the view content; the preset sliding direction is downward sliding, and the image component can be spliced to the upper edge of the view content; the preset sliding direction is left sliding, and the image component can be spliced to the right edge of the view content; the preset sliding direction is sliding to the right, and the image component can be spliced to the left edge of the view content. Even if the window page of the first service Activity is in the window page, along with the continuous process of the sliding operation, dynamic display is carried out according to the sequence of the view content of the first service Activity and the screenshot of the page of the second service Activity. The view content of the first service Activity may be static obtained content or dynamic content, that is, the content displayed by the first service Activity, and the screenshot of the second service Activity is static content.
For example, the configured slider component content structure may refer to the structural content as shown in FIG. 3. In fig. 3, in a window page of the first business Activity instance, a View Content (Content View) controllable by a sliding component (Scroll View) and a screenshot of a second business Activity (displayed in an Image View) are shown.
S130, creating and displaying the second service Activity instance according to the sliding progress of the sliding assembly in the preset sliding direction, and realizing Activity switching in the preset application program.
In this embodiment, at the beginning of the sliding operation, the creation of the actual second service Activity instance is not triggered, since the sliding operation may be a false touch or the Activity switch may be abandoned after a short sliding distance. Further judging the sliding progress of the sliding component in the preset sliding direction is needed to determine whether the second service Activity instance is to be created and switched finally.
Along with the continuous sliding operation of the user in the preset sliding direction, the occupied area of the page view of the first service Activity instance is gradually reduced, and the occupied area of the page screenshot of the second service Activity is gradually increased in the window page of the electronic terminal equipment of the user. When the sliding progress of the sliding component in the preset sliding direction reaches a preset sliding progress threshold, if the area of the screenshot of the page accounts for 80% of the area of the window page of the electronic terminal equipment, an instance of the real second service Activity can be created through the Activity management component, and the instance of the second service Activity is displayed on the window page of the electronic terminal equipment.
Through the steps, the quick switching of different service activities through the sliding gesture is realized, and a user can use each service function of an application program more flexibly and conveniently. In summary, according to the technical scheme of the embodiment of the present disclosure, when a sliding operation in a preset sliding direction is detected in a preset service state of a first service Activity currently displayed by a preset application, a screenshot of a second service Activity associated with the first service Activity is obtained; filling and displaying the screenshot of the page in an image component arranged in a sliding component of the first service Activity, wherein the image component and the view content in the sliding component are spliced based on a relative position relation matched with a preset sliding direction; in the continuous sliding operation process, under the condition that the second service Activity instance is not created, the page content of the second service Activity to be switched can be displayed, and finally, the second service Activity instance is created and displayed according to the sliding progress of the sliding component in the preset sliding direction, so that the smooth switching process between two different activities in the preset application program is realized, and the creation and display of the second service Activity instance are triggered after the user does not need to find the functional control of the second service. According to the technical scheme, the problem that the switching process between different service functions is low in efficiency is solved, a user can rapidly switch between different service functions through a sliding gesture, and the requirements of the user on rapid switching use of the different service functions are met.
Fig. 4 is a schematic flow chart of an Activity switching method in an application program provided by the embodiment of the present disclosure, which belongs to the same inventive concept as the Activity switching method in an application program provided by the foregoing embodiment, and further describes a process of setting a sliding component in a process of creating a first service Activity instance at first.
As shown in fig. 4, the Activity switching method in the application program includes:
s210, in the process of creating the first service Activity of the preset application program, acquiring view contents of the first service Activity, and adding the view contents into a preset sliding component.
In the prior art, switching between two service independent activities cannot be realized through a sliding operation of a user, and switching of each Fragment is realized through a page control (View page) in each service Activity.
The preset slider in this embodiment is a configured Activity-level slider. When the first business Activity instance is created, a sliding component is created, and the first sub-View of the root layout (device View) of the first business Activity, i.e., the content View of the first business Activity, is added to the sliding component.
S220, in the sliding component, an image component is arranged to be spliced with the corresponding edge of the view content according to the preset sliding direction.
The sliding component is further provided with an Image component (Image View) for carrying the screenshot of the second service Activity acquired in the previous step. The view contents in the image component and the sliding component are spliced based on the relative position relation matched with the preset sliding direction.
For example, the preset sliding direction is sliding upwards, and the image component can be spliced to the lower edge of the view content; the preset sliding direction is downward sliding, and the image component can be spliced to the upper edge of the view content; the preset sliding direction is left sliding, and the image component can be spliced to the right edge of the view content; the preset sliding direction is sliding to the right, and the image component can be spliced to the left edge of the view content. Even if the window page of the first service Activity is in the window page, along with the continuous process of the sliding operation, dynamic display is carried out according to the sequence of the view content of the first service Activity and the screenshot of the page of the second service Activity.
When the sliding operation capable of triggering the Activity switching is not acquired, the image component is not filled with image content, namely, the view content of the first service Activity instance is only displayed in the first service Activity instance.
S230, when the sliding operation of the preset sliding direction is detected in the preset service state of the first service Activity, acquiring a screenshot of a second service Activity associated with the first service Activity.
Specifically, after the switching from the first service Activity to the second service Activity is triggered, the relevant function module in the application program first obtains a screenshot of a page of the second service Activity associated with the first service Activity, so that in the subsequent sliding process, along with the continuation of the sliding gesture, the display content from the view content of the first service Activity to the page of the second service Activity is excessive.
It should be noted that, in the process of obtaining the page screenshot of the second service Activity instance, no real second service Activity instance is created. Instead, a temporary second business Activity instance is created by the local Activity management component (Local Activity Manger).
S240, filling and displaying the screenshot in the image component.
The image component and the view content in the sliding component are spliced based on the relative position relation matched with the preset sliding direction.
As the sliding operation proceeds, the screenshot of the page in the image component begins to display. Namely, the region between the content view of the first service Activity and the edge corresponding to the window interface of the terminal of the electronic device is filled with the screenshot content of the second service.
S250, creating and displaying the second service Activity instance according to the sliding progress of the sliding assembly in the preset sliding direction, and simultaneously playing a preset transition animation effect to realize Activity switching in the preset application program.
The preset excessive animation effect can be any animation special effect, preferably an animation effect with gradual transparency, so that a user cannot perceive obvious change at the moment of switching between the first service Activity and the second service Activity, and seamless switching and noninductive switching among different activities are realized.
According to the technical scheme, when the first service Activity instance is created, a sliding component of an Activity level is configured and used for connecting a content view of the first service Activity instance and a screenshot of a page of a second service Activity; then, when a sliding operation in a preset sliding direction is detected in a preset service state of a first service Activity currently displayed by a preset application program, acquiring a screenshot of a second service Activity associated with the first service Activity; filling and displaying the screenshot of the page in an image component arranged in a sliding component of the first service Activity, wherein the image component and the view content in the sliding component are spliced based on a relative position relation matched with a preset sliding direction; in the continuous sliding operation process, under the condition that the second service Activity instance is not created, the page content of the second service Activity to be switched can be displayed, and finally, the second service Activity instance is created and displayed according to the sliding progress of the sliding component in the preset sliding direction, so that the smooth switching process between two different activities in the preset application program is realized, and the creation and display of the second service Activity instance are triggered after the user does not need to find the functional control of the second service. According to the technical scheme, the problem that the switching process between different service functions is low in efficiency is solved, a user can rapidly switch between different service functions through a sliding gesture, and the requirements of the user on rapid switching use of the different service functions are met.
Fig. 5 is a schematic flow chart of an Activity switching method in an application program provided by an embodiment of the present disclosure, which belongs to the same inventive concept as the Activity switching method in an application program provided by the foregoing embodiment, and further describes a process of switching between a camera function page and a video stream presentation page in an application program.
As shown in fig. 5, the Activity switching method in the application program includes:
s310, when an upward sliding operation is detected in a preset service state of a camera function Activity currently displayed by a preset application program, acquiring a first screenshot of a video stream function Activity associated with the camera function Activity.
In an application program capable of providing a camera function and a video stream function, a user can use a corresponding service function according to requirements. In some scenarios, a user needs to switch between two business functions. When the video stream data content provided in the video stream function is watched, and when the video content inspired, the image or video containing the target content object needs to be shot, the video stream function Activity is switched to the camera function Activity; after shooting is completed, the camera function Activity is switched back to the video stream function Activity so as to continue browsing the video stream data. Therefore, convenience in realizing switching among different activities is required to be improved, switching efficiency of the different activities is improved, and use requirements of users are met.
Specifically, the preset application program currently displays the camera function Activity, and according to the conventional camera function interface setting, the preset application program slides left and right on the camera function interface of the electronic terminal device, and triggers the switching of different shooting modes. And the up-and-down sliding operation is performed in the camera function interface of the electronic terminal device without operation attributes. Therefore, in the present embodiment, the preset slide direction of the slide operation capable of triggering the camera function Activity switching can be set to slide upward or downward. Further, in combination with the attribute of the interface sliding operation of another service Activity to be switched, it may be determined whether the preset sliding direction is downward or downward. In this embodiment, considering that the service Activity to be switched is the video stream function Activity, the preset sliding direction of the sliding operation capable of triggering the switching of the camera function Activity is determined to be upward sliding.
When an upward slide operation in the camera function Activity is detected, a first page screenshot of the video streaming function Activity associated with the camera function Activity is acquired. A temporary video streaming function Activity instance may be created by a local Activity management component (Local Activity Manger). In the process, the temporary video streaming function Activity instance is not displayed on the window view, and is not put into the management range of a real Activity management component (Activity manager), namely the temporary video streaming function Activity instance is not perceived as a real page service and has an independent life cycle. When the loading of the view page in the temporary video streaming function Activity instance is completed, the screenshot operation can be carried out through a preset screenshot component to obtain a first page screenshot, and the life cycle of the temporary video streaming function Activity instance is ended. The preset screenshot component may convert the View into a corresponding Bitmap (Bitmap) as a screenshot result.
S320, filling and displaying the first screenshot in a first image component arranged in a first sliding component of the camera function Activity.
The view contents in the first image component and the first sliding component are spliced based on the relative position relation matched with the preset sliding direction; because the preset sliding direction is sliding upwards, the first image component is spliced at the lower edge of the camera function Activity content view in the first sliding component.
S330, creating and displaying the video stream function Activity instance according to the upward sliding progress of the first sliding component, and realizing Activity switching in the preset application program.
With the continuation of the sliding operation, when the content in the sliding component of the camera function Activity gradually moves upwards, and when the content slides to a distance from the bottom of the first screenshot of the display page to the first preset number of pixel points (X independent pixels of the device, X device independent pixels, xdp), the video stream function Activity instance is created and displayed, and the Activity switching in the preset application program is realized. Creating a video streaming function Activity instance is an instance of creating a real video streaming function Activity by an Activity management component.
S340, when a downward sliding operation is detected in a state that the first video stream content is displayed in the video stream function Activity example, acquiring a second screenshot of the camera function Activity associated with the video stream function Activity.
In this embodiment, after switching to the video streaming function Activity instance, the user may also switch back to the camera function Activity according to a sliding operation performed by the user in a preset service state of the video streaming function Activity.
Specifically, when the video streaming function Activity slides up, the video streaming function Activity is switched to the next adjacent video streaming content of the currently displayed video streaming content, and when the video streaming function Activity slides down, the video streaming function Activity is switched to the previous adjacent video streaming content of the currently displayed video streaming content. In the state that the first video stream content is displayed in the video stream function Activity example, since the first content display page is already displayed, and other content display pages cannot be acquired by sliding downwards, the trigger can be determined to be the function Activity of the camera to be switched.
The process of acquiring the second page screenshot may refer to S310, creating a temporary camera function Activity instance through the local Activity management component (Local Activity Manger). In the process, the temporary camera function Activity instance is not displayed on the window view, and is not put into the management range of a real Activity management component (Activity manager), namely the temporary camera function Activity instance is not perceived as a real page service and has an independent life cycle. When the loading of the view page in the temporary camera function Activity instance is completed, the screenshot operation can be performed through a preset screenshot component to obtain a second page screenshot, and the life cycle of the temporary camera function Activity instance is ended. The preset screenshot component may convert the View into a corresponding Bitmap (Bitmap) as a screenshot result.
And S350, filling and displaying the second screenshot in a two-image component arranged in a second sliding component of the video streaming function Activity.
The view contents in the second image component and the second sliding component are spliced based on the relative position relation matched with the preset sliding direction; because the preset sliding direction is downward sliding, the second image component is spliced at the upper edge of the video stream function Activity content view in the second sliding component.
S360, creating and displaying the camera function Activity instance according to the downward sliding progress of the second sliding assembly, and realizing Activity switching in the preset application program.
With the continuation of the sliding operation, when the content in the sliding component of the video streaming function Activity gradually moves downwards, and when the content slides to a distance from the top of the second screenshot of the display second page to a second preset number of pixels (Y device independent pixels, Y device independent pixels, ydp), the camera function Activity instance is created and displayed, so that the Activity switching in the preset application program is realized. Creating a camera function Activity instance is an instance of creating a real camera function Activity by an Activity management component. It will be appreciated that the first preset number and the second preset number are preconfigured parameters, and may be the same or different.
The interface structure in the process of switching between the camera function Activity and the video stream function Activity can refer to the content shown in fig. 6. Before transformation, the page structure of the camera function Activity before the technical scheme of the embodiment is used, and after transformation, the page structure of the camera function Activity and the video stream function Activity during seamless switching is realized by using the technical scheme of the embodiment. Based on the design of the sliding component in fig. 6 and the corresponding execution logic of the Activity switching, seamless operation of following sliding between two activities is realized, and the method is more convenient for users to use.
According to the technical scheme, when an upward sliding operation is detected in a preset service state of a camera function Activity currently displayed by a preset application program, a first screenshot of a video stream function Activity associated with the camera function Activity is acquired; filling and displaying the first page screenshot in a first image component arranged in a first sliding component of the camera function Activity, and then creating and displaying the video stream function Activity instance according to the upward sliding progress of the first sliding component, so that the switching from the camera function Activity to the video stream function Activity is realized; on the basis, when a downward sliding operation is detected in a state that the first video stream content is displayed in the video stream function Activity instance, a second page screenshot of the camera function Activity associated with the video stream function Activity is obtained, the second page screenshot is filled and displayed in two image assemblies arranged in a second sliding assembly of the video stream function Activity, and finally, the camera function Activity instance is created and displayed according to the downward sliding progress of the second sliding assembly, so that the video stream function Activity is switched back to the camera function Activity. In the continuous sliding operation process, the page content of the video stream function Activity to be switched can be displayed under the condition that the video stream function Activity instance is not created, and finally, the video stream function Activity instance is created and displayed according to the sliding progress of the sliding component in the preset sliding direction, so that the smooth switching process between two different activities in the preset application program is realized, and the creation and display of the video stream function Activity instance are not required to be triggered after a user finds a function control of the video stream function. According to the technical scheme, the problem that the switching process between different service functions is low in efficiency is solved, a user can rapidly switch between different service functions through a sliding gesture, and the requirements of the user on rapid switching use of the different service functions are met.
Fig. 7 is a schematic structural diagram of an Activity switching device in an application provided in an embodiment of the present disclosure, where the device is suitable for a user to switch between different service functions in an application in a process of interacting with the application, and especially in a situation where the user needs to quickly switch between different service functions in the application, and the Activity switching device in the application may be implemented in a software and/or hardware manner, and may be configured in an electronic device, where the electronic device may be a mobile terminal, a PC end, a server, or the like.
As shown in fig. 7, the Activity switching device in the application program includes: the system comprises a target Activity screenshot acquisition module 410, a screenshot splicing and displaying module 420 and a target Activity switching module 430.
The target Activity screenshot obtaining module 410 is configured to obtain a screenshot of a second service Activity associated with a first service Activity when a sliding operation in a preset sliding direction is detected in a preset service state of the first service Activity currently displayed by a preset application; the screenshot splicing and displaying module 420 is configured to fill and display the screenshot of the page in an image component set in the sliding component of the first service Activity, where the image component and the view content in the sliding component are spliced based on a relative positional relationship matched with the preset sliding direction; the target Activity switching module 430 is configured to create and display the second service Activity instance according to the sliding progress of the sliding component in the preset sliding direction, so as to implement Activity switching in the preset application program.
According to the technical scheme provided by the embodiment of the disclosure, when the sliding operation in the preset sliding direction is detected in the preset service state of the first service Activity currently displayed by the preset application program, a screenshot of a page of the second service Activity associated with the first service Activity is obtained; filling and displaying the screenshot of the page in an image component arranged in a sliding component of the first service Activity, wherein the image component and the view content in the sliding component are spliced based on a relative position relation matched with a preset sliding direction; in the continuous sliding operation process, under the condition that the second service Activity instance is not created, the page content of the second service Activity to be switched can be displayed, and finally, the second service Activity instance is created and displayed according to the sliding progress of the sliding component in the preset sliding direction, so that the smooth switching process between two different activities in the preset application program is realized, and the creation and display of the second service Activity instance are triggered after the user does not need to find the functional control of the second service. According to the technical scheme, the problem that the switching process between different service functions is low in efficiency is solved, a user can rapidly switch between different service functions through a sliding gesture, and the requirements of the user on rapid switching use of the different service functions are met.
Optionally, on the basis of any optional technical solution in the embodiments of the present disclosure, the target Activity screenshot obtaining module 410 is specifically configured to:
creating a temporary second business Activity instance through the local Activity management component;
and when the loading of the view page in the temporary second business Activity instance is completed, performing screenshot operation to obtain the page screenshot.
On the basis of any optional technical solution in the embodiments of the present disclosure, optionally, the target Activity switching module 430 is specifically configured to:
and when the sliding progress of the sliding component in the preset sliding direction reaches a preset sliding progress threshold value, creating an instance of the second service Activity through an Activity management component.
On the basis of any optional technical solution in the embodiments of the present disclosure, optionally, the Activity switching device in an application further includes a sliding component setting module, configured to:
before the sliding operation is detected, in the first service Activity creation process, view content of a first service Activity page is obtained, and the view content is added into the sliding component;
and in the sliding component, an image component is arranged to be spliced with the corresponding edge of the view content according to the preset sliding direction.
On the basis of any optional technical scheme in the embodiments of the present disclosure, optionally, the Activity switching device in the application further includes an Activity switching transitional animation playing module, configured to:
and playing a preset transition animation effect in the process of creating and displaying the second service Activity.
Optionally, on the basis of any optional technical solution in the embodiments of the present disclosure, the target Activity screenshot obtaining module 410 may be further configured to:
and ending the life cycle of the temporary second business Activity instance.
On the basis of any optional technical solution in the embodiments of the present disclosure, optionally, the first service Activity and the second service Activity will have no coupled service function.
On the basis of any optional technical scheme in the embodiments of the present disclosure, optionally, the first service Activity is a camera function page, and the second service Activity is a video stream display page; or, the first service Activity is a video stream display page, and the second service Activity is a camera function page.
The Activity switching device in the application program provided by the embodiment of the disclosure can execute the Activity switching method in the application program provided by any embodiment of the disclosure, and has the corresponding functional modules and beneficial effects of the executing method.
It should be noted that each unit and module included in the above apparatus are only divided according to the functional logic, but not limited to the above division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for convenience of distinguishing from each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure. Referring now to fig. 8, a schematic diagram of an electronic device (e.g., a terminal device or server in fig. 8) 500 suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 8 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 8, the electronic device 500 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 501, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit/output (I/O) interface 505 is also connected to bus 504.
In general, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 507 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 508 including, for example, magnetic tape, hard disk, etc.; and communication means 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 8 shows an electronic device 500 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or from the storage means 508, or from the ROM 502. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 501.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
The electronic device provided in the embodiment of the present disclosure and the Activity switching method in the application provided in the foregoing embodiment belong to the same inventive concept, and technical details not described in detail in the embodiment may be referred to the foregoing embodiment, and the embodiment has the same beneficial effects as the foregoing embodiment.
The embodiment of the disclosure provides a computer storage medium on which a computer program is stored, which when executed by a processor, implements the Activity switching method in the application program provided in the above embodiment.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (Hyper Text Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to:
when a sliding operation in a preset sliding direction is detected in a preset service state of a first service Activity currently displayed by a preset application program, acquiring a screenshot of a second service Activity associated with the first service Activity;
filling and displaying the screenshot of the page in an image component arranged in a sliding component of the first service Activity, wherein the image component and view contents in the sliding component are spliced based on a relative position relation matched with the preset sliding direction;
And creating and displaying the second service Activity instance according to the sliding progress of the sliding assembly in the preset sliding direction, so as to realize Activity switching in the preset application program.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The name of the unit does not in any way constitute a limitation of the unit itself, for example the first acquisition unit may also be described as "unit acquiring at least two internet protocol addresses".
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The embodiments of the present disclosure also provide a computer program product comprising a computer program which, when executed by a processor, implements an Activity switching method in an application as provided by any of the embodiments of the present disclosure.
Computer program product in an implementation, computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
According to one or more embodiments of the present disclosure, there is provided an Activity switching method in an application program, the method including:
when a sliding operation in a preset sliding direction is detected in a preset service state of a first service Activity currently displayed by a preset application program, acquiring a screenshot of a second service Activity associated with the first service Activity;
filling and displaying the screenshot of the page in an image component arranged in a sliding component of the first service Activity, wherein the image component and view contents in the sliding component are spliced based on a relative position relation matched with the preset sliding direction;
and creating and displaying the second service Activity instance according to the sliding progress of the sliding assembly in the preset sliding direction, so as to realize Activity switching in the preset application program.
According to one or more embodiments of the present disclosure, an Activity switching method in an application is provided [ example two ], further including:
in some optional implementations, the obtaining a screenshot of a second business Activity associated with the first business Activity includes:
Creating a temporary second business Activity instance through the local Activity management component;
and when the loading of the view page in the temporary second business Activity instance is completed, performing screenshot operation to obtain the page screenshot.
According to one or more embodiments of the present disclosure, an Activity switching method in an application program is provided, including:
in some optional implementations, the creating the second service Activity instance according to the sliding progress of the sliding component in the preset sliding direction includes:
and when the sliding progress of the sliding component in the preset sliding direction reaches a preset sliding progress threshold value, creating an instance of the second service Activity through an Activity management component.
According to one or more embodiments of the present disclosure, there is provided an Activity switching method in an application, further including:
in some alternative implementations, before detecting the sliding operation, the method further includes:
in the process of creating the first service Activity, acquiring view content of a first service Activity page, and adding the view content into the sliding component;
And in the sliding component, an image component is arranged to be spliced with the corresponding edge of the view content according to the preset sliding direction.
According to one or more embodiments of the present disclosure, there is provided an Activity switching method in an application, further including:
in an alternative embodiment, the method further comprises:
and playing a preset transition animation effect in the process of creating and displaying the second service Activity.
According to one or more embodiments of the present disclosure, an Activity switching method in an application is provided [ example six ], further including:
in some alternative implementations, after obtaining the page screenshot, the method further includes:
and ending the life cycle of the temporary second business Activity instance.
According to one or more embodiments of the present disclosure, an Activity switching method in an application is provided [ example seventh ], further including:
in an alternative embodiment, the first and second service activities will have no coupled service functions.
According to one or more embodiments of the present disclosure, an Activity switching method in an application program is provided [ example eight ], further including:
In some optional implementations, the first service Activity is a camera function page, and the second service Activity is a video stream display page; or, the first service Activity is a video stream display page, and the second service Activity is a camera function page.
According to one or more embodiments of the present disclosure, there is provided an Activity switching device in an application program, including:
the target Activity screenshot obtaining module is used for obtaining a screenshot of a second service Activity associated with a first service Activity when a sliding operation in a preset sliding direction is detected in a preset service state of the first service Activity currently displayed by a preset application program;
the screenshot splicing and displaying module is used for filling and displaying the webpage screenshot in an image component arranged in the sliding component of the first service Activity, wherein the image component and the view content in the sliding component are spliced based on a relative position relation matched with the preset sliding direction;
the target Activity switching module is used for creating and displaying the second service Activity instance according to the sliding progress of the sliding assembly in the preset sliding direction, so as to realize Activity switching in the preset application program.
According to one or more embodiments of the present disclosure, there is provided an Activity switching device in an application, further including:
in an optional implementation manner, the target Activity screenshot obtaining module is specifically configured to:
creating a temporary second business Activity instance through the local Activity management component;
and when the loading of the view page in the temporary second business Activity instance is completed, performing screenshot operation to obtain the page screenshot.
According to one or more embodiments of the present disclosure, there is provided an Activity switching device in an application, further including:
in an optional implementation manner, the target Activity switching module is specifically configured to:
and when the sliding progress of the sliding component in the preset sliding direction reaches a preset sliding progress threshold value, creating an instance of the second service Activity through an Activity management component.
According to one or more embodiments of the present disclosure, there is provided an Activity switching device in an application, further including:
in an optional implementation manner, the Activity switching device in the application program further includes a sliding component setting module, configured to:
Before the sliding operation is detected, in the first service Activity creation process, view content of a first service Activity page is obtained, and the view content is added into the sliding component;
and in the sliding component, an image component is arranged to be spliced with the corresponding edge of the view content according to the preset sliding direction.
According to one or more embodiments of the present disclosure, there is provided an Activity switching device in an application, further including:
in an optional implementation manner, the Activity switching device in the application program further includes an Activity switching transitional animation playing module, configured to:
and playing a preset transition animation effect in the process of creating and displaying the second service Activity.
According to one or more embodiments of the present disclosure, there is provided an Activity switching device in an application, further including:
in an optional implementation manner, the target Activity screenshot obtaining module may be further configured to:
and ending the life cycle of the temporary second business Activity instance.
According to one or more embodiments of the present disclosure, there is provided an Activity switching device in an application, further including:
In an alternative embodiment, the first and second service activities will have no coupled service functions.
According to one or more embodiments of the present disclosure, there is provided an Activity switching device in an application, further including:
in an optional implementation manner, the first service Activity is a camera function page, and the second service Activity is a video stream display page; or, the first service Activity is a video stream display page, and the second service Activity is a camera function page.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.

Claims (12)

1. A method for switching page components in an application program, comprising:
when a sliding operation in a preset sliding direction is detected in a preset service state of a first service page component currently displayed by a preset application program, acquiring a screenshot of a second service page component associated with the first service page component;
Filling and displaying the screenshot in an image component arranged in a sliding component of the first business page component, wherein the image component and view contents in the sliding component are spliced based on a relative position relation matched with the preset sliding direction;
and creating and displaying the second business page component example according to the sliding progress of the sliding component in the preset sliding direction, so as to realize the page component switching in the preset application program.
2. The method of claim 1, wherein the obtaining a screenshot of a second business page component associated with the first business page component comprises:
creating a temporary second business page component instance through the local page component management component;
and when the view page loading in the temporary second business page component instance is completed, performing screenshot operation to obtain the page screenshot.
3. The method according to claim 1, wherein creating the second service page component instance according to the sliding progress of the sliding component in the preset sliding direction includes:
and when the sliding progress of the sliding component in the preset sliding direction reaches a preset sliding progress threshold, creating an instance of the second business page component through a page component management component.
4. The method of claim 1, wherein prior to detecting the sliding operation, the method further comprises:
in the process of creating the first business page component, obtaining view contents of the first business page component page, and adding the view contents into the sliding component;
and in the sliding component, an image component is arranged to be spliced with the corresponding edge of the view content according to the preset sliding direction.
5. The method according to claim 1, wherein the method further comprises:
and playing a preset transition animation effect in the process of creating and displaying the second business page component.
6. The method of claim 2, wherein after obtaining the page shot, the method further comprises:
ending the life cycle of the temporary second business page component instance.
7. The method of any of claims 1-6, wherein the first service page component and the second service page component are to be free of coupled service functionality.
8. The method of claim 7, wherein the first business page component is a camera function page and the corresponding second business page component is a video stream presentation page; or alternatively
The first business page component is a video stream display page, and the second business page component is a camera function page.
9. A page component switching device in an application program, comprising:
the target page component screenshot obtaining module is used for obtaining a screenshot of a second service page component associated with a first service page component when a sliding operation in a preset sliding direction is detected in a preset service state of the first service page component currently displayed by a preset application program;
the screenshot splicing and displaying module is used for filling and displaying the screenshot of the page in an image component arranged in a sliding component of the first business page component, wherein the image component and view contents in the sliding component are spliced based on a relative position relation matched with the preset sliding direction;
and the target page component switching module is used for creating and displaying the second service page component example according to the sliding progress of the sliding component in the preset sliding direction so as to realize page component switching in the preset application program.
10. An electronic device, the electronic device comprising:
One or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of page component switching in an application as recited in any of claims 1-8.
11. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements a method of switching page components in an application program according to any of claims 1-8.
12. A computer program product comprising a computer program which, when executed by a processor, implements the method of switching page components in an application program as claimed in any one of claims 1 to 8.
CN202310145800.1A 2023-02-21 2023-02-21 Page component switching method, device, equipment, medium and product in application program Pending CN116048371A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310145800.1A CN116048371A (en) 2023-02-21 2023-02-21 Page component switching method, device, equipment, medium and product in application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310145800.1A CN116048371A (en) 2023-02-21 2023-02-21 Page component switching method, device, equipment, medium and product in application program

Publications (1)

Publication Number Publication Date
CN116048371A true CN116048371A (en) 2023-05-02

Family

ID=86116531

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310145800.1A Pending CN116048371A (en) 2023-02-21 2023-02-21 Page component switching method, device, equipment, medium and product in application program

Country Status (1)

Country Link
CN (1) CN116048371A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093119A (en) * 2023-07-12 2023-11-21 荣耀终端有限公司 Application page switching method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093119A (en) * 2023-07-12 2023-11-21 荣耀终端有限公司 Application page switching method

Similar Documents

Publication Publication Date Title
CN113489937B (en) Video sharing method, device, equipment and medium
CN109460233B (en) Method, device, terminal equipment and medium for updating native interface display of page
CN109614194B (en) List interface display method, device, equipment and storage medium
CN110070496B (en) Method and device for generating image special effect and hardware device
CN110070593B (en) Method, device, equipment and medium for displaying picture preview information
CN111291244B (en) House source information display method, device, terminal and storage medium
CN114491349B (en) Page display method, page display device, electronic device, storage medium and program product
US20220394333A1 (en) Video processing method and apparatus, storage medium, and electronic device
CN111526425B (en) Video playing method and device, readable medium and electronic equipment
CN113721807B (en) Information display method and device, electronic equipment and storage medium
CN114416261B (en) Information display method, device, equipment and medium
CN114610428B (en) Information stream display method, device, apparatus, storage medium, and program
CN111723309B (en) Method and device for web page searching
CN115935925A (en) Form adapting method, electronic device and computer readable storage medium
CN114025225B (en) Bullet screen control method and device, electronic equipment and storage medium
CN116048371A (en) Page component switching method, device, equipment, medium and product in application program
CN114707092A (en) Live content display method, device, equipment, readable storage medium and product
CN109976857B (en) Display control method and device of terminal interface, storage medium and electronic equipment
CN113204299B (en) Display method, display device, electronic equipment and storage medium
CN113961280B (en) View display method and device, electronic equipment and computer readable storage medium
CN111258582B (en) Window rendering method and device, computer equipment and storage medium
CN115933919A (en) Interaction method, interaction device, electronic equipment and computer-readable storage medium
CN110162265B (en) Sliding control method, device, equipment and storage medium of view control
CN118015124A (en) Rendering method, device, medium, electronic device and program product of material
CN117492615A (en) Information display method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination