Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
safetcut-app
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
atichat
safetcut-app
Commits
2e7c2544
Commit
2e7c2544
authored
Jul 18, 2019
by
Tonk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update responsive camera
parent
7a4503ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
screens/Private/CameraScreen.js
+15
-9
No files found.
screens/Private/CameraScreen.js
View file @
2e7c2544
...
...
@@ -4,6 +4,7 @@ import { HeaderButtons, Item } from 'react-navigation-header-buttons';
import
IoniconsHeaderButton
from
'../../components/IoniconsHeaderButton'
;
import
*
as
Permissions
from
'expo-permissions'
;
import
{
Camera
}
from
'expo-camera'
;
import
{
width
,
height
}
from
'../../constants/Layout'
;
export
default
class
CameraScreen
extends
Component
{
state
=
{
...
...
@@ -48,24 +49,30 @@ export default class CameraScreen extends Component {
return
<
Text
>
No
access
to
camera
<
/Text>
;
}
return
(
<
View
style
=
{{
flex
:
1
,
backgroundColor
:
'rgba(51,51,61,0.65)'
,
padding
:
50
}}
>
<
Text
style
=
{{
fontSize
:
18
,
color
:
'white'
,
textAlign
:
'center'
,
marginBottom
:
30
}}
>
Scanning
<
/Text
>
<
Text
style
=
{{
fontSize
:
16
,
color
:
'white'
,
textAlign
:
'center'
}}
>
Scan
for
Create
smart
meter
,
Place
the
QR
code
inside
area
<
/Text
>
<
View
style
=
{{
flex
:
1
,
backgroundColor
:
'rgba(51,51,61,0.65)'
}}
>
<
View
style
=
{{
flex
:
1
,
justifyContent
:
'center'
,
paddingHorizontal
:
50
}}
>
<
Text
style
=
{{
fontSize
:
18
,
color
:
'white'
,
textAlign
:
'center'
,
marginBottom
:
'5%'
}}
>
Scanning
<
/Text
>
<
Text
style
=
{{
fontSize
:
16
,
color
:
'white'
,
textAlign
:
'center'
}}
>
Scan
for
Create
smart
meter
,
Place
the
QR
code
inside
area
<
/Text
>
<
/View
>
{
/* Scanner */
}
<
View
style
=
{{
flex
:
1
,
flex
:
1
.3
,
alignItems
:
'center'
,
top
:
'10%
'
,
justifyContent
:
'flex-start
'
,
}}
>
<
Camera
onBarCodeScanned
=
{
scanned
?
undefined
:
this
.
handleBarCodeScanned
}
style
=
{{
width
:
246
,
height
:
246
,
borderRadius
:
12
,
overflow
:
'hidden'
}}
style
=
{{
width
:
width
/
1.45
,
height
:
width
/
1.45
,
borderRadius
:
12
,
overflow
:
'hidden'
}}
flashMode
=
{
this
.
state
.
flashMode
}
/
>
<
/View
>
<
View
style
=
{{
flex
:
1.7
,
justifyContent
:
'center'
}}
>
<
Button
style
=
{{
width
:
55
,
...
...
@@ -77,7 +84,6 @@ export default class CameraScreen extends Component {
alignSelf
:
'center'
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
top
:
'30%'
,
}}
onPress
=
{()
=>
{
this
.
setState
({
...
...
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