Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
PPL KI Ganjil 2021 2022
Clicks - Ecosystem Business
clicks-frontend
Commits
2aef1714
Commit
2aef1714
authored
Dec 04, 2021
by
Mohammad Faraz Abisha Mirza
Committed by
Abraham Rudolf Brahmana
Dec 04, 2021
Browse files
feat: add floating button for new forum post
parent
95fa7610
Changes
3
Hide whitespace changes
Inline
Side-by-side
assets/images/plusButton.png
0 → 100644
View file @
2aef1714
8.56 KB
src/navigation/ForumStackNavigator.tsx
View file @
2aef1714
...
...
@@ -11,7 +11,7 @@ const CreateEcosystemStackNavigator = () => {
<
ForumStack
.
Screen
name
=
"AddForumPost"
component
=
{
AddForumPostScreen
}
options
=
{
{
title
:
""
}
}
options
=
{
({
route
})
=>
({
title
:
route
.
params
.
headerTitle
}
)
}
/>
<
ForumStack
.
Screen
name
=
"ForumPostDetail"
...
...
src/screens/ecosystem/EcosystemDetailScreen.tsx
View file @
2aef1714
import
*
as
React
from
"
react
"
;
import
{
StyleSheet
,
Image
,
Alert
,
ActivityIndicator
}
from
"
react-native
"
;
import
{
StyleSheet
,
Image
,
Alert
,
ActivityIndicator
,
TouchableOpacity
,
}
from
"
react-native
"
;
import
{
Text
,
View
}
from
"
../../components/Themed
"
;
import
Colors
from
"
../../constants/Colors
"
;
import
SmallButton
from
"
../../components/button/SmallButton
"
;
...
...
@@ -189,6 +195,20 @@ const EcosystemDetailScreen = ({
color
=
"#000000"
/>
</
View
>
<
TouchableOpacity
style
=
{
styles
.
floatingTouchable
}
onPress
=
{
()
=>
{
nav
.
navigate
(
"
Forum
"
,
{
screen
:
"
AddForumPost
"
,
params
:
{
headerTitle
:
title
,
id
:
id
},
});
}
}
>
<
Image
source
=
{
require
(
"
../../../assets/images/plusButton.png
"
)
}
style
=
{
styles
.
floatingButton
}
/>
</
TouchableOpacity
>
</
View
>
);
};
...
...
@@ -239,6 +259,20 @@ const styles = StyleSheet.create({
marginTop
:
4
,
width
:
Layout
.
window
.
width
*
0.9
,
},
floatingTouchable
:
{
width
:
60
,
height
:
60
,
position
:
"
absolute
"
,
alignItems
:
"
center
"
,
justifyContent
:
"
center
"
,
right
:
21
,
bottom
:
21
,
},
floatingButton
:
{
resizeMode
:
"
contain
"
,
width
:
72
,
height
:
72
,
},
});
export
default
EcosystemDetailScreen
;
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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