草庐IT

textAppearance

全部标签

android - Android中TextView的TextAppearance属性

我正在开发android应用程序,我正在使用TextView在屏幕上显示文本。我正在为TextView使用此属性来设置文本android:textAppearance="?android:attr/textAppearanceMedium"的大小。我是否还需要设置该文本的大小,或者它由Android操作系统自动管理?提前致谢。 最佳答案 是的,调整大小是在后台自动完成的。在使用像android:textAppearance这样的属性时,它直接使用textSize的预定义特定sp值:android:textAppearance="?a

android - textAppearance 属性中的资源 ID 不能为空字符串(在 'text' 处,值为 '?')

我的布局中有以下两个textView:第一个没有任何错误,但是第二个android:textAppearance="?android:attr/textAppearanceLarge"产生了以下错误:error:Error:Resourceidcannotbeanemptystring(at'text'withvalue'?').我在其他布局中也有其他TextViews,它们具有相同的textAppearance值,并且那里没有错误。有没有一种无需手动重新创建样式即可解决此问题的方法? 最佳答案 你要逃?如下编码android:te

android - React Native : error: resource android:style/TextAppearance. Material.Widget.Button.Borderless.Colored 未找到

我正在尝试为我的ReactNativeAndroid项目获取Facebook登录,当我尝试使用react-nativerun-android构建它时,我收到了这个错误。一开始我以为是我的Gradle版本有问题,因为ReactNative是安装了Gradle2.14,后来我升级到了Gradle4.4。我多次返回Facebook安装指南,但仍然收到此错误。我还三次检查了我的代码,以确保我没有使用任何错误的字体/fontWeight/fontStyle。我唯一能想到的是来自标准组件的Facebook按钮有不受支持的样式吗?我不确定。如有任何帮助,我们将不胜感激。我做这件事的时间比我想承认的要

android - 未找到输出 : error: resource style/TextAppearance. Compat.Notification.Info(又名 package_name :style/TextAppearance. Compat.Notification.Info)

切换到AndroidStudio3.2canary后,我收到以下构建错误。我看过this发布这个人有类似问题但没有提到解决方案的地方。我想尝试新的Material组件和喷气背包,所以有没有可能我不必切换回去。com.android.builder.internal.aapt.v2.Aapt2Exception:AndroidresourcelinkingfailedOutput:error:resourcestyle/TextAppearance.Compat.Notification.Info(akacom.nsnik.nrs.kotlintest.debug:style/TextA

android - 找不到错误 :resource style/TextAppearance. Compat.Notification.Info(又名 {packageId}.test :style/TextAppearance. Compat.Notification.Info)

我刚刚将build.gradle编译SDK更新为27API。compileSdkVersion27buildToolsVersion'27.0.3'targetSdkVersion27但是一旦我点击同步按钮它就​​会抛出error:resourcestyle/TextAppearance.Compat.Notification.Info(aka{packageId}.test:style/TextAppearance.Compat.Notification.Info)notfound.error:resourcestyle/TextAppearance.Compat.Notificat

android - 检索项目 : No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored' 的父项时出错

今天,我遇到了这篇文章中提到的错误:Errorretrievingparentforitem:Noresourcefoundthatmatchesthegivenname'android:TextAppearance.Material.Widget.Button.Borderless.Colored'有趣的是(也是不同之处)——我们的应用程序已经投入生产5个月,到目前为止我们已经制作了数百个版本和APK。我们一周没有更改任何一行代码(也没有更改任何库版本)并且构建突然停止工作并出现这个提到的错误。Executionfailedfortask':react-native-fbsdk:pr

android - 在android中以编程方式设置TextView TextAppearance

我将实现一个LinearLayout,其中输入字段是根据数据库表的字段数以编程方式生成的。不幸的是,当我尝试在TextView中将textApperance属性设置为textApperanceLarge时,它不起作用。下面是我的代码...for(inti=0;i 最佳答案 这样使用。它会起作用的。textView.setTextAppearance(this,android.R.style.TextAppearance_Large);或者,从API23开始,您不需要传递上下文。因此,您可以简单地调用:textView.setText

android - 在android中以编程方式设置TextView TextAppearance

我将实现一个LinearLayout,其中输入字段是根据数据库表的字段数以编程方式生成的。不幸的是,当我尝试在TextView中将textApperance属性设置为textApperanceLarge时,它不起作用。下面是我的代码...for(inti=0;i 最佳答案 这样使用。它会起作用的。textView.setTextAppearance(this,android.R.style.TextAppearance_Large);或者,从API23开始,您不需要传递上下文。因此,您可以简单地调用:textView.setText

android - 如何更改 CollapsingToolbarLayout 字体和大小?

我想更改CollapsingToolbarLayout字体大小及其字体。我怎样才能做到这一点? 最佳答案 更新在深入研究代码之前,让我们首先确定CollapsingToolbarLayout的textSize。Google发布了一个名为material.io的网站,该网站还解释了如何处理Typography的最佳方法.文章提到了“标题”类别,它还解释了在sp中使用的推荐字体大小。虽然文章没有提到推荐的CollapsingToolbarLayout的expanded尺寸,但是库com.android.support:design提供了

android - 如何更改 CollapsingToolbarLayout 字体和大小?

我想更改CollapsingToolbarLayout字体大小及其字体。我怎样才能做到这一点? 最佳答案 更新在深入研究代码之前,让我们首先确定CollapsingToolbarLayout的textSize。Google发布了一个名为material.io的网站,该网站还解释了如何处理Typography的最佳方法.文章提到了“标题”类别,它还解释了在sp中使用的推荐字体大小。虽然文章没有提到推荐的CollapsingToolbarLayout的expanded尺寸,但是库com.android.support:design提供了