-
Notifications
You must be signed in to change notification settings - Fork 453
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit : migrated KYCLevel3Fragment to compose
- Loading branch information
1 parent
88fff18
commit 02109c2
Showing
2 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
mifospay/src/main/java/org/mifos/mobilewallet/mifospay/kyc/presenter/KYCLevel3ViewModel.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,15 @@ | ||
package org.mifos.mobilewallet.mifospay.kyc.presenter | ||
|
||
import androidx.lifecycle.ViewModel | ||
import dagger.hilt.android.lifecycle.HiltViewModel | ||
import org.mifos.mobilewallet.core.base.UseCaseHandler | ||
import org.mifos.mobilewallet.mifospay.data.local.LocalRepository | ||
import javax.inject.Inject | ||
|
||
@HiltViewModel | ||
class KYCLevel3ViewModel @Inject constructor( | ||
private val mUseCaseHandler: UseCaseHandler, | ||
private val mLocalRepository: LocalRepository | ||
) : ViewModel() { | ||
|
||
} |
65 changes: 65 additions & 0 deletions
65
mifospay/src/main/java/org/mifos/mobilewallet/mifospay/kyc/ui/KYCLevel3Screen.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,65 @@ | ||
package org.mifos.mobilewallet.mifospay.kyc.ui | ||
|
||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.material3.Button | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.getValue | ||
import androidx.compose.runtime.mutableStateOf | ||
import androidx.compose.runtime.saveable.rememberSaveable | ||
import androidx.compose.runtime.setValue | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import androidx.compose.ui.unit.dp | ||
import org.mifos.mobilewallet.mifospay.R | ||
import org.mifos.mobilewallet.mifospay.designsystem.component.MifosOutlinedTextField | ||
import org.mifos.mobilewallet.mifospay.theme.MifosTheme | ||
|
||
@Composable | ||
fun KYCLevel3Screen( | ||
modifier: Modifier | ||
) { | ||
var panIdValue by rememberSaveable { mutableStateOf("") } | ||
|
||
Column( | ||
modifier = Modifier | ||
.fillMaxSize() | ||
.padding(20.dp), | ||
verticalArrangement = Arrangement.spacedBy(20.dp) | ||
) { | ||
|
||
MifosOutlinedTextField( | ||
modifier = modifier | ||
.fillMaxWidth() | ||
.padding(vertical = 8.dp), | ||
value = panIdValue, | ||
onValueChange = { | ||
panIdValue = it | ||
}, | ||
label = R.string.pan_id, | ||
) | ||
|
||
Button( | ||
onClick = {}, | ||
modifier = Modifier | ||
.align(Alignment.CenterHorizontally) | ||
.padding(16.dp) | ||
) { | ||
Text(stringResource(R.string.submit)) | ||
} | ||
} | ||
} | ||
|
||
@Preview(showBackground = true) | ||
@Composable | ||
fun KYCLevel3ScreenPreview() { | ||
MifosTheme { | ||
KYCLevel3Screen(modifier = Modifier) | ||
} | ||
} |