mobile 相关问题

标签Mobile应用于标记有关移动计算问题的问题。移动计算是人机交互的一种形式,通过该形式,计算机在正常使用期间被运输。例如智能手机和平板电脑。

Appium 找不到分成两行的文本

祝你有美好的一天。 我在 appium 中搜索文本时遇到问题,问题是我正在使用以下 xpath 搜索文本“发送礼物” //*[@text = '送礼物'] 但是凯特...

回答 1 投票 0

我可以使用 php、html、javascript 构建 android/iphone 应用程序并注入为 iframe 并访问位置吗?

我想构建一个简单的应用程序。我只知道php,mysql,html,javascript。我将聘请某人来构建应用程序包装器,我将在其中插入 iframe。可以构建应用程序,然后只包含...

回答 1 投票 0

我在 Flutter 上使用 ListView.Builder 时遇到问题

我想在列表中再添加一项。我知道该项目会进入列表,但它不会在第一个屏幕上给我预览。 导入“包:flutter/material.dart”; void main() => 运行...

回答 1 投票 0

我如何在 WatchOS 上使用 SwiftUI 创建类似 Whatsapp 存档按钮生成动画的动画?

列表{ //我希望当用户滚动到顶部时出现此按钮 按钮(操作:{},标签:{ 文本(“存档”) }) ...

回答 1 投票 0

KeyboardAvoidingView 使 Flexbox 变得混乱

我有以下代码: 返回 ( 我有以下代码: return ( <KeyboardAvoidingView style={{ flex: 1 }} behavior="padding" enabled> <View style={style.flex1}> <View style={style.imageContainer}> <Image style={style.image} source={require("../../assets/pictures/LoginBackground.png")} resizeMode="cover" /> <View style={style.blackOpacity} /> </View> <View style={style.contentContainer}> <View style={style.flex1}> <Text style={style.welcomeHeader}>{Strings.Welcome}</Text> </View> <View style={style.fieldsContainer}> <LoginInput placeholder={Strings.MailPlaceholder} keyboardType={"email-address"} onChangeText={setEmail} styles={style.itemContainer} /> <LoginInput placeholder={Strings.PasswordPlaceholder} secureTextEntry={true} onChangeText={setPassword} styles={style.itemContainer} /> <TouchableOpacity disabled={isLoginFormEmpty()} style={ isLoginFormEmpty() ? [style.loginBtn, style.itemContainer, style.disabled] : [style.loginBtn, style.itemContainer] } onPress={() => submitLogin()} > <Text style={style.loginBtnText}>{Strings.LoginBtn}</Text> </TouchableOpacity> </View> </View> </View> </KeyboardAvoidingView> 具有以下样式: const style = StyleSheet.create({ flex1: { flex: 1, }, imageContainer: { flex: 1, }, image: { width: "100%", height: "100%", }, blackOpacity: { ...StyleSheet.absoluteFillObject, backgroundColor: "black", opacity: 0.6, }, contentContainer: { flex: 2, backgroundColor: Colors.opacityBlack, alignItems: "center", }, welcomeHeader: { fontFamily: getFontFamily("Heebo", "600"), textAlign: "right", fontSize: scaleFontSize(40), marginTop: verticalScale(10), color: Colors.white, }, fieldsContainer: { flex: 5, alignItems: "center", flexDirection: "column", justifyContent: "space-between", }, loginBtn: { justifyContent: "center", backgroundColor: Colors.submitPurple, marginBottom: verticalScale(120), }, disabled: { opacity: 0.5, }, loginBtnText: { fontFamily: getFontFamily("Heebo", "500"), fontSize: scaleFontSize(20), textAlign: "center", color: Colors.black, }, itemContainer: { width: horizontalScale(250), height: verticalScale(40), borderRadius: horizontalScale(20), }, }); 当键盘关闭时,一切看起来都正常: 但是当我打开键盘时,它会使所有输入更接近,并且不会保留每个元素之间的空格: 即使键盘打开,如何保持元素之间的间距? 我尝试更改行为以将 KeyboardAvoidingView 放置或放置在主视图内,但它不起作用。 还尝试将所有内容放入 ScrollView 中,但它破坏了整个屏幕。 最后,我找到了一个有效的解决方案: 那个代码 return ( <KeyboardAvoidingView behavior={Platform.OS === "ios" ? "padding" : "height"} style={{ flex: 1 }} > <View style={style.flex1}> <View style={style.flex1}> <Image style={style.image} source={require("../../assets/pictures/LoginBackground.png")} resizeMode="cover" /> <View style={style.blackOpacity} /> </View> <View style={style.contentContainer}> <Text style={style.welcomeHeader}>{Strings.Welcome}</Text> <TextInput placeholder={Strings.MailPlaceholder} placeholderTextColor={Colors.white} style={[style.input, style.itemContainer]} value={email} onChangeText={setEmail} onSubmitEditing={focusPassword} returnKeyType="next" keyboardType={"email-address"} /> <TextInput placeholder={Strings.PasswordPlaceholder} placeholderTextColor={Colors.white} style={[style.input, style.itemContainer]} value={password} onChangeText={setPassword} onSubmitEditing={submitLogin} returnKeyType="done" secureTextEntry={true} ref={passwordRef} /> <TouchableOpacity disabled={!isFieldsFilled} style={ isFieldsFilled ? [style.loginBtn, style.itemContainer] : [style.loginBtn, style.itemContainer, style.disabled] } onPress={() => submitLogin()} > <Text style={style.loginBtnText}>{Strings.LoginBtn}</Text> </TouchableOpacity> </View> </View> </KeyboardAvoidingView> ); 那种风格: const style = StyleSheet.create({ flex1: { flex: 1, }, image: { width: "100%", height: "100%", }, blackOpacity: { ...StyleSheet.absoluteFillObject, backgroundColor: "black", opacity: 0.6, }, contentContainer: { flex: 2, backgroundColor: Colors.opacityBlack, alignItems: "center", paddingBottom: 30, }, welcomeHeader: { fontFamily: getFontFamily("Heebo", "600"), textAlign: "right", fontSize: scaleFontSize(40), marginTop: verticalScale(10), color: Colors.white, }, loginBtn: { justifyContent: "center", backgroundColor: Colors.submitPurple, }, disabled: { opacity: 0.5, }, loginBtnText: { fontFamily: getFontFamily("Heebo", "500"), fontSize: scaleFontSize(20), textAlign: "center", color: Colors.black, }, itemContainer: { width: horizontalScale(250), height: verticalScale(40), borderRadius: horizontalScale(20), marginVertical: verticalScale(20), }, input: { textAlign: "right", fontFamily: getFontFamily("Heebo", "400"), fontSize: scaleFontSize(16), color: Colors.white, paddingVertical: verticalScale(15), paddingHorizontal: horizontalScale(20), borderWidth: 1, borderColor: Colors.opacityGray, }, }); 屏幕看起来相同,但键盘的行为现在工作得很好。

回答 1 投票 0

移动模式下菜单链接没有响应

我从提供商处购买了 HTML5 响应式网站模板。 我将模板部署到我们的服务器来测试模板。 在桌面模式下一切正常,但在移动模式下,菜单链接不...

回答 2 投票 0

(IOS) 如何在flutter中获取设备电话号码

以安卓为例, 我们可以通过执行下面的代码来获取设备电话号码 _mobileNumber = (等待MobileNumber.mobileNumber)!; 但在 IOS 中我们无法通过这样做获取电话号码, 如何获得

回答 1 投票 0

在移动视图上使 UI 适合 dart 中的屏幕

我正在建立一个注册。我构建了该页面,这里是一个示例代码块: 类 RegistrationPage 扩展 StatelessWidget { @覆盖 小部件构建(BuildContext上下文){ 重新...

回答 1 投票 0

如何让stepCounter在后台工作

我正在开发一个包含计步器的 Android 应用程序。目前,步数计数器功能仅在应用程序位于前台时才处于活动状态,但我想将其更改为在后台工作...

回答 1 投票 0

视口变化时如何对计算的位置/容器高度进行动画处理?

我的布局将按钮粘在屏幕底部。目前它是使用 Flexbox 完成的(内容是 Flex 1,按钮具有固定高度)。 问题出在手机浏览器上,我用过dvh...

回答 1 投票 0

Flutter 真机渲染问题

我正在使用flutter开发移动应用程序。我已经这样做了好几年了,所以我的环境还可以。但就像一周前,我尝试构建另一个应用程序,当我发送它时......

回答 1 投票 0

Flutter - Linux环境下TextField无法输入韩语

@覆盖 无效初始化状态(){ // TODO: 实现 initState super.initState(); _check = TextEditingController(文本: widget.check); _action = TextEditingController(文本: widget.actio...

回答 1 投票 0

使元素不可点击(点击其后面的东西)

我有一个固定图像,当用户滚动触摸屏(移动设备)时,该图像会覆盖页面。 我想让该图像“不可点击”或“非活动”或其他什么,这样如果用户...

回答 4 投票 0

无法在 Google Play Console 上上传 Integrity Api 的 public.pem 文件

按照“应用程序完整性部分/更改响应的加密和解密方式”中的说明创建和上传 public.pem 文件后,我收到以下错误消息: 不能

回答 3 投票 0

Flutter 应用程序在 apk 发布模式下无法运行

我目前正在构建的 Flutter 应用程序在模拟器上的调试模式下完美运行,但是当我创建 apk 并将其安装在我的真实手机上时,它无法按预期运行。 我想它可能有...

回答 1 投票 0

Katalon Studio:在移动 Android 模拟器上运行测试用例出现错误消息:找不到可以自动化 Chrome ‘113.0.5672’的 Chromedriver

我使用的是Windows 10,katalon studio 9.3.0 Build 212。 运行 Android 移动测试用例时出现错误消息“未发现可以自动执行 Chrome ‘113.0.5672’ 的 Chromedriver。”出现。 我添加了新的

回答 1 投票 0

如何“禁用”移动网页上的缩放?

我正在创建一个移动网页,它基本上是一个带有多个文本输入的大表单。 然而(至少在我的 Android 手机上),每次我点击某个输入时,整个页面都会放大,obsc...

回答 15 投票 0

桌面版和移动版 Chrome 之间奇怪的 CSS 垂直文本问题

我有一个 元素,我想将其中包含的文本垂直居中。它在桌面版 Chrome 上看起来正确,但在移动 (iOS) Chrome 上则不然。我将非常感谢任何对...的见解 我有一个 <h2> 元素,我想将其中包含的文本垂直居中。它在桌面版 Chrome 上看起来正确,但在移动 (iOS) Chrome 上则不然。我将非常感谢对这个问题的任何见解。下面找到两个屏幕截图的链接(首先是桌面,其次是移动设备): 下面包含 HTML 和 CSS 代码。为了便于阅读,我缩写了 HTML 代码。非常感谢,互联网! HTML: ... <body id="home"> <div id="main"> <div id="header"> ... </div> <div id="content"> <img src="i/splash.jpg" alt="" id="splash" /> <div id="inner"> <h2>hi!</h2> <p>Lorem ipsum...</p> </div> </div> <div id="clear"></div> <div id="footer"> <p>...</p> </div> </div> </body> ... CSS: /* CSS RESET */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; } article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, div, ul#nav, ul#nav li, ul#nav li a, img#splash { display: block; } body { line-height: 1; background: url('i/bg.jpg') fixed repeat; } ol, ul { list-style: none; } blockquote, q { quotes: none; } blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; } table { border-collapse: collapse; border-spacing: 0; } /* WALBAUM WEBFONT */ @font-face { font-family: Walbaum; src: url('f/WalbaumMTStd-Regular.otf'); } @font-face { font-family: Walbaum; font-weight: bold; src: url('f/WalbaumMTStd-Medium.otf'); } @font-face { font-family: Walbaum; font-weight: bold; font-style: italic; src: url('f/WalbaumMTStd-MediumIt.otf'); } @font-face { font-family: Walbaum; font-style: italic; src: url('f/WalbaumMTStd-Italic.otf'); } /* MAIN */ #main { margin: 10px auto 0 auto; max-width: 900px; overflow: hidden; } /* HEADER */ #header { width: 100%; margin-bottom: -10px; } #logo { float: none; width: 358px; margin: 0 auto 0 auto; } #logo a, #logo img { width: 100%; } #subtitle { text-align: center; font-size: 14px; color: #3f3f3f; font-family: Georgia, serif; width: 100%; margin-top: -8px; } #subtitle strong { font-weight: bold; color: #982020; } ul#nav { font-family: Walbaum, Georgia, serif; font-size: 24px; height: 100%; text-transform: uppercase; text-align: justify; padding: 0 10px 0 10px; } ul#nav li a { width: 100%; height: 100%; text-decoration: none; } ul#nav li { display: inline-block; height: 100%; padding: 42px 2px 18px 2px; margin: 0 7px 0 7px; } ul#nav:after { content: ''; width: 100%; display: inline-block; } ul#nav li#music a { color: #d86619; } ul#nav li#photos a { color: #1787ac; } ul#nav li#code a { color: #17ac3a; } ul#nav li#about a { color: #a317ac; } ul#nav li a:hover { text-decoration: underline; } /* CONTENT */ #content { width: 100%; margin: 0 auto 10px auto; } #content img#splash { width: 100%; padding: 5px; border: 1px solid #191919; background-color: rgba(25,25,25,0.3); margin: 0 auto 0 -6px; } #content #inner { width: 100%; } #content #inner h2 { width: 100%; font-style: italic; color: #999999; text-align: center; font-family: Walbaum, Georgia, serif; font-size: 40px; border-top: 1px dashed #333333; border-bottom: 1px dashed #333333; background-color: rgba(75,75,75,0.1); margin: 0 auto 10px -6px; text-shadow: 0.08em 0.08em 0.05em #090909; padding: 0 6px 0 6px; height: 32px; line-height: 32px; } #content #inner p { font-family: Georgia, serif; text-align: justify; color: #666666; font-size: 14px; margin-bottom: 14px; } /* FOOTER */ #clear { clear: both; } #footer { width: 100%; text-align: center; margin: 20px auto 20px auto; } /* RESPONSIVENESS */ @media screen and (min-width: 801px) { #logo { margin-right: 10px; float: left; } #main { padding: 0 10px 0 10px; } #content img#splash { max-width: 75%; float: left; margin: 0; } #content #inner { width: 22.5%; float: right; margin: 0; } } @media screen and (max-width: 800px) and (min-width: 521px) { #main { max-width: 95%; } #content #inner { margin-top: 10px; } } @media screen and (max-width: 520px) and (min-width: 359px) { ul#nav { padding: 0 10px 0 10px; } ul#nav li { margin: 0; } #main { max-width: 100%; } #content { width: 95%; } #content #inner { margin-top: 5px; } } @media screen and (max-width: 358px) { #logo { width: 100%; } ul#nav { padding: 20px 5px 0 5px; font-size: 20px; } ul#nav li { margin: 0; padding: 0 2px 0 2px; } #main { max-width: 100%; } #content { width: 95%; } #content #inner { margin-top: 5px; } } @media screen and (max-width: 300px) { ul#nav { padding: 10px 5px 0 5px; } ul#nav li { width: 45%; margin: 0; padding: 0; text-align: center; } #subtitle { font-size: 10px; } } 我认为,这里的问题是,移动浏览器会调整您的font-size的大小。这不是一个好的做法,但你可以通过使用来避免这种情况: html { -moz-text-size-adjust: none; -ms-text-size-adjust: none; -webkit-text-size-adjust: none; text-size-adjust: none; } 我已经检查了多个浏览器(网络/移动)。对我来说一切都很好。 但是,您可能会遇到 3 个问题 - 1)字体问题 2) 如果不是流体布局,移动网络调整大小会出现问题。 3)缓存设置 使用 em 调整字体大小 - 这将针对不同的窗口大小进行适当调整: #inner h2 { font-size: 1em }

回答 3 投票 0

尝试为 Flutter Widget 实现动画,但不起作用

我试图在屏幕上显示后立即将小部件动画到其正常位置并平滑滑动,但是,在实现下面的代码后,它不起作用,尝试了多次...

回答 1 投票 0

如何使用 Mobile Safari 中的链接使用 Twitter 应用程序打开用户的 Twitter 个人资料?

看起来 Twitter 注册了 twitter:// 的 URI 方案,但是在使用它之后我无法让它直接打开用户的个人资料。我试过了: Twitter用户名 推特://用户/用户...

回答 4 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.