草庐IT

checkbox-style

全部标签

android - 应用程序 :popupTheme= "@style/AppTheme.PopupOverlay"- Cannot be resolved to a variable

在为AndroidStudio开发界面时,我的XML文件的字段出现了一个小问题。将鼠标悬停在我的app:popupTheme="@style/AppTheme.PopupOverlay"上时,我收到一条错误消息,表示字段“无法解析为变量”。 最佳答案 很抱歉回复晚了,它仍然可以帮助其他正在寻找解决方案的人。这是因为您引用的是您的style.xml,并且不能有任何名为...的标签,所以您需要在您的style.xml中添加这些行,它将解析@color/colorPrimary@color/colorPrimaryDark@color/c

android - 我可以更改 style.xml 以适应不同的分辨率吗

如何为不同的分辨率更改style.xml,我知道找到分辨率但不知道如何更改平板电脑的style.xml 最佳答案 只需为不同的分辨率创建尽可能多的style.xml文件,并将它们放在文件夹values-mdpi、values-hdpi中,values-ldpi等。这应该可以完成工作。 关于android-我可以更改style.xml以适应不同的分辨率吗,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/

android - android-support-v7-mediarouter 中的 styles.xml 错误

以下是android-support-v7-mediarouter的styles.xml文件。56dp48dp0dptrue@string/mr_media_route_button_content_description@drawable/mr_ic_media_route_holo_dark56dp48dp0dptrue@string/mr_media_route_button_content_description@drawable/mr_ic_media_route_holo_light但是我收到很多没有找到资源的错误,其中一些是:[2014-04-0510:03:14-Spl

java - 检索项目 : No resource found that matches the given name '@android:style/Theme.AppCompat.Light.DarkActionBar' 的父项时出错

我正在关注来自developers.android.com的android开发教程,目前我正在尝试使用此处提供的信息来设置操作栏的样式:https://developer.android.com/training/basics/actionbar/styling.html#CustomBackground7这是res/values/themes.xml的代码:@style/MyActionBar@style/MyActionBar@drawable/actionbar_background@drawable/actionbar_background我在“style”开始标签旁边看到红叉

android - 错误 : IllegalArgumentException: The style on this component requires your app theme to be Theme. Material 组件

下面是我的依赖implementation'com.google.android.material:material:1.0.0'implementation'androidx.appcompat:appcompat:1.0.2'implementation'androidx.constraintlayout:constraintlayout:1.1.3'我的layout.xml上面的代码对我来说工作正常但是当我更新materialdesign的dependenciesimplementation'com.google.android.material:material:1.1.0-a

Android - CheckBox block ExpandableListView.OnGroupClickListener

我正在尝试将一个复选框放入ExpandableListView。我怎么做?我扩展了BaseExpandableListAdapter并将以下内容放入getGroupView()中:@OverridepublicViewgetGroupView(intgroupPosition,booleanisExpanded,ViewconvertView,ViewGroupparent){Viewview=convertView==null?context.getLayoutInflater().inflate(R.layout.onet_head,null):convertView;((Text

android - 警报对话框生成器 : No items for checkboxes are shown

我在以下代码中遇到了alertdialog.builder的问题:publicvoidshowSettingsBox(){finalCharSequence[]items={"Item1","Item2","Item3"};finalbooleanchecked[]=newboolean[]{false,false,false};AlertDialog.Builderbuilder=newAlertDialog.Builder(fLabyrinthGame);builder.setMessage(fMessage).setCancelable(false).setMultiChoice

android - 实现android :button ="@drawable/checkbox" programmatically

我正在尝试创建自定义复选框按钮图像。经过一些研究,我遇到了这个代码示例:我的问题是如何在代码中实际实现android:button。 最佳答案 setButtonDrawable(Drawabled)是要走的路。确保它是可绘制状态列表以响应用户交互。一步一步的指导至少有2张图片。(一个用于检查状态,另一个用于正常状态)创建xml可绘制对象。http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList使用setButtonDra

android - Android 中可以更改 Edittext、Radio Button 和 CheckBox 的字体类型吗

我是android的初学者。我可以在Android中更改Textview的字体类型。但是我必须使用asset文件夹中的.ttf文件来进行这种字体更改。TextViewtext=(TextView)layout.findViewById(R.id.text);text.setText(msg);Typefacefont=Typeface.createFromAsset(getAssets(),"fonts/handsean.ttf");text.setTypeface(font);上面的代码是我用来更改TextView的字体的。但是我还需要更改单选按钮、编辑文本和复选框(我在我的应用程序

android:theme ="@android:style/Theme.NoTitleBar.Fullscreen"安卓不工作

我在list文件中声明我的Activity,如下所示。我声明了全屏主题的Activity。但它不起作用。我也使用第二种全屏方式,如下所示。requestWindowFeature(Window.FEATURE_NO_TITLE);getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);但是没有成功。请帮我找到这个。 最佳答案 我通过在应用程序级别声明全屏主题来解决它。