Toggle navigation
Toggle navigation
This project
Loading...
Sign in
mobile
/
YH_RNComponent
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
孙凯
7 years ago
Commit
d28ddd19d9f5e84215d622fa0f77d4a55a40fc50
2 parents
48fc423e
2e2041e9
add iphoneX 适配 review by hongmo
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
js/common/components/ListCell/ProductListCell.js
js/guang/components/detail/Detail.js
js/common/components/ListCell/ProductListCell.js
View file @
d28ddd1
...
...
@@ -205,7 +205,7 @@ let gpSoldOutImageHeight = Math.ceil(25 * DEVICE_WIDTH_RATIO);
let
styles
=
StyleSheet
.
create
({
container
:
{
width
:
rowWidth
,
height
:
Platform
.
OS
===
'ios'
?
rowHeight
:
rowHeight
+
4
,
height
:
Platform
.
OS
===
'ios'
?
rowHeight
+
2
:
rowHeight
+
4
,
marginTop
:
rowMarginTop
,
marginBottom
:
rowMarginBottom
,
overflow
:
'hidden'
,
...
...
js/guang/components/detail/Detail.js
View file @
d28ddd1
...
...
@@ -21,6 +21,7 @@ import Comments from './Comments';
import
CommentsTitle
from
'./CommentsTitle'
;
import
LoadMoreIndicator
from
'../../../common/components/LoadMoreIndicator'
;
import
YH_Video
from
'../../../common/components/YH_Video'
;
import
DeviceInfo
from
'react-native-device-info'
;
import
ReactNative
,
{
View
,
...
...
@@ -83,6 +84,11 @@ export default class Detail extends Component {
_keyboardWillShow
(
e
){
let
endH
=
e
.
endCoordinates
.
height
;
let
duration
=
e
.
duration
;
if
(
deviceId
==
'iPhone10,3'
||
deviceId
==
'iPhone10,6'
)
{
endH
=
endH
-
34
;
}
Animated
.
timing
(
this
.
state
.
viewMarginTop
,
{
...
...
@@ -274,7 +280,7 @@ export default class Detail extends Component {
return
(
<
View
style
=
{
styles
.
container
}
>
{
!
isFetching
?
<
Animated
.
View
style
=
{{
width
:
width
,
height
:
height
-
64
,
marginT
op
:
this
.
state
.
viewMarginTop
}}
>
{
!
isFetching
?
<
Animated
.
View
style
=
{{
flex
:
1
,
t
op
:
this
.
state
.
viewMarginTop
}}
>
<
ListView
ref
=
{(
ref
)
=>
this
.
listView
=
ref
}
initialListSize
=
{
1
}
...
...
@@ -336,12 +342,11 @@ export default class Detail extends Component {
}
let
{
width
,
height
}
=
Dimensions
.
get
(
'window'
);
let
deviceId
=
DeviceInfo
.
getDeviceId
();
let
styles
=
StyleSheet
.
create
({
container
:
{
flex
:
1
,
width
:
width
,
height
:
height
-
64
,
},
contentContainer
:{
backgroundColor
:
'white'
,
...
...
Please
register
or
login
to post a comment