screens

Flutter: Move to a new screen without back

隐身守侯 提交于 2019-12-02 22:23:27
I'm implementing an authentication flow in my Flutter app. After a sign in attempt, the CheckAuth (which checks whether a user is signed in or not and then opens home screen or sign up screen accordingly) is opened with this code: void _signIn() async { await _auth .signInWithEmailAndPassword( email: _userEmail.trim(), password: _userPassword.trim()) .then((task) { // go to home screen if (task.getIdToken() != null) { setState(() { Navigator.pushReplacement( context, new MaterialPageRoute( builder: (BuildContext context) => new CheckAuth())); }); } else { print("Authentication failed"); } });

UI for different screen densities

大城市里の小女人 提交于 2019-12-02 16:24:32
问题 I don't understand the benefit of resources configuration qualifiers designed to support multiple screen densities, for example : for an mdpi you put an icon of 100x100 px for an hdpi you put an icon of 150x150 px for an xhdpi you put an icon of 200x200 px Then you display this icon in an imageView of dimensions 100 x 100 dip which already maintains its size on multiple screens of different sizes and densities. Why don't we just use the xhdpi version of the icon in the resources above as a

Kivy - Screen Manager - Accessing attribute in other class

情到浓时终转凉″ 提交于 2019-12-01 05:22:45
Using the Kivy Screen Manager, I create two Screens. Whilst being in screen 1, i want to change a label in screen two. I highlight the problematic area in my code: my test.ky: #: import ScreenManager kivy.uix.screenmanager.ScreenManager #: import Screen kivy.uix.screenmanager.ScreenManager #: import SettingsScreen screen ScreenManager: MenuScreen: SettingsScreen: <MenuScreen>: name: 'MenuScreen' BoxLayout: Button: text: 'Goto nn' on_press: root.manager.current = 'SettingsScreen' root.change_text() <SettingsScreen>: name: 'SettingsScreen' label_id: label_field BoxLayout: Label: id: label_field

Kivy - Screen Manager - Accessing attribute in other class

扶醉桌前 提交于 2019-12-01 02:50:56
问题 Using the Kivy Screen Manager, I create two Screens. Whilst being in screen 1, i want to change a label in screen two. I highlight the problematic area in my code: my test.ky: #: import ScreenManager kivy.uix.screenmanager.ScreenManager #: import Screen kivy.uix.screenmanager.ScreenManager #: import SettingsScreen screen ScreenManager: MenuScreen: SettingsScreen: <MenuScreen>: name: 'MenuScreen' BoxLayout: Button: text: 'Goto nn' on_press: root.manager.current = 'SettingsScreen' root.change

Drawable folders for high resolution handhelds

自闭症网瘾萝莉.ら 提交于 2019-11-29 10:57:20
I can't figure out how to produce drawables for the new "high-res" handhelds like the Galaxy Nexus, One X, Galaxy S3 etc that have a resolution of 1280x720 or higher. I always try to make as few layout-versions as possible. Preferably just one but at times a layout-long and notlong is necessary. And make the xml smart enough to handle all devices. But that's only possible if the drawable resources are there to supply all the different resolutions and sizes. All has been nice and smooth until the new big phones arrived and I find that the drawables are to small for them. No xxhdpi-folder yet