Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
react-native-picker
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Jira
Jira
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ym
react-native-picker
Commits
ff3cfc29
Commit
ff3cfc29
authored
Nov 17, 2016
by
xwenliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix #86: picker show behind Modal
parent
bdcc50d6
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
136 additions
and
176 deletions
+136
-176
android/build.gradle
android/build.gradle
+1
-1
android/src/main/AndroidManifest.xml
android/src/main/AndroidManifest.xml
+1
-1
android/src/main/java/com/beefe/picker/PickerViewModule.java
android/src/main/java/com/beefe/picker/PickerViewModule.java
+119
-132
android/src/main/res/anim/picker_enter.xml
android/src/main/res/anim/picker_enter.xml
+0
-5
android/src/main/res/anim/picker_exit.xml
android/src/main/res/anim/picker_exit.xml
+0
-6
android/src/main/res/layout/picker_view.xml
android/src/main/res/layout/picker_view.xml
+0
-0
android/src/main/res/values/styles.xml
android/src/main/res/values/styles.xml
+11
-3
ios/RCTBEEPickerManager/RCTBEEPickerManager.m
ios/RCTBEEPickerManager/RCTBEEPickerManager.m
+4
-28
No files found.
android/build.gradle
View file @
ff3cfc29
...
@@ -23,5 +23,5 @@ android {
...
@@ -23,5 +23,5 @@ android {
dependencies
{
dependencies
{
compile
fileTree
(
include:
[
'*.jar'
],
dir:
'libs'
)
compile
fileTree
(
include:
[
'*.jar'
],
dir:
'libs'
)
compile
'com.facebook.react:react-native:
0.20.1
'
compile
'com.facebook.react:react-native:
+
'
}
}
android/src/main/AndroidManifest.xml
View file @
ff3cfc29
android/src/main/java/com/beefe/picker/PickerViewModule.java
View file @
ff3cfc29
This diff is collapsed.
Click to expand it.
android/src/main/res/anim/p
opup
_enter.xml
→
android/src/main/res/anim/p
icker
_enter.xml
View file @
ff3cfc29
...
@@ -7,9 +7,4 @@
...
@@ -7,9 +7,4 @@
android:fromYDelta=
"100%"
android:fromYDelta=
"100%"
android:toXDelta=
"0"
android:toXDelta=
"0"
android:toYDelta=
"0"
/>
android:toYDelta=
"0"
/>
<!--<alpha-->
<!--android:fromAlpha="0.5"-->
<!--android:duration="500"-->
<!--android:toAlpha="1.0"-->
<!--/>-->
</set>
</set>
\ No newline at end of file
android/src/main/res/anim/p
opup
_exit.xml
→
android/src/main/res/anim/p
icker
_exit.xml
View file @
ff3cfc29
...
@@ -8,10 +8,4 @@
...
@@ -8,10 +8,4 @@
android:toXDelta=
"0"
android:toXDelta=
"0"
android:toYDelta=
"100%"
/>
android:toYDelta=
"100%"
/>
<!--<alpha-->
<!--android:fromAlpha="1.0"-->
<!--android:duration="800"-->
<!--android:toAlpha="0.5"-->
<!--/>-->
</set>
</set>
\ No newline at end of file
android/src/main/res/layout/p
opup_p
icker_view.xml
→
android/src/main/res/layout/picker_view.xml
View file @
ff3cfc29
File moved
android/src/main/res/values/styles.xml
View file @
ff3cfc29
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<resources>
<style
name=
"PopAnim"
>
<style
name=
"Dialog_Full_Screen"
>
<item
name=
"android:windowEnterAnimation"
>
@anim/popup_enter
</item>
<item
name=
"android:windowIsFloating"
>
true
</item>
<item
name=
"android:windowExitAnimation"
>
@anim/popup_exit
</item>
<item
name=
"android:windowFullscreen"
>
true
</item>
<item
name=
"android:windowNoTitle"
>
true
</item>
<item
name=
"android:windowContentOverlay"
>
@null
</item>
<item
name=
"android:windowAnimationStyle"
>
@style/PickerAnim
</item>
<item
name=
"android:background"
>
@android:color/transparent
</item>
</style>
<style
name=
"PickerAnim"
>
<item
name=
"android:windowEnterAnimation"
>
@anim/picker_enter
</item>
<item
name=
"android:windowExitAnimation"
>
@anim/picker_exit
</item>
</style>
</style>
</resources>
</resources>
\ No newline at end of file
ios/RCTBEEPickerManager/RCTBEEPickerManager.m
View file @
ff3cfc29
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
@property
(
nonatomic
,
strong
)
BzwPicker
*
pick
;
@property
(
nonatomic
,
strong
)
BzwPicker
*
pick
;
@property
(
nonatomic
,
assign
)
float
height
;
@property
(
nonatomic
,
assign
)
float
height
;
@property
(
nonatomic
,
strong
)
UIWindow
*
window
;
@end
@end
...
@@ -25,32 +26,7 @@ RCT_EXPORT_MODULE();
...
@@ -25,32 +26,7 @@ RCT_EXPORT_MODULE();
RCT_EXPORT_METHOD
(
_init
:
(
NSDictionary
*
)
indic
){
RCT_EXPORT_METHOD
(
_init
:
(
NSDictionary
*
)
indic
){
UIViewController
*
result
=
nil
;
self
.
window
=
[[
UIApplication
sharedApplication
].
windows
lastObject
];
UIWindow
*
window
=
[[
UIApplication
sharedApplication
]
keyWindow
];
if
(
window
.
windowLevel
!=
UIWindowLevelNormal
)
{
NSArray
*
windows
=
[[
UIApplication
sharedApplication
]
windows
];
for
(
UIWindow
*
tmpWin
in
windows
)
{
if
(
tmpWin
.
windowLevel
==
UIWindowLevelNormal
)
{
window
=
tmpWin
;
break
;
}
}
}
UIView
*
frontView
=
[[
window
subviews
]
objectAtIndex
:
0
];
id
nextResponder
=
[
frontView
nextResponder
];
if
([
nextResponder
isKindOfClass
:[
UIViewController
class
]])
result
=
nextResponder
;
else
result
=
window
.
rootViewController
;
NSString
*
pickerConfirmBtnText
=
indic
[
@"pickerConfirmBtnText"
];
NSString
*
pickerConfirmBtnText
=
indic
[
@"pickerConfirmBtnText"
];
NSString
*
pickerCancelBtnText
=
indic
[
@"pickerCancelBtnText"
];
NSString
*
pickerCancelBtnText
=
indic
[
@"pickerCancelBtnText"
];
...
@@ -69,7 +45,7 @@ RCT_EXPORT_METHOD(_init:(NSDictionary *)indic){
...
@@ -69,7 +45,7 @@ RCT_EXPORT_METHOD(_init:(NSDictionary *)indic){
dataDic
[
@"pickerData"
]
=
pickerData
;
dataDic
[
@"pickerData"
]
=
pickerData
;
[
result
.
vie
w
.
subviews
enumerateObjectsUsingBlock
:
^
(
__kindof
UIView
*
_Nonnull
obj
,
NSUInteger
idx
,
BOOL
*
_Nonnull
stop
)
{
[
self
.
windo
w
.
subviews
enumerateObjectsUsingBlock
:
^
(
__kindof
UIView
*
_Nonnull
obj
,
NSUInteger
idx
,
BOOL
*
_Nonnull
stop
)
{
if
([
obj
isKindOfClass
:[
BzwPicker
class
]])
{
if
([
obj
isKindOfClass
:[
BzwPicker
class
]])
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
...
@@ -98,7 +74,7 @@ RCT_EXPORT_METHOD(_init:(NSDictionary *)indic){
...
@@ -98,7 +74,7 @@ RCT_EXPORT_METHOD(_init:(NSDictionary *)indic){
dispatch_async
(
dispatch_get_main_queue
(),
^
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[
result
.
vie
w
addSubview
:
_pick
];
[
self
.
windo
w
addSubview
:
_pick
];
[
UIView
animateWithDuration
:.
3
animations
:
^
{
[
UIView
animateWithDuration
:.
3
animations
:
^
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment