This repository has been archived by the owner on Jun 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* created screen context * Synced Micronaut BFF sample to Spring BFF sample. * upadte screen context * change screen context * style screen context * screen context flex updated * update * update send request screen context * change screen button and text * change screen platform and customPlatform * change screen image remote * change constants * change style textField * created screen safe area * Synced Micronaut BFF sample to Spring BFF sample. * change screen safe area * created style text-input and change name services and controller image * Synced Spring BFF sample to Micronaut BFF sample. * Synced Micronaut BFF sample to Spring BFF sample. * translation screen context * created screen text input * Synced Micronaut BFF sample to Spring BFF sample. * change color text and add padding * change screen image * remove wildcard import * Synced Micronaut BFF sample to Spring BFF sample. * Synced Spring BFF sample to Micronaut BFF sample. * very large method correction * change style text-network-image to text-image-remote * change style button parent * Synced Spring BFF sample to Micronaut BFF sample. Signed-off-by: runner <[email protected]> Co-authored-by: Luis Gustavo <[email protected]> Co-authored-by: Matheus Ribeiro <[email protected]> Co-authored-by: runner <[email protected]>
- Loading branch information
1 parent
5ca1016
commit d99fc70
Showing
29 changed files
with
775 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
android/sample/src/main/res/drawable/text_input_background.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
~ Copyright 2020 ZUP IT SERVICOS EM TECNOLOGIA E INOVACAO SA | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
|
||
<shape xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<solid android:color="#FFFFFF"/> | ||
<padding android:left="10dp"/> | ||
|
||
<stroke | ||
android:width="3dp" | ||
android:color="#808080"/> | ||
<corners | ||
android:radius="5dp"/> | ||
</shape> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
107 changes: 107 additions & 0 deletions
107
backend/sample/core/src/main/kotlin/br/com/zup/beagle/sample/builder/SafeAreaBuilder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
/* | ||
* Copyright 2020 ZUP IT SERVICOS EM TECNOLOGIA E INOVACAO SA | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package br.com.zup.beagle.sample.builder | ||
|
||
import br.com.zup.beagle.core.Style | ||
import br.com.zup.beagle.ext.applyStyle | ||
import br.com.zup.beagle.ext.unitReal | ||
import br.com.zup.beagle.sample.constants.LOGO_BEAGLE | ||
import br.com.zup.beagle.sample.constants.SCREEN_SAFE_AREA_FALSE_ENDPOINT | ||
import br.com.zup.beagle.sample.constants.SCREEN_SAFE_AREA_TRUE_ENDPOINT | ||
import br.com.zup.beagle.widget.action.Alert | ||
import br.com.zup.beagle.widget.action.Navigate | ||
import br.com.zup.beagle.widget.action.Route | ||
import br.com.zup.beagle.widget.core.AlignItems | ||
import br.com.zup.beagle.widget.core.AlignSelf | ||
import br.com.zup.beagle.widget.core.EdgeValue | ||
import br.com.zup.beagle.widget.core.Flex | ||
import br.com.zup.beagle.widget.layout.Container | ||
import br.com.zup.beagle.widget.layout.NavigationBar | ||
import br.com.zup.beagle.widget.layout.SafeArea | ||
import br.com.zup.beagle.widget.layout.Screen | ||
import br.com.zup.beagle.widget.layout.ScreenBuilder | ||
import br.com.zup.beagle.widget.ui.Button | ||
import br.com.zup.beagle.widget.ui.Image | ||
import br.com.zup.beagle.widget.ui.ImagePath | ||
import br.com.zup.beagle.widget.ui.Text | ||
|
||
object SafeAreaBuilder: ScreenBuilder { | ||
override fun build() = Screen( | ||
navigationBar = NavigationBar( | ||
title = "Beagle Safe Area", | ||
showBackButton = true | ||
), | ||
child = Container( | ||
listOf( | ||
Button( | ||
text = "Safe Area True", | ||
onPress = listOf( | ||
Navigate.PushView(Route.Remote(SCREEN_SAFE_AREA_TRUE_ENDPOINT)), | ||
Alert( | ||
title = "Attention", | ||
message = "This functionality works only on some iPhones models!" | ||
) | ||
) | ||
|
||
), | ||
Button( | ||
text = "Safe Area False", | ||
onPress = listOf(Navigate.PushView(Route.Remote(SCREEN_SAFE_AREA_FALSE_ENDPOINT))) | ||
|
||
) | ||
) | ||
) | ||
) | ||
|
||
fun createScreen(safeArea: Boolean): Screen = Screen( | ||
navigationBar = NavigationBar( | ||
title = "Beagle Safe Area", | ||
showBackButton = true | ||
), | ||
child = Container( | ||
listOf( | ||
Text("Safe area $safeArea").applyStyle( | ||
Style( | ||
margin = EdgeValue(top = 100.unitReal()), | ||
flex = Flex( | ||
alignSelf = AlignSelf.CENTER | ||
) | ||
) | ||
), | ||
Image(ImagePath.Local.justMobile(LOGO_BEAGLE)).applyStyle( | ||
Style( | ||
margin = EdgeValue(top = 100.unitReal()) | ||
) | ||
) | ||
) | ||
).applyStyle( | ||
Style( | ||
backgroundColor = "#b7efcd", | ||
flex = Flex( | ||
grow = 1.0, | ||
alignItems = AlignItems.CENTER | ||
) | ||
) | ||
), | ||
safeArea = SafeArea( | ||
top = safeArea, | ||
bottom = safeArea, | ||
leading = safeArea, | ||
trailing = safeArea | ||
) | ||
) | ||
} |
Oops, something went wrong.