This file contains hidden or 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
| 2020-08-04 12:36:32.970 9530-9661/es.moneyman D/OkHttp: --> GET https://qa-delivery-es-release.moneyman.ru/secure/loan/pay?payment=PLN | |
| 2020-08-04 12:36:32.970 9530-9661/es.moneyman D/OkHttp: User-Agent: ANDROID-APPLICATION | |
| 2020-08-04 12:36:32.970 9530-9661/es.moneyman D/OkHttp: --> END GET | |
| 2020-08-04 12:36:33.011 9530-9643/es.moneyman D/EGL_emulation: eglMakeCurrent: 0xe23ddb60: ver 2 0 (tinfo 0xe23df120) | |
| 2020-08-04 12:36:33.080 9530-9643/es.moneyman I/chatty: uid=10102(es.moneyman) RenderThread identical 1 line | |
| 2020-08-04 12:36:33.116 9530-9643/es.moneyman D/EGL_emulation: eglMakeCurrent: 0xe23ddb60: ver 2 0 (tinfo 0xe23df120) | |
| 2020-08-04 12:36:33.280 9530-9661/es.moneyman D/OkHttp: <-- 200 https://qa-delivery-es-release.moneyman.ru/secure/loan/pay?payment=PLN (309ms) | |
| 2020-08-04 12:36:33.280 9530-9661/es.moneyman D/OkHttp: server: nginx | |
| 2020-08-04 12:36:33.280 9530-9661/es.moneyman D/OkHttp: date: Tue, 04 Aug 2020 09:36:14 GMT | |
| 2020-08-04 12:36:33.281 9530-9661/es.moneyman D/OkHttp: content-type: text/html;cha |
This file contains hidden or 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
| 1) WebView is not loaded (after rasing targetSdk to 29): https://stackoverflow.com/questions/58061708/webview-targeting-29-not-showing-content | |
| 2) Orange button lines overlapping - change line height (it is 12 in styles by default) | |
| 3) WebView scrolls badly - override method in class, which extends WebView: | |
| override fun onTouchEvent(event: MotionEvent?): Boolean { | |
| requestDisallowInterceptTouchEvent(true) | |
| return super.onTouchEvent(event) | |
| } |
This file contains hidden or 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
| class MainActivity : AppCompatActivity(){ | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| setContent { | |
| FitnestApp() | |
| } | |
| } | |
| } |
This file contains hidden or 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
| fun FitnestApp() { | |
| val navController = rememberAnimatedNavController(AnimatedComposeNavigator()) | |
| FitnestTheme { | |
| Scaffold( | |
| bottomBar = { BottomBar(navController) }, | |
| topBar = { TopBar(navController) }, | |
| ) { | |
| AnimatedNavHost( | |
| navController = navController, | |
| startDestination = Route.Splash.screenName |
This file contains hidden or 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
| @Composable | |
| fun SplashScreen(navController: NavController) { | |
| ... | |
| LaunchedEffect(key1 = null) { | |
| launch { | |
| viewModel.failureSharedFlow.collect { | |
| // TODO - show snackbar with error message | |
| } | |
| } | |
| } |
This file contains hidden or 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
| @Composable | |
| fun SnackbarDemo() { | |
| val scaffoldState: ScaffoldState = rememberScaffoldState() | |
| Scaffold(scaffoldState = scaffoldState) { | |
| Button(onClick = { | |
| scaffoldState.snackbarHostState.showSnackbar( | |
| message = "This is your message", | |
| actionLabel = "Do something" | |
| ) | |
| }) { |
This file contains hidden or 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
| internal class SnackbarDelegate( | |
| var snackbarHostState: SnackbarHostState? = null, | |
| var coroutineScope: CoroutineScope? = null | |
| ) { | |
| fun showSnackbar( | |
| message: String, | |
| actionLabel: String? = null, | |
| duration: SnackbarDuration = SnackbarDuration.Short | |
| ) { |
This file contains hidden or 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
| fun FitnestApp() { | |
| val snackbarDelegate: SnackbarDelegate by rememberInstance() | |
| val scaffoldState = rememberScaffoldState() | |
| snackbarDelegate.apply { | |
| snackbarHostState = scaffoldState.snackbarHostState | |
| coroutineScope = rememberCoroutineScope() | |
| } |
This file contains hidden or 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
| enum class SnackbarState { | |
| DEFAULT, | |
| ERROR | |
| } | |
| internal class SnackbarDelegate( | |
| var snackbarHostState: SnackbarHostState? = null, | |
| var coroutineScope: CoroutineScope? = null | |
| ) { |
This file contains hidden or 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
| fun FitnestApp() { | |
| val snackbarDelegate: SnackbarDelegate by rememberInstance() | |
| val scaffoldState = rememberScaffoldState() | |
| snackbarDelegate.apply { | |
| snackbarHostState = scaffoldState.snackbarHostState | |
| coroutineScope = rememberCoroutineScope() | |
| } |
OlderNewer