Think of 2 methods, both of which require you to have a certain foundation in native development. You can first refer to the implementation ideas of https://github.com/hanliuxin5... (we are currently trying to write it in the form of a weex plugin...), Then keep watching
1 The page is implemented by placingin里放置的方式来实现 2 需要较大幅度的修改原生代码,将原生Fragment的管理交给FragmentPagerAdapter或者FragmentStatePagerAdapter然后配合ViewPager2 It requires a significant modification of the native code, replacing the nativeThe management of Fragmentis handed over toFragmentPagerAdapterorFragmentStatePagerAdapterand then cooperated withViewPagerto implement it
This is also a headache for me. You can try the following solutions: 1. Use navigator.push and pop. The sliding animation depends on the system animation. android>Settings>Developer Options>Excessive Animation. If it needs to be modified on Android, it can be extendedWXNavigatorModule.java,在startActivity的地方加上overridependingtransition, and several animation effects need to be built in; 2. The vue-router level is used with transition, but it is really not recommended to use transition on the native level, the effect is too stiff
In summary, it is more appropriate to extend WXNavigatorModule. There is an OpenUrl extension in the official code, which can be used to appropriately increase capabilities.
Think of 2 methods, both of which require you to have a certain foundation in native development.
You can first refer to the implementation ideas of https://github.com/hanliuxin5... (we are currently trying to write it in the form of a weex plugin...), Then keep watching
This is also a headache for me. You can try the following solutions:
1. Use navigator.push and pop. The sliding animation depends on the system animation. android>Settings>Developer Options>Excessive Animation. If it needs to be modified on Android, it can be extended
WXNavigatorModule.java
,在startActivity
的地方加上overridependingtransition
, and several animation effects need to be built in;2. The vue-router level is used with transition, but it is really not recommended to use transition on the native level, the effect is too stiff
In summary, it is more appropriate to extend WXNavigatorModule. There is an OpenUrl extension in the official code, which can be used to appropriately increase capabilities.