Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
240
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2022-240
240
Commits
b4c8f105
Commit
b4c8f105
authored
Aug 21, 2022
by
Malsha Rathnasiri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix keyboard overlap issue
parent
3c541e56
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
14 deletions
+15
-14
MobileApp/screens/loginScreen.js
MobileApp/screens/loginScreen.js
+7
-12
MobileApp/util/styles.jsx
MobileApp/util/styles.jsx
+8
-2
No files found.
MobileApp/screens/loginScreen.js
View file @
b4c8f105
...
...
@@ -3,7 +3,7 @@ import { StyleSheet, TextInput, Button, Image, Dimensions, View, Text, ActivityI
import
EditScreenInfo
from
'
../components/EditScreenInfo
'
;
// import { Text, View } from '../components/Themed';
import
{
TouchableOpacity
}
from
'
react-native
'
;
import
{
Toast
}
from
'
native-base
'
;
import
{
ScrollView
,
Toast
}
from
'
native-base
'
;
import
{
ERROR_TOAST_PROPS
}
from
'
../util/util
'
;
import
{
screenWidth
,
styles
}
from
'
../util/styles
'
;
import
TTS_logo
from
'
../assets/images/TTS_logo.jpeg
'
...
...
@@ -31,7 +31,7 @@ const LoginForm = ({ onLogin, navigation }) => {
}
return
(
<
View
>
<
View
>
<
TextInput
style
=
{
styles
.
input
}
defaultValue
=
{
username
}
onChangeText
=
{(
e
)
=>
{
...
...
@@ -61,11 +61,11 @@ const LoginForm = ({ onLogin, navigation }) => {
<
TouchableOpacity
style
=
{
styles
.
buttonContainer
}
// onPress={onButtonPress}
// disabled={!username || !password}
onPress
=
{
onSubmit
}
disabled
=
{
loading
}
>
{
loading
?
<
ActivityIndicator
/>
:
<
Text
style
=
{
styles
.
buttonText
}
>
LOGIN
<
/Text>
}
>
{
loading
?
<
ActivityIndicator
/>
:
<
Text
style
=
{
styles
.
buttonText
}
>
LOGIN
<
/Text>
}
<
/TouchableOpacity
>
<
/View
>
// define your styles
...
...
@@ -74,7 +74,7 @@ const LoginForm = ({ onLogin, navigation }) => {
export
const
LoginScreen
=
({
onLogin
,
navigation
})
=>
{
return
(
<
View
style
=
{
styles
.
loginScreenContainer
}
>
<
Scroll
View
style
=
{
styles
.
loginScreenContainer
}
>
<
View
style
=
{{
alignContent
:
'
center
'
,
justifyContent
:
'
center
'
}}
>
<
Image
source
=
{
TTS_logo
}
style
=
{{
height
:
screenWidth
-
30
,
width
:
screenWidth
-
30
,
margin
:
'
auto
'
}}
/
>
<
/View
>
...
...
@@ -89,15 +89,10 @@ export const LoginScreen = ({ onLogin, navigation }) => {
<
Text
style
=
{{
textAlign
:
'
center
'
}}
>
Don
'
t have an account? </Text>
<Text style={{ fontWeight:
'
bold
'
, textAlign:
'
center
'
, }} onPress={() => navigation.replace(
'
Signup
'
)}>Sign up</Text>
</View>
<View style={styles.loginContainer}>
{/* r<Image resizeMode="contain" style={styles.logo} source={require(
'
..
/
..
/
components
/
images
/
logo
-
dark
-
bg
.
png
'
)} /> */}
</View>
<View style={styles.formContainer}>
<LoginForm onLogin={onLogin} />
</View>
</View>
</
Scroll
View>
);
}
\ No newline at end of file
MobileApp/util/styles.jsx
View file @
b4c8f105
import
{
StyleSheet
,
Dimensions
}
from
"
react-native
"
export
const
screenWidth
=
Dimensions
.
get
(
'
window
'
).
width
export
const
screenHeight
=
Dimensions
.
get
(
'
window
'
).
height
export
const
PRIMARY_COLOR
=
'
#2f95dc
'
...
...
@@ -16,7 +17,8 @@ export const styles = StyleSheet.create({
loginContainer
:
{
alignItems
:
'
center
'
,
flexGrow
:
1
,
justifyContent
:
'
center
'
justifyContent
:
'
center
'
,
backgroundColor
:
'
blue
'
},
logo
:
{
position
:
'
absolute
'
,
...
...
@@ -25,7 +27,11 @@ export const styles = StyleSheet.create({
},
loginScreenContainer
:
{
padding
:
20
,
backgroundColor
:
'
white
'
backgroundColor
:
'
white
'
,
flex
:
1
,
},
formContainer
:
{
// backgroundColor: 'green'
},
input
:
{
height
:
40
,
...
...
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