Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
TeamPrinterV2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Aleksandr
TeamPrinterV2
Commits
1b6a5181
Commit
1b6a5181
authored
Jul 23, 2024
by
Aleksandr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display render preview progress
parent
1b5c244f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
1 deletions
+45
-1
app/src/main/java/com/isidroid/c23/ui/screen/render_preview/RenderPreviewScreen.kt
+37
-1
app/src/main/res/raw/convert.json
+0
-0
library/location/src/huawei/java/com/isidroid/location/repository/LocationRepositoryImpl.kt
+8
-0
No files found.
app/src/main/java/com/isidroid/c23/ui/screen/render_preview/RenderPreviewScreen.kt
View file @
1b6a5181
...
@@ -6,6 +6,7 @@ import androidx.activity.compose.BackHandler
...
@@ -6,6 +6,7 @@ import androidx.activity.compose.BackHandler
import
androidx.compose.foundation.background
import
androidx.compose.foundation.background
import
androidx.compose.foundation.clickable
import
androidx.compose.foundation.clickable
import
androidx.compose.foundation.layout.Box
import
androidx.compose.foundation.layout.Box
import
androidx.compose.foundation.layout.Column
import
androidx.compose.foundation.layout.consumeWindowInsets
import
androidx.compose.foundation.layout.consumeWindowInsets
import
androidx.compose.foundation.layout.fillMaxSize
import
androidx.compose.foundation.layout.fillMaxSize
import
androidx.compose.foundation.layout.fillMaxWidth
import
androidx.compose.foundation.layout.fillMaxWidth
...
@@ -15,6 +16,7 @@ import androidx.compose.material3.ExperimentalMaterial3Api
...
@@ -15,6 +16,7 @@ import androidx.compose.material3.ExperimentalMaterial3Api
import
androidx.compose.material3.MaterialTheme
import
androidx.compose.material3.MaterialTheme
import
androidx.compose.material3.Scaffold
import
androidx.compose.material3.Scaffold
import
androidx.compose.material3.Surface
import
androidx.compose.material3.Surface
import
androidx.compose.material3.Text
import
androidx.compose.runtime.Composable
import
androidx.compose.runtime.Composable
import
androidx.compose.runtime.LaunchedEffect
import
androidx.compose.runtime.LaunchedEffect
import
androidx.compose.runtime.State
import
androidx.compose.runtime.State
...
@@ -23,14 +25,20 @@ import androidx.compose.runtime.mutableIntStateOf
...
@@ -23,14 +25,20 @@ import androidx.compose.runtime.mutableIntStateOf
import
androidx.compose.runtime.mutableStateOf
import
androidx.compose.runtime.mutableStateOf
import
androidx.compose.runtime.remember
import
androidx.compose.runtime.remember
import
androidx.compose.runtime.setValue
import
androidx.compose.runtime.setValue
import
androidx.compose.ui.Alignment
import
androidx.compose.ui.Modifier
import
androidx.compose.ui.Modifier
import
androidx.compose.ui.platform.LocalContext
import
androidx.compose.ui.platform.LocalContext
import
androidx.compose.ui.res.stringResource
import
androidx.compose.ui.res.stringResource
import
androidx.compose.ui.text.style.TextAlign
import
androidx.compose.ui.tooling.preview.Devices
import
androidx.compose.ui.tooling.preview.Devices
import
androidx.compose.ui.tooling.preview.Preview
import
androidx.compose.ui.tooling.preview.Preview
import
androidx.compose.ui.unit.dp
import
androidx.compose.ui.unit.dp
import
androidx.constraintlayout.compose.ConstraintLayout
import
androidx.constraintlayout.compose.ConstraintLayout
import
androidx.constraintlayout.compose.Dimension
import
androidx.constraintlayout.compose.Dimension
import
com.airbnb.lottie.compose.LottieAnimation
import
com.airbnb.lottie.compose.LottieCompositionSpec
import
com.airbnb.lottie.compose.LottieConstants
import
com.airbnb.lottie.compose.rememberLottieComposition
import
com.isidroid.c23.R
import
com.isidroid.c23.R
import
com.isidroid.c23.ui._component.TopAppBarComponent
import
com.isidroid.c23.ui._component.TopAppBarComponent
import
com.isidroid.c23.ui.screen.render_preview._component.PagerPreviewComponent
import
com.isidroid.c23.ui.screen.render_preview._component.PagerPreviewComponent
...
@@ -81,7 +89,35 @@ fun RenderPreviewScreen(
...
@@ -81,7 +89,35 @@ fun RenderPreviewScreen(
onEventSent
(
RenderContract
.
Event
.
ToBack
)
onEventSent
(
RenderContract
.
Event
.
ToBack
)
}
}
if
(
state
.
value
.
rendering
)
return
if
(
state
.
value
.
rendering
)
{
val
composition
by
rememberLottieComposition
(
LottieCompositionSpec
.
RawRes
(
R
.
raw
.
convert
))
Box
(
modifier
=
Modifier
.
fillMaxSize
(),
contentAlignment
=
Alignment
.
Center
)
{
Column
{
LottieAnimation
(
composition
=
composition
,
iterations
=
LottieConstants
.
IterateForever
,
modifier
=
modifier
.
fillMaxWidth
()
.
padding
(
48
.
dp
)
)
Text
(
text
=
"Please wait until convert is completed"
,
style
=
MaterialTheme
.
typography
.
labelLarge
,
modifier
=
Modifier
.
fillMaxWidth
(),
textAlign
=
TextAlign
.
Center
)
}
}
return
}
when
{
when
{
spotHasNoPrintProfiles
->
{
spotHasNoPrintProfiles
->
{
...
...
app/src/main/res/raw/convert.json
0 → 100644
View file @
1b6a5181
This diff is collapsed.
Click to expand it.
library/location/src/huawei/java/com/isidroid/location/repository/LocationRepositoryImpl.kt
View file @
1b6a5181
package
com.isidroid.location.repository
package
com.isidroid.location.repository
import
android.content.Context
import
android.content.Context
import
androidx.compose.ui.text.intl.Locale
import
com.isidroid.location.ext.calculateDistanceBetweenPoints
class
LocationRepositoryImpl
(
context
:
Context
)
:
LocationRepository
{
class
LocationRepositoryImpl
(
context
:
Context
)
:
LocationRepository
{
override
fun
getCurrentLocation
():
Pair
<
Double
,
Double
>
{
override
fun
getCurrentLocation
():
Pair
<
Double
,
Double
>
{
TODO
(
"Not yet implemented"
)
TODO
(
"Not yet implemented"
)
}
}
override
fun
findDistance
(
myLat
:
Double
,
myLng
:
Double
,
locationLat
:
Double
?,
locationLng
:
Double
?):
Float
?
{
if
(
locationLat
==
null
||
locationLng
==
null
)
return
null
return
calculateDistanceBetweenPoints
(
Locale
.
current
,
myLat
,
myLng
,
locationLat
,
locationLng
).
toFloat
()
}
}
}
\ No newline at end of file
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