草庐IT

style-attribute

全部标签

android - Android API 指南对我来说有点不清楚 android :onClick XML attribute

在AndroidAPIGuidesforcheckboxes,他们声明您可以在布局的XML(android:onClick)中设置一个属性以启动指定的方法。theguideforButtons中也是如此。,但按钮指南也有这一点:YoucanalsodeclaretheclickeventhandlerpragmaticallyratherthaninanXMLlayout.ThismightbenecessaryifyouinstantiatetheButtonatruntimeoryouneedtodeclaretheclickbehaviorinaFragmentsubclass.

android - Android Studio 中的多个 styles.xml 文件

我最近将我的Android项目从eclipse导入到AndroidStudio。我有3个styles.xml文件:styles.xml、styles.xml(v11)和styles.xml(v14)。我不知道那是什么时候发生的。styles.xml(v11)包括:styles.xml(v14)包括:我想知道他们为什么在这里以及我是否可以删除v11和v14xml文件。 最佳答案 它们是什么?它们的工作方式与您原来的styles.xml相同,但它们具有资源限定符。这意味着它们只有在满足限定符时才会被使用-在这种情况下,当API版本为11

UITableView的style是UITableViewStyleGrouped

一般情况下,UITableViewStylePlain和UITableViewStyleGrouped是UITableView常用到的style,之前都是用到的时候,遇到问题直接用度娘,差不多就够用了,今天在修复UI提出的间隙问题,来回改,总觉得没有改到命点。下面是UI提出的要求: 我项目里的代码片段是这样的:self.tableView=[[UITableViewalloc]initWithFrame:(CGRectZero)style:(UITableViewStyleGrouped)];[self.viewaddSubview:self.tableView];[self.tableVie

android :background attribute using string color code 上的 android 数据绑定(bind)

我有一个颜色代码作为字符串存储在一个名为bean的数据对象中,如下所示:publicclassSpaceBeanextendsBaseObservable{privateStringselectedThemeColor;@Nullable@BindablepublicStringgetSelectedThemeColor(){returnselectedThemeColor;}publicvoidsetSelectedThemeColor(StringselectedThemeColor){this.selectedThemeColor=selectedThemeColor;notif

styles.xml 中的 Android Studio 3.0 自定义字体

我无法在我的样式文件中设置自定义字体。...@style/fontTextView...@font/example而且我仍然在我的应用程序中看到默认字体。但是当我将fontFamily更改为默认字体之一时,它会更改monospace如果我以编程方式设置自定义字体,它也有效。setTypeface(ResourcesCompat.getFont(context,R.font.example));如何让它适用于我在styles.xml中的自定义字体?我将compiltSdkVersion设置为26并将buildToolsVersion设置为26.0.2。我也在使用支持库:defsuppor

c# - 编译错误 - 类型具有 [Application] 属性和 [assembly :Application] attribute

我的应用程序类中有一个编译错误。这是我在AssemblyInfo.cs中的代码:[assembly:AssemblyTitle("myApp")][assembly:AssemblyDescription("")][assembly:AssemblyConfiguration("")][assembly:AssemblyCompany("")][assembly:AssemblyProduct("")][assembly:AssemblyCopyright("CCS")][assembly:AssemblyTrademark("")][assembly:AssemblyCulture(

Android 构建错误 : Attribute Signature requires InnerClasses attribute. 检查 -keepattributes 指令

尝试在Release模式下构建应用程序时遇到此错误。Error:AttributeSignaturerequiresInnerClassesattribute.Check-keepattributesdirective我的proguard-rules.pro行如下所示:-keepattributesSignature编译器指的是什么内部类?我遗漏了什么? 最佳答案 签名(Java8或更高版本)仅适用于Java8或更高版本和InnerClasses(Java5或更高版本),因此请检查您的AndroidStudio使用的是JavaSDK

android - Android Studio 2.3.1 错误:(155) Original attribute defined here,

依赖关系{编译文件树(dir:'libs',include:['*.jar'])compile'com.android.support:design:25.3.1'compile'com.android.support:appcompat-v7:25.3.1'compile'com.android.support:support-v4:25.3.1'compile'com.android.support:preference-v7:25.3.1'compile'com.google.code.findbugs:jsr305:3.0.0'compile'com.squareup.okht

android - 父级中的 XML @style

在android例子中style-parents是这样定义的但是在我找到的安卓资源中当我使用@style和@android:style作为前缀时有什么区别? 最佳答案 一般来说,如果你把“@android”放在某些东西的前面,这意味着你正在寻找一个在android包中定义的资源,而不是在你的项目中。例如,如果你想获得一种颜色:android:background="@android:color/holo_red_dark"这将获得Androidholo_red_dark颜色。您的项目中没有定义此颜色。android:backgrou

android - 如何: Google Play style horizontal RecyclerView with parallax background?

我正在尝试确定GooglePlay应用是如何实现水平列表的,从而使背景与列表项一起滑动。我制作了一个视频来展示这一点:https://gfycat.com/gifs/detail/AccurateQuerulousArmadillo这是支持库的功能还是Google使用自定义实现来实现此功能? 最佳答案 也许这会有所帮助https://github.com/sickterror/gplayrecyclerview我创建的项目。它并不完美,但它是一个起点。 关于android-如何:Goog