mirror of
https://github.com/ikun0014/lx-music-mobile.git
synced 2025-07-04 02:22:10 +08:00
修复横屏播放详情页进入动画
This commit is contained in:
parent
3e39d98069
commit
ac7548da97
@ -1,6 +1,7 @@
|
|||||||
### 新增
|
### 新增
|
||||||
|
|
||||||
- 新增横屏状态下的播放详情页
|
- 新增横屏状态下的播放详情页
|
||||||
|
- 新增橙、粉、灰主题色
|
||||||
|
|
||||||
### 调整
|
### 调整
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ const styles = StyleSheet.create({
|
|||||||
flexShrink: 1,
|
flexShrink: 1,
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
// backgroundColor: 'rgba(0,0,0,0.1)',
|
||||||
},
|
},
|
||||||
content: {
|
content: {
|
||||||
// elevation: 3,
|
// elevation: 3,
|
||||||
|
@ -13,7 +13,7 @@ export default memo(({ playNextModes }) => {
|
|||||||
const theme = useGetter('common', 'theme')
|
const theme = useGetter('common', 'theme')
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={{ ...styles.container, flexDirection: 'row', backgroundColor: theme.primary }}>
|
<View style={{ ...styles.container, backgroundColor: theme.primary }} nativeID="player">
|
||||||
<PlayInfo />
|
<PlayInfo />
|
||||||
<ControlBtn playNextModes={playNextModes} />
|
<ControlBtn playNextModes={playNextModes} />
|
||||||
</View>
|
</View>
|
||||||
@ -23,6 +23,7 @@ export default memo(({ playNextModes }) => {
|
|||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
container: {
|
container: {
|
||||||
width: '100%',
|
width: '100%',
|
||||||
|
flexDirection: 'row',
|
||||||
// paddingTop: progressContentPadding,
|
// paddingTop: progressContentPadding,
|
||||||
// marginTop: -progressContentPadding,
|
// marginTop: -progressContentPadding,
|
||||||
// backgroundColor: 'rgba(0, 0, 0, .1)',
|
// backgroundColor: 'rgba(0, 0, 0, .1)',
|
||||||
|
@ -17,7 +17,7 @@ export default memo(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={{ ...styles.header, backgroundColor: theme.primary }}>
|
<View style={{ ...styles.header, backgroundColor: theme.primary }} nativeID="header">
|
||||||
<StatusBar backgroundColor="rgba(0,0,0,0)" barStyle="dark-content" translucent={true} />
|
<StatusBar backgroundColor="rgba(0,0,0,0)" barStyle="dark-content" translucent={true} />
|
||||||
<View style={{ ...styles.container }}>
|
<View style={{ ...styles.container }}>
|
||||||
<TouchableOpacity onPress={back} style={{ ...styles.button }}>
|
<TouchableOpacity onPress={back} style={{ ...styles.button }}>
|
||||||
|
@ -25,7 +25,7 @@ export default memo(({ componentId, animated }) => {
|
|||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<View style={styles.left}>
|
<View style={styles.left}>
|
||||||
<Pic componentId={componentId} animated={animated} />
|
<Pic componentId={componentId} animated={animated} />
|
||||||
<View style={{ flex: 1, flexDirection: 'row', alignItems: 'center' }}>
|
<View style={{ flex: 1, flexDirection: 'row', alignItems: 'center' }} nativeID="pageIndicator">
|
||||||
<Title />
|
<Title />
|
||||||
<View>
|
<View>
|
||||||
<MoreBtn />
|
<MoreBtn />
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React, { useEffect, useState } from 'react'
|
import React, { useEffect, useState } from 'react'
|
||||||
import { View, StyleSheet } from 'react-native'
|
import { View, StyleSheet } from 'react-native'
|
||||||
import { useGetter, useDispatch } from '@/store'
|
import { useGetter, useDispatch } from '@/store'
|
||||||
import { useDeviceOrientation } from '@/utils/hooks'
|
import { useDimensions } from '@/utils/hooks'
|
||||||
import { useNavigationComponentDidDisappear, useNavigationComponentDidAppear } from '@/navigation'
|
import { useNavigationComponentDidDisappear, useNavigationComponentDidAppear } from '@/navigation'
|
||||||
import { screenUnkeepAwake } from '@/utils/utils'
|
import { screenUnkeepAwake } from '@/utils/utils'
|
||||||
|
|
||||||
@ -12,7 +12,7 @@ export default (props) => {
|
|||||||
// const theme = useGetter('common', 'theme')
|
// const theme = useGetter('common', 'theme')
|
||||||
const setComponentId = useDispatch('common', 'setComponentId')
|
const setComponentId = useDispatch('common', 'setComponentId')
|
||||||
const [animated, setAnimated] = useState(false)
|
const [animated, setAnimated] = useState(false)
|
||||||
const { portrait } = useDeviceOrientation()
|
const { window } = useDimensions()
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setComponentId({ name: 'playDetail', id: props.componentId })
|
setComponentId({ name: 'playDetail', id: props.componentId })
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
@ -25,7 +25,7 @@ export default (props) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
portrait
|
window.height > window.width
|
||||||
? <Portrait componentId={props.componentId} animated={animated} />
|
? <Portrait componentId={props.componentId} animated={animated} />
|
||||||
: <Landscape componentId={props.componentId} animated={animated} />
|
: <Landscape componentId={props.componentId} animated={animated} />
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user