Compare commits
No commits in common. "04549321fb02f2bc0624d949c5c500b68ce15f67" and "5904b4f69a868a86bf98ad281b856a85187c6da4" have entirely different histories.
04549321fb
...
5904b4f69a
@ -67,10 +67,6 @@ dependencies {
|
|||||||
implementation(libs.rxandroid)
|
implementation(libs.rxandroid)
|
||||||
implementation(libs.retrofit)
|
implementation(libs.retrofit)
|
||||||
implementation(libs.converter.gson)
|
implementation(libs.converter.gson)
|
||||||
// Core icons (usually included with material library)
|
|
||||||
implementation( libs.androidx.compose.material.icons.core)
|
|
||||||
// Extended icons (full set of icons)
|
|
||||||
implementation(libs.androidx.compose.material.icons.extended)
|
|
||||||
// splash screen
|
// splash screen
|
||||||
implementation(libs.androidx.core.splashscreen)
|
implementation(libs.androidx.core.splashscreen)
|
||||||
// local libs
|
// local libs
|
||||||
|
|||||||
@ -1,43 +0,0 @@
|
|||||||
package com.mob.utsmyanmar.ui.components.appbar
|
|
||||||
|
|
||||||
import android.graphics.drawable.Icon
|
|
||||||
import androidx.compose.material3.*
|
|
||||||
import androidx.compose.runtime.Composable
|
|
||||||
import androidx.compose.ui.graphics.vector.ImageVector
|
|
||||||
import androidx.compose.ui.text.font.FontWeight
|
|
||||||
import com.mob.utsmyanmar.ui.theme.Primary
|
|
||||||
import com.mob.utsmyanmar.ui.theme.White
|
|
||||||
|
|
||||||
@OptIn(ExperimentalMaterial3Api::class)
|
|
||||||
@Composable
|
|
||||||
fun AppBar(
|
|
||||||
title: String,
|
|
||||||
onIconClick: (() -> Unit)? = null,
|
|
||||||
icon: ImageVector
|
|
||||||
) {
|
|
||||||
CenterAlignedTopAppBar(
|
|
||||||
title = {
|
|
||||||
Text(
|
|
||||||
text = title,
|
|
||||||
color = White,
|
|
||||||
fontWeight = FontWeight.SemiBold
|
|
||||||
)
|
|
||||||
},
|
|
||||||
navigationIcon = {
|
|
||||||
if (onIconClick != null) {
|
|
||||||
IconButton(
|
|
||||||
onClick = onIconClick
|
|
||||||
) {
|
|
||||||
Icon(
|
|
||||||
imageVector = icon,
|
|
||||||
"Appbar icon",
|
|
||||||
tint = White
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
colors = TopAppBarDefaults.topAppBarColors(
|
|
||||||
containerColor = Primary
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
@ -5,8 +5,6 @@ import androidx.compose.foundation.background
|
|||||||
import androidx.compose.foundation.clickable
|
import androidx.compose.foundation.clickable
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.icons.Icons
|
|
||||||
import androidx.compose.material.icons.filled.Menu
|
|
||||||
import androidx.compose.material3.*
|
import androidx.compose.material3.*
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.rememberCoroutineScope
|
import androidx.compose.runtime.rememberCoroutineScope
|
||||||
@ -22,7 +20,6 @@ import com.mob.utsmyanmar.ui.theme.MOBPOSTheme
|
|||||||
import com.mob.utsmyanmar.ui.theme.*
|
import com.mob.utsmyanmar.ui.theme.*
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import com.mob.utsmyanmar.R
|
import com.mob.utsmyanmar.R
|
||||||
import com.mob.utsmyanmar.ui.components.appbar.AppBar
|
|
||||||
|
|
||||||
@OptIn(ExperimentalMaterial3Api::class)
|
@OptIn(ExperimentalMaterial3Api::class)
|
||||||
@Composable
|
@Composable
|
||||||
@ -116,14 +113,28 @@ fun DashboardScreen(
|
|||||||
) {
|
) {
|
||||||
Scaffold(
|
Scaffold(
|
||||||
topBar = {
|
topBar = {
|
||||||
AppBar(
|
CenterAlignedTopAppBar(
|
||||||
title = "Dashboard",
|
title = {
|
||||||
icon = Icons.Default.Menu,
|
Text(text = "Dashboard", color = White, fontWeight = FontWeight.SemiBold)
|
||||||
onIconClick = {
|
},
|
||||||
scope.launch {
|
navigationIcon = {
|
||||||
drawerState.open()
|
IconButton(
|
||||||
|
onClick = {
|
||||||
|
scope.launch {
|
||||||
|
drawerState.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
) {
|
||||||
|
Icon(
|
||||||
|
painter = painterResource(R.drawable.ic_menu),
|
||||||
|
contentDescription = "Menu Icon",
|
||||||
|
tint = White
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
colors = TopAppBarDefaults.topAppBarColors(
|
||||||
|
containerColor = Primary
|
||||||
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
) { paddingValues ->
|
) { paddingValues ->
|
||||||
|
|||||||
@ -1,259 +1,41 @@
|
|||||||
package com.mob.utsmyanmar.ui.transaction_result
|
package com.mob.utsmyanmar.ui.transaction_result
|
||||||
|
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Box
|
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Row
|
|
||||||
import androidx.compose.foundation.layout.Spacer
|
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
|
||||||
import androidx.compose.foundation.layout.height
|
|
||||||
import androidx.compose.foundation.layout.padding
|
|
||||||
import androidx.compose.foundation.layout.size
|
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
|
||||||
import androidx.compose.material.icons.Icons
|
|
||||||
import androidx.compose.material.icons.filled.ChevronLeft
|
|
||||||
import androidx.compose.material3.Button
|
import androidx.compose.material3.Button
|
||||||
import androidx.compose.material3.ButtonColors
|
|
||||||
import androidx.compose.material3.Card
|
|
||||||
import androidx.compose.material3.CardDefaults
|
|
||||||
import androidx.compose.material3.CenterAlignedTopAppBar
|
|
||||||
import androidx.compose.material3.CircularProgressIndicator
|
import androidx.compose.material3.CircularProgressIndicator
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
|
||||||
import androidx.compose.material3.HorizontalDivider
|
|
||||||
import androidx.compose.material3.Icon
|
|
||||||
import androidx.compose.material3.IconButton
|
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.material3.Scaffold
|
|
||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.draw.blur
|
|
||||||
import androidx.compose.ui.res.painterResource
|
|
||||||
import androidx.compose.ui.text.font.FontWeight
|
|
||||||
import androidx.compose.ui.text.style.TextAlign
|
|
||||||
import androidx.compose.ui.tooling.preview.Preview
|
|
||||||
import androidx.compose.ui.unit.dp
|
|
||||||
import androidx.compose.ui.unit.sp
|
|
||||||
import com.mob.utsmyanmar.R
|
|
||||||
import com.mob.utsmyanmar.ui.components.appbar.AppBar
|
|
||||||
import com.mob.utsmyanmar.ui.theme.Black
|
|
||||||
import com.mob.utsmyanmar.ui.theme.Primary
|
|
||||||
import com.mob.utsmyanmar.ui.theme.White
|
|
||||||
|
|
||||||
@OptIn(ExperimentalMaterial3Api::class)
|
|
||||||
@Composable
|
@Composable
|
||||||
fun TransactionResultScreen(
|
fun TransactionResultScreen(
|
||||||
state: TransactionResultState,
|
state: TransactionResultState,
|
||||||
onEvent: (TransactionResultEvent) -> Unit,
|
onEvent: (TransactionResultEvent) -> Unit
|
||||||
) {
|
) {
|
||||||
Scaffold(
|
Column(
|
||||||
topBar = {
|
modifier = Modifier.fillMaxSize(),
|
||||||
AppBar(
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
title = "Transaction Results",
|
verticalArrangement = Arrangement.Center
|
||||||
icon = Icons.Default.ChevronLeft,
|
) {
|
||||||
onIconClick = { TransactionResultEvent.BackClick }
|
Text(text = state.title)
|
||||||
)
|
|
||||||
|
if (state.message.isNotEmpty()) {
|
||||||
|
Text(text = state.message)
|
||||||
}
|
}
|
||||||
) { paddingValues ->
|
|
||||||
Column(
|
if (state.isLoading) {
|
||||||
modifier = Modifier
|
CircularProgressIndicator()
|
||||||
.padding(paddingValues)
|
}
|
||||||
.fillMaxSize()
|
|
||||||
.padding(16.dp),
|
Button(
|
||||||
verticalArrangement = Arrangement.SpaceBetween
|
onClick = {
|
||||||
|
onEvent(TransactionResultEvent.BackClick)
|
||||||
|
}
|
||||||
) {
|
) {
|
||||||
Column() {
|
Text("Back")
|
||||||
|
|
||||||
Card(
|
|
||||||
colors = CardDefaults.cardColors(
|
|
||||||
containerColor = White
|
|
||||||
),
|
|
||||||
modifier = Modifier
|
|
||||||
.fillMaxWidth()
|
|
||||||
.height(200.dp),
|
|
||||||
elevation = CardDefaults.cardElevation(
|
|
||||||
defaultElevation = 6.dp
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
Column(
|
|
||||||
modifier = Modifier.fillMaxSize(),
|
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
|
||||||
) {
|
|
||||||
Spacer(modifier = Modifier.height(16.dp))
|
|
||||||
Icon(
|
|
||||||
painter = painterResource(R.drawable.ic_success),
|
|
||||||
modifier = Modifier.size(100.dp),
|
|
||||||
tint = Primary,
|
|
||||||
contentDescription = "success icon"
|
|
||||||
)
|
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
|
||||||
Text(
|
|
||||||
text = "Transaction Status",
|
|
||||||
style = MaterialTheme.typography.bodyLarge.copy(
|
|
||||||
fontSize = 18.sp,
|
|
||||||
fontWeight = FontWeight.SemiBold
|
|
||||||
),
|
|
||||||
textAlign = TextAlign.Center,
|
|
||||||
color = Black
|
|
||||||
)
|
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
|
||||||
Text(
|
|
||||||
text = state.message,
|
|
||||||
style = MaterialTheme.typography.bodyLarge.copy(
|
|
||||||
fontSize = 16.sp,
|
|
||||||
fontWeight = FontWeight.Medium
|
|
||||||
),
|
|
||||||
textAlign = TextAlign.Center,
|
|
||||||
color = Black
|
|
||||||
)
|
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Spacer(Modifier.height(24.dp))
|
|
||||||
|
|
||||||
Card(
|
|
||||||
colors = CardDefaults.cardColors(
|
|
||||||
containerColor = Primary
|
|
||||||
),
|
|
||||||
modifier = Modifier.fillMaxWidth().height(250.dp),
|
|
||||||
elevation = CardDefaults.cardElevation(
|
|
||||||
defaultElevation = 6.dp
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
Column(
|
|
||||||
modifier = Modifier
|
|
||||||
.fillMaxSize()
|
|
||||||
.padding(16.dp),
|
|
||||||
) {
|
|
||||||
Spacer(modifier = Modifier.height(16.dp))
|
|
||||||
Text(
|
|
||||||
text = "Transaction Details",
|
|
||||||
style = MaterialTheme.typography.bodyLarge.copy(
|
|
||||||
fontSize = 18.sp,
|
|
||||||
fontWeight = FontWeight.SemiBold
|
|
||||||
),
|
|
||||||
color = White
|
|
||||||
)
|
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
|
||||||
Row(
|
|
||||||
modifier = Modifier.fillMaxWidth(),
|
|
||||||
horizontalArrangement = Arrangement.SpaceBetween
|
|
||||||
) {
|
|
||||||
Text(
|
|
||||||
text = "Amount",
|
|
||||||
style = MaterialTheme.typography.bodyLarge.copy(
|
|
||||||
fontSize = 14.sp,
|
|
||||||
fontWeight = FontWeight.Medium
|
|
||||||
),
|
|
||||||
color = White
|
|
||||||
)
|
|
||||||
Text(
|
|
||||||
text = "1,000 MMK",
|
|
||||||
style = MaterialTheme.typography.bodyLarge.copy(
|
|
||||||
fontSize = 15.sp,
|
|
||||||
fontWeight = FontWeight.SemiBold
|
|
||||||
),
|
|
||||||
color = White
|
|
||||||
)
|
|
||||||
}
|
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
|
||||||
Row(
|
|
||||||
modifier = Modifier.fillMaxWidth(),
|
|
||||||
horizontalArrangement = Arrangement.SpaceBetween
|
|
||||||
) {
|
|
||||||
Text(
|
|
||||||
text = "Transaction Type",
|
|
||||||
style = MaterialTheme.typography.bodyLarge.copy(
|
|
||||||
fontSize = 14.sp,
|
|
||||||
fontWeight = FontWeight.Medium
|
|
||||||
),
|
|
||||||
color = White
|
|
||||||
)
|
|
||||||
Text(
|
|
||||||
text = "MPU",
|
|
||||||
style = MaterialTheme.typography.bodyLarge.copy(
|
|
||||||
fontSize = 15.sp,
|
|
||||||
fontWeight = FontWeight.SemiBold
|
|
||||||
),
|
|
||||||
color = White
|
|
||||||
)
|
|
||||||
}
|
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
|
||||||
HorizontalDivider(thickness = 1.dp, color = White)
|
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
|
||||||
Column(
|
|
||||||
modifier = Modifier.fillMaxWidth(),
|
|
||||||
horizontalAlignment = Alignment.CenterHorizontally
|
|
||||||
) {
|
|
||||||
Text(
|
|
||||||
text = "Transaction Amount",
|
|
||||||
style = MaterialTheme.typography.bodyLarge.copy(
|
|
||||||
fontSize = 14.sp,
|
|
||||||
fontWeight = FontWeight.Medium
|
|
||||||
),
|
|
||||||
color = White
|
|
||||||
)
|
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
|
||||||
Text(
|
|
||||||
text = "500.00 MMMK",
|
|
||||||
style = MaterialTheme.typography.bodyLarge.copy(
|
|
||||||
fontSize = 22.sp,
|
|
||||||
fontWeight = FontWeight.Bold
|
|
||||||
),
|
|
||||||
color = White
|
|
||||||
)
|
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
|
||||||
Text(
|
|
||||||
text = "Received",
|
|
||||||
style = MaterialTheme.typography.bodyLarge.copy(
|
|
||||||
fontSize = 13.sp,
|
|
||||||
fontWeight = FontWeight.Normal
|
|
||||||
),
|
|
||||||
color = White
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Button(
|
|
||||||
modifier = Modifier
|
|
||||||
.fillMaxWidth()
|
|
||||||
.height(50.dp),
|
|
||||||
colors = ButtonColors(
|
|
||||||
containerColor = Primary,
|
|
||||||
contentColor = White,
|
|
||||||
disabledContainerColor = Primary,
|
|
||||||
disabledContentColor = White,
|
|
||||||
),
|
|
||||||
shape = RoundedCornerShape(12.dp),
|
|
||||||
onClick = {}
|
|
||||||
) {
|
|
||||||
Text(
|
|
||||||
text = "Transaction Completed",
|
|
||||||
style = MaterialTheme.typography.bodyLarge.copy(
|
|
||||||
fontSize = 16.sp,
|
|
||||||
fontWeight = FontWeight.SemiBold
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Preview(showBackground = true, showSystemUi = true)
|
|
||||||
@Composable
|
|
||||||
fun TransactionResultScreenPreview() {
|
|
||||||
TransactionResultScreen(
|
|
||||||
state = TransactionResultState(
|
|
||||||
title = "Transaction Success",
|
|
||||||
message = "Transaction Approved",
|
|
||||||
isLoading = false
|
|
||||||
),
|
|
||||||
onEvent = {}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
<!--
|
|
||||||
~ Copyright (C) 2026 The Android Open Source Project
|
|
||||||
~
|
|
||||||
~ 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.
|
|
||||||
-->
|
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="800dp"
|
|
||||||
android:height="800dp"
|
|
||||||
android:viewportWidth="52"
|
|
||||||
android:viewportHeight="52">
|
|
||||||
<path
|
|
||||||
android:pathData="M26,2C12.7,2 2,12.7 2,26s10.7,24 24,24s24,-10.7 24,-24S39.3,2 26,2zM39.4,20L24.1,35.5c-0.6,0.6 -1.6,0.6 -2.2,0L13.5,27c-0.6,-0.6 -0.6,-1.6 0,-2.2l2.2,-2.2c0.6,-0.6 1.6,-0.6 2.2,0l4.4,4.5c0.4,0.4 1.1,0.4 1.5,0L35,15.5c0.6,-0.6 1.6,-0.6 2.2,0l2.2,2.2C40.1,18.3 40.1,19.3 39.4,20z"
|
|
||||||
android:fillColor="#000000"/>
|
|
||||||
</vector>
|
|
||||||
@ -22,8 +22,6 @@ rxjava = "3.1.12"
|
|||||||
hiltNavigationCompose = "1.2.0"
|
hiltNavigationCompose = "1.2.0"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
androidx-compose-material-icons-core = { module = "androidx.compose.material:material-icons-core" }
|
|
||||||
androidx-compose-material-icons-extended = { module = "androidx.compose.material:material-icons-extended" }
|
|
||||||
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
|
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
|
||||||
androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "coreSplashscreen" }
|
androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "coreSplashscreen" }
|
||||||
androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigationCompose" }
|
androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigationCompose" }
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
o/PayLib-release-1.4.64-runtime
|
|
||||||
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
o/sunmiui-1.1.27-runtime
|
|
||||||
Loading…
Reference in New Issue
Block a user