screen-size 相关问题

屏幕的大小通常用对角线的长度来描述,对角线的长度是对角线之间的距离。

TextInput 在小屏幕手机上显示太窄

在以下 xml 中,“message_entry”在小屏幕 (240 x 320) 上显示太窄,但在较大屏幕 (480 x 640) 上显示良好。 在以下 xml 中,“message_entry”在小屏幕 (240 x 320) 上显示太窄,但在较大屏幕 (480 x 640) 上显示良好。 <androidx.cardview.widget.CardView android:id="@+id/reply_bar_card" android:layout_width="match_parent" android:layout_height="wrap_content" app:cardBackgroundColor="@color/replyBarCard" app:cardCornerRadius="24dp" app:cardElevation="5dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:paddingBottom="24dp"> <ProgressBar android:id="@+id/send_progress" style="@style/Widget.AppCompat.ProgressBar.Horizontal" android:layout_width="match_parent" android:layout_height="3dp" android:indeterminate="true" android:visibility="invisible" /> <HorizontalScrollView android:id="@+id/attached_image_scroller" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="@dimen/message_list_padding" android:layout_marginEnd="@dimen/message_list_padding" android:paddingTop="8dp" android:paddingBottom="8dp" android:scrollbars="none" android:visibility="gone"> <LinearLayout android:id="@+id/attached_image_holder" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="12dp" android:layout_marginEnd="12dp" android:orientation="horizontal" /> </HorizontalScrollView> <LinearLayout android:id="@+id/smart_reply_container" android:layout_width="match_parent" android:layout_height="56dp" android:layout_marginStart="@dimen/message_list_padding" android:layout_marginEnd="@dimen/message_list_padding" android:gravity="end" android:orientation="horizontal" android:visibility="gone"> <ImageButton android:id="@+id/close_smart_replies" android:layout_width="32dp" android:layout_height="48dp" android:layout_gravity="center_vertical" android:layout_marginStart="8dp" android:background="?selectableItemBackgroundBorderless" android:clickable="true" android:contentDescription="@string/use_smart_replies" android:src="@drawable/ic_cancel" android:tint="@color/secondaryText" /> <LinearLayout android:id="@+id/smart_reply_suggestions_container" android:layout_width="0dp" android:layout_height="match_parent" android:layout_marginEnd="12dp" android:layout_weight="1" android:gravity="end" android:orientation="horizontal" /> </LinearLayout> <LinearLayout android:id="@+id/send_bar" android:layout_width="match_parent" android:layout_height="50dp" android:layout_marginStart="@dimen/message_list_padding" android:layout_marginEnd="@dimen/message_list_padding" android:alpha="0" android:clipToPadding="false" android:gravity="center_vertical|start" android:orientation="horizontal" android:padding="8dp" android:translationY="-32dp"> <ImageButton android:id="@+id/select_sim" android:layout_width="32dp" android:layout_height="48dp" android:background="?selectableItemBackgroundBorderless" android:clickable="true" android:contentDescription="@string/select_sim" android:src="@drawable/ic_sim" android:tint="@color/secondaryText" android:visibility="gone" /> <ImageButton android:id="@+id/view_scheduled_messages" android:layout_width="32dp" android:layout_height="match_parent" android:background="?selectableItemBackgroundBorderless" android:clickable="true" android:contentDescription="@string/view_scheduled_messages" android:src="@drawable/ic_schedule_small" android:tint="@color/secondaryText" android:visibility="gone" /> <FrameLayout android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_marginEnd="8dp"> <ImageButton android:id="@+id/attach" android:layout_width="32dp" android:layout_height="48dp" android:layout_gravity="center_vertical|start" android:background="?selectableItemBackgroundBorderless" android:clickable="true" android:contentDescription="@string/attach" android:src="@drawable/ic_attach" android:tint="@color/secondaryText" /> <TextView android:id="@+id/text_counter" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom|center_horizontal" android:layout_marginBottom="2dp" android:gravity="center_horizontal" android:textColor="@color/secondaryText" android:textSize="12sp" /> </FrameLayout> <com.google.android.material.textfield.TextInputEditText android:id="@+id/message_entry" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@null" android:backgroundTint="@color/drawerBackground" android:hint="@string/type_message_to" android:imeOptions="actionSend|flagNoExtractUi" android:inputType="textCapSentences|textAutoCorrect|textMultiLine" android:maxLines="@integer/message_list_fragment_line_entry_count" android:minHeight="40dp" android:padding="8dp" android:paddingStart="8dp" android:paddingEnd="18dp" android:scrollHorizontally="false" android:textSize="16sp" /> <com.google.android.material.floatingactionbutton.FloatingActionButton android:id="@+id/send" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="8dp" android:layout_marginEnd="8dp" android:contentDescription="@string/send_message" android:src="@drawable/ic_send" app:elevation="0dp" app:fabSize="mini" app:rippleColor="@android:color/white" /> </LinearLayout> <ViewStub android:id="@+id/attach_stub" android:layout_width="match_parent" android:layout_height="@dimen/attach_menu_height" android:layout="@layout/view_attach_menu" /> </LinearLayout> </androidx.cardview.widget.CardView> 小屏幕:(添加红框用于说明) 大屏幕:(添加红框作为说明) 预期的行为就像大屏幕,其中“message_entry”尽可能宽。为什么“message_entry”在小屏幕上那么窄?我该如何解决它? 原来是因为dimens.xml文件夹下有多个res文件造成的。这用于支持多种屏幕尺寸,在较小屏幕的 dimens.xml 中,有 <dimen name="message_list_padding">96dp</dimen>。一旦更改为0dp,布局就如预期的那样。 有关多个 dimens.xml 文件的更多信息,请参阅此答案中的#2。

回答 1 投票 0

flutter中UI根据屏幕尺寸调整

我是一名 Android 开发人员,我正在学习 flutter,但在这里我正在解决一个常见但重要的问题。 在我下面的代码中,最后一些行被隐藏。这里我先把屏幕尺寸分成10份...

回答 1 投票 0

使用 Livewire 在 Statamic 中进行过滤

我是第一次使用Livewire。我有一个 Statamic Livewire 组件,它显示博客文章的集合,默认限制为 9 项。然而,我注意到在移动设备上(l...

回答 1 投票 0

Maui 屏幕尺寸标记插件如何调整样式文件中的边距元素

我目前正在使用这个优秀的插件 https://github.com/carolzbnbr/OnScreenSizeMarkup.Maui for Maui,它允许我将所有大小调整放在我的样式表中,这非常适合我的 A...

回答 1 投票 0

设置QT_AUTO_SCREEN_SCALE_FACTOR导致QTableWidget网格线和headerView边框线未对齐

示例: 文件:表.py # -*- 编码:utf-8 -*- # 通过读取 ui 文件“table.ui”生成表单实现 # # 创建者:PyQt5 UI 代码生成器 5.15.9 # # 警告:对

回答 1 投票 0

PowerApps - 屏幕尺寸问题

我创建了一个具有默认屏幕宽度和高度的 PowerApps 应用程序。但是当我发布它并播放应用程序时,我的应用程序没有采用浏览器的确切尺寸(宽度或高度)(

回答 1 投票 0

PowerApps 响应式布局

我们开发了一款非常适合网站的 PowerApps 应用程序。现在,我们正在寻求为移动设备创建类似的应用程序。而不是构建两个单独的 PowerApps 应用程序...

回答 1 投票 0

通过http标头检测Android手机或Android平板电脑

有没有办法检测用户是否从服务器端的 Android 平板电脑或手机访问您的网站? 我没有任何 Android 设备,所以我不可能测试什么...

回答 4 投票 0

在 React Native 中处理不同屏幕尺寸的正确方法,

因为,我使用屏幕尺寸为 6 英寸的物理设备开发了一个 React Native,它看起来很棒,然后当我用 5.5 进行测试时,它非常棒,因为仍然很少有组件得到扩展器!然后我...

回答 6 投票 0

iPhone 11 和 iPhone 12 对于相同的布局显示不同的结果

iPhone 11和iPhone 12的屏幕尺寸相同,均为6.1英寸。但这两款手机的布局似乎有所不同。 iPhone 12 似乎正在扩大一切。 我正在开发的应用程序有...

回答 1 投票 0

如何在Selenium中设置Chrome的窗口大小?

我正在使用 Selenium WebDriver 进行自动化,并且我正在使用 Chromedriver。 我注意到,当我的驱动程序运行并打开 chrome 浏览器时,它会以奇怪的大小打开浏览器。 我试图...

回答 17 投票 0

如何在C#中以窗口大小(1920、1080)运行无头Firefox?

如何在 C# 中以窗口大小(1920、1080)运行无头 Firefox? FirefoxOptions firefoxOptions = new FirefoxOptions(); firefoxOptions.AddArguments("--headless"); 火狐选项。

回答 4 投票 0

如何使画布完全适合p5中的窗口尺寸

我想让 p5 画布完全适合窗口大小,但是每当我使用 windowWidth 和 windowHeight 时,画布似乎更大: 有什么办法可以解决这个问题吗?

回答 2 投票 0

如何确定屏幕高度和宽度

我在 Flutter 上创建了一个新应用程序,在不同设备之间切换时遇到了屏幕尺寸问题。 我使用 Pixel 2XL 屏幕尺寸创建了该应用程序,因为...

回答 14 投票 0

不同的手机屏幕分辨率

我用的是小米的红米Note 9 Pro。我的手机屏幕分辨率是1080x2400。但是当我使用 Dart 和 Flutter 打印手机的高度和宽度时,我得到 393x857。 我正在努力寻找

回答 1 投票 0

< 600px

我做了一个有两栏的网站。 左栏包含图片 (30%),右栏包含文本 (70%)。 一切正常,但在分辨率低于 600 像素的屏幕上,左栏......

回答 1 投票 0

我在 React 上更改浏览器窗口大小时无法使徽标与导航栏成比例

如何调整导航栏上的徽标,以便在更改浏览器窗口大小时它仍然与导航栏上的所有其他元素成比例?我尝试在我的 css 上使用媒体查询,所以它

回答 0 投票 0

是否有通过 Python-turtle 导出更大的 Postscript 文件 (.eps) 的解决方法?

我是新来的。我们需要并感谢您的帮助。 我正在寻找一种在使用 Python-turtle 时导出矢量“图像”的方法。 我在 Stackoverflow 上找到了下一个“方法”,这很适合我……

回答 0 投票 0

Python p5250 库 - 以 27x132 屏幕尺寸打开 wc3270 连接

一般来说,我想用 Python 在 IBM i 模拟器中自动化我的工作。我使用 p5250 库,它使用 wc3270 连接到我的服务器。一切正常,直到我的主机需要将屏幕放大到

回答 0 投票 0

响应式屏幕抖动:如何设置 base_width?

应用程序和代码的图像我正在尝试响应屏幕尺寸颤动应用程序,但屏幕尺寸溢出。 我从一个 figma 设计中下载了函数 12 的代码,我做了一些 cha...

回答 0 投票 0

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