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
U.D.C.S.WIJESOORIYA
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
Show 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
...
@@ -3,7 +3,7 @@ import { StyleSheet, TextInput, Button, Image, Dimensions, View, Text, ActivityI
import
EditScreenInfo
from
'
../components/EditScreenInfo
'
;
import
EditScreenInfo
from
'
../components/EditScreenInfo
'
;
// import { Text, View } from '../components/Themed';
// import { Text, View } from '../components/Themed';
import
{
TouchableOpacity
}
from
'
react-native
'
;
import
{
TouchableOpacity
}
from
'
react-native
'
;
import
{
Toast
}
from
'
native-base
'
;
import
{
ScrollView
,
Toast
}
from
'
native-base
'
;
import
{
ERROR_TOAST_PROPS
}
from
'
../util/util
'
;
import
{
ERROR_TOAST_PROPS
}
from
'
../util/util
'
;
import
{
screenWidth
,
styles
}
from
'
../util/styles
'
;
import
{
screenWidth
,
styles
}
from
'
../util/styles
'
;
import
TTS_logo
from
'
../assets/images/TTS_logo.jpeg
'
import
TTS_logo
from
'
../assets/images/TTS_logo.jpeg
'
...
@@ -31,7 +31,7 @@ const LoginForm = ({ onLogin, navigation }) => {
...
@@ -31,7 +31,7 @@ const LoginForm = ({ onLogin, navigation }) => {
}
}
return
(
return
(
<
View
>
<
View
>
<
TextInput
style
=
{
styles
.
input
}
<
TextInput
style
=
{
styles
.
input
}
defaultValue
=
{
username
}
defaultValue
=
{
username
}
onChangeText
=
{(
e
)
=>
{
onChangeText
=
{(
e
)
=>
{
...
@@ -64,7 +64,7 @@ const LoginForm = ({ onLogin, navigation }) => {
...
@@ -64,7 +64,7 @@ const LoginForm = ({ onLogin, navigation }) => {
onPress
=
{
onSubmit
}
onPress
=
{
onSubmit
}
disabled
=
{
loading
}
disabled
=
{
loading
}
>
{
loading
?
<
ActivityIndicator
/>
:
<
Text
style
=
{
styles
.
buttonText
}
>
LOGIN
<
/Text>
}
>
{
loading
?
<
ActivityIndicator
/>
:
<
Text
style
=
{
styles
.
buttonText
}
>
LOGIN
<
/Text>
}
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
...
@@ -74,7 +74,7 @@ const LoginForm = ({ onLogin, navigation }) => {
...
@@ -74,7 +74,7 @@ const LoginForm = ({ onLogin, navigation }) => {
export
const
LoginScreen
=
({
onLogin
,
navigation
})
=>
{
export
const
LoginScreen
=
({
onLogin
,
navigation
})
=>
{
return
(
return
(
<
View
style
=
{
styles
.
loginScreenContainer
}
>
<
Scroll
View
style
=
{
styles
.
loginScreenContainer
}
>
<
View
style
=
{{
alignContent
:
'
center
'
,
justifyContent
:
'
center
'
}}
>
<
View
style
=
{{
alignContent
:
'
center
'
,
justifyContent
:
'
center
'
}}
>
<
Image
source
=
{
TTS_logo
}
style
=
{{
height
:
screenWidth
-
30
,
width
:
screenWidth
-
30
,
margin
:
'
auto
'
}}
/
>
<
Image
source
=
{
TTS_logo
}
style
=
{{
height
:
screenWidth
-
30
,
width
:
screenWidth
-
30
,
margin
:
'
auto
'
}}
/
>
<
/View
>
<
/View
>
...
@@ -89,15 +89,10 @@ export const LoginScreen = ({ onLogin, navigation }) => {
...
@@ -89,15 +89,10 @@ export const LoginScreen = ({ onLogin, navigation }) => {
<
Text
style
=
{{
textAlign
:
'
center
'
}}
>
Don
'
t have an account? </Text>
<
Text
style
=
{{
textAlign
:
'
center
'
}}
>
Don
'
t have an account? </Text>
<Text style={{ fontWeight:
'
bold
'
, textAlign:
'
center
'
, }} onPress={() => navigation.replace(
'
Signup
'
)}>Sign up</Text>
<Text style={{ fontWeight:
'
bold
'
, textAlign:
'
center
'
, }} onPress={() => navigation.replace(
'
Signup
'
)}>Sign up</Text>
</View>
</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}>
<View style={styles.formContainer}>
<LoginForm onLogin={onLogin} />
<LoginForm onLogin={onLogin} />
</View>
</View>
</View>
</
Scroll
View>
);
);
}
}
\ No newline at end of file
MobileApp/util/styles.jsx
View file @
b4c8f105
import
{
StyleSheet
,
Dimensions
}
from
"
react-native
"
import
{
StyleSheet
,
Dimensions
}
from
"
react-native
"
export
const
screenWidth
=
Dimensions
.
get
(
'
window
'
).
width
export
const
screenWidth
=
Dimensions
.
get
(
'
window
'
).
width
export
const
screenHeight
=
Dimensions
.
get
(
'
window
'
).
height
export
const
PRIMARY_COLOR
=
'
#2f95dc
'
export
const
PRIMARY_COLOR
=
'
#2f95dc
'
...
@@ -16,7 +17,8 @@ export const styles = StyleSheet.create({
...
@@ -16,7 +17,8 @@ export const styles = StyleSheet.create({
loginContainer
:
{
loginContainer
:
{
alignItems
:
'
center
'
,
alignItems
:
'
center
'
,
flexGrow
:
1
,
flexGrow
:
1
,
justifyContent
:
'
center
'
justifyContent
:
'
center
'
,
backgroundColor
:
'
blue
'
},
},
logo
:
{
logo
:
{
position
:
'
absolute
'
,
position
:
'
absolute
'
,
...
@@ -25,7 +27,11 @@ export const styles = StyleSheet.create({
...
@@ -25,7 +27,11 @@ export const styles = StyleSheet.create({
},
},
loginScreenContainer
:
{
loginScreenContainer
:
{
padding
:
20
,
padding
:
20
,
backgroundColor
:
'
white
'
backgroundColor
:
'
white
'
,
flex
:
1
,
},
formContainer
:
{
// backgroundColor: 'green'
},
},
input
:
{
input
:
{
height
:
40
,
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