material-design 相关问题

材料设计是Google针对Android 5.0 Lollipop引入的跨平台和设备的视觉,动作和交互设计指南。

一些材质图标不适用于 Angular Material

我正在尝试使用保留材质图标,但它不起作用。 当我使用以下 HTML 时,我可以看到前两个图标,但看不到保留的图标。我注意到其他图标也有这个问题,...

回答 1 投票 0

为什么 MaterialAutoCompleteTextView 的渲染方式与 TextInputEditText 不同?

我在 TextInputLayout 中有一个 TextInputEditText 和一个 MaterialAutoCompleteTextView : 我在 TextInputLayout 中有一个 TextInputEditText 和一个 MaterialAutoCompleteTextView: <com.google.android.material.textfield.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/name"> <com.google.android.material.textfield.TextInputEditText android:id="@+id/name" android:layout_width="match_parent" android:layout_height="wrap_content" /> </com.google.android.material.textfield.TextInputLayout> <com.google.android.material.textfield.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/category"> <com.google.android.material.textfield.MaterialAutoCompleteTextView android:id="@+id/category1" android:layout_width="match_parent" android:layout_height="wrap_content" /> </com.google.android.material.textfield.TextInputLayout> 除了标签不同之外,它们是相同的。然而,这就是它的样子: MaterialAutoCompleteTextView 中的字体较大,并且没有内边距。 是否有明显的原因导致其呈现不同? 有没有一种简单的方法可以使它看起来像 TextInputEditText (因此,无需摆弄)? 您可以自定义 MaterialAutoCompleteTextView,使其看起来与 TextInputEditText 类似。 > MaterialAutoCompleteTextView extends AppCompatAutoCompleteTextView extends AutoCompleteTextView extends EditText 请从这里检查源代码。 因此 EditText 的所有属性和自定义都适用于 MaterialAutoCompleteTextView . 接下来通过覆盖字体大小和填充属性来自定义样式以匹配TextInputEditText。 检查以下步骤: 1.样式.xml: <style name="CustomAutoCompleteTextViewStyle" parent="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"> <item name="android:textSize">@dimen/text_size_normal</item> <item name="android:padding">@dimen/default_padding_small</item> </style> 2. dimen.xml: 在您的 dimen.xml 文件中为该资源定义。 <dimen name="default_padding_small">8dp</dimen> 3.更新了MaterialAutoCompleteTextView: <com.google.android.material.textfield.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/category"> <androidx.appcompat.widget.MaterialAutoCompleteTextView android:id="@+id/category1" android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/CustomAutoCompleteTextViewStyle" /> </com.google.android.material.textfield.TextInputLayout>

回答 1 投票 0

当我将 fabAlignmentMode 添加到中心时,摇篮 fabAnchorMode 不起作用

我想把这个FAB放在BottomAppBar的中心 前中心 但是当我添加 app:fabAlignmentMode="center" 时,FAB 转到中心,并且 app:fabAnchorMode="cradle&q...

回答 1 投票 0

Android/Kotlin Material Button Group 默认选择

我在片段布局中有一个材质按钮切换组(需要单选和选择),但在加载我的应用程序时,我希望已经选择其中一个按钮。我想添加...

回答 1 投票 0

在vue3中修改vuetify主题时出错

我有一个错误,或者如果你可以称之为我想更改 vuetify 主题的主要和次要颜色,我在 vuetify.js 文件中执行此操作,如下所示。 // 样式 导入'@mdi/font/css/

回答 1 投票 0

如何在Android中剪切(删除或隐藏或缩小)Material dateRangePicker(Dialog)的header_title?

我想删除顶部的空间 我的风格主题(stackOverFlow 的用户回答在这里) 我的代码 有趣的 clickDatePicker() { setTheme(R.style.AppTheme_MaterailComponent) val local = 区域设置...

回答 3 投票 0

Android 底部导航视图占用太多高度

我没有使用任何样式/主题或任何复杂的自定义,但底部导航视图占据了意想不到的高度, 我使用 wrap_content 作为高度,因此得到以下输出: 我没有使用任何样式/主题或任何复杂的自定义,但底部导航视图正在采取意外的高度, 我使用 wrap_content 作为高度,因此得到以下输出: <com.google.android.material.bottomnavigation.BottomNavigationView android:id="@+id/bottom_nav" android:layout_width="match_parent" **android:layout_height="wrap_content"** app:labelVisibilityMode="selected" app:menu="@menu/bottom_nav_menu" /> 当使用固定高度时,即?attr/actionbarsize我得到以下输出(所有图标/标签折叠): 代码: <com.google.android.material.bottomnavigation.BottomNavigationView android:id="@+id/bottom_nav" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" app:labelVisibilityMode="selected" app:menu="@menu/bottom_nav_menu" /> 布局完整代码: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/main" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context=".AppInstalledCheckActivity" android:background="#FFEB3B"> <EditText android:id="@+id/edittextPackageName" android:layout_width="match_parent" android:layout_height="60dp" android:hint="Enter Package Name" /> <Button android:id="@+id/buttonCheckInstalled" android:layout_width="match_parent" android:layout_height="45dp" android:text="Enter Package Name" /> <androidx.fragment.app.FragmentContainerView android:id="@+id/nav_host_fragment" android:name="androidx.navigation.fragment.NavHostFragment" android:layout_width="match_parent" android:layout_height="400dp" app:navGraph="@navigation/navgraph" /> <com.google.android.material.bottomnavigation.BottomNavigationView android:id="@+id/bottom_nav" android:layout_width="match_parent" android:layout_height="wrap_content" app:labelVisibilityMode="selected" app:menu="@menu/bottom_nav_menu" /> </LinearLayout> 我希望它与工具/操作栏具有相同或相似的高度。 你需要改变 <androidx.fragment.app.FragmentContainerView android:id="@+id/nav_host_fragment" android:name="androidx.navigation.fragment.NavHostFragment" android:layout_width="match_parent" **android:layout_height="400dp"** app:navGraph="@navigation/navgraph" /> 到 **android:layout_height="match_parent"**

回答 1 投票 0

升级到flutter 3.22后旧库的样式问题

我想升级flutter版本到3.22 有什么技巧可以轻松做到这一点吗?无需升级所有库 Flutter 3.22 为 Material Design 系统带来了重大更新和修复,增强了...

回答 1 投票 0

Angular Material 3 主题不包括所有样式,如立面或颜色

截至今天,我一直在使用最新 Angular 18.0.0 版本中的新 Angular Material 3 设计风格。已尝试遵循此处的文档。以下是我到目前为止所做的事情。 ...

回答 1 投票 0

如何在reactjs中使用material ui在页面上导航

我正在使用material-Ui为我的仪表板制作一个抽屉,我在页面上导航时遇到了问题 首先,我想分享我的应用程序。 js 这里我有产品路线 <

回答 2 投票 0

错误:IllegalArgumentException:此组件上的样式要求您的应用程序主题为 Theme.MaterialComponents

以下是我的依赖项 实现 'com.google.android.material:material:1.0.0' 实现 'androidx.appcompat:appcompat:1.0.2' 实现 'androidx.constraintlayout:constraintlayout...

回答 14 投票 0

我的 Angular 项目使用的是哪个 Material Design 版本?

自从最近发布了 Material Design 3 以来,Angular Material 正在努力尝试切换到它。 问题是我想继续使用 Material Design 2,因为大多数按钮都有问题...

回答 1 投票 0

Angular 材质基于哪个材质版本(v2 或 v3)?

Angular Material 基于材料设计规范。 哪个 Angular 材质版本属于哪个材质设计规范版本(v1、v2、v3)? 角度材质版本 材质

回答 1 投票 0

如何更改 Angular Material 17 中 MatButtonToggleGroup 的边框半径

是否可以覆盖MatButtonToggleGroup的默认样式? 如何更改 MatButtonToggleGroup 的边框半径和背景颜色?

回答 1 投票 0

如何在flutter中创建一组共享的自定义颜色名称?

我正在使用 Flutter 3.22,多年来我第一次开始创建我的个人可重用小部件和实用程序库。 一切都很顺利,除了一件事我不明白......

回答 1 投票 0

导航图标太大 - 如何调整其大小

我在工具栏上添加了google的材质菜单图标作为通知图标,它显得太大了。我该如何调整它的大小,或者我做错了? 爪哇: @覆盖 protected void onCreate(捆绑

回答 3 投票 0

将设计从 Figma 导入到 Android Studio

我正在尝试使用 Relay 将我的 Figma 设计传递到 Android Studio。 当我复制 Figma 链接时,出现此错误“https://www.figma.com/design/dZtxaZ77cboSxhS2DyLwSV/APP?node-id=0%3A1&t=

回答 1 投票 0

Compose:如何实现 ime 填充和 Scaffold 边到边填充,windowSoftInputMode 为 adjustmentResize

androidx.compose.material3.Scaffold 填充错误地添加了导航栏填充,即使打开软键盘时也会添加 IME 填充,导致导航栏填充量增加一倍...

回答 3 投票 0

从材质主题生成 PWA 中清单的背景和主题颜色

有没有办法从 Material UI 3 主题为 PWA 清单生成颜色?我有灯光模式主要颜色和主要容器颜色,所以我可以只使用它们。我担心如果用户更改为黑暗...

回答 1 投票 0

React Native iOS 无法识别的字体系列“Material Design Icons”

我正在使用 React Native 构建一个移动应用程序。当前的应用程序在 Android 上运行良好,但在 iOS 上崩溃。 这是给出的错误: 这些是我正在使用的依赖项: “依赖...

回答 2 投票 0

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