草庐IT

share-button

全部标签

android - Android 上的 GdxRuntimeException : couldn't load shared library 'gdx' for target

我开发了一个Libgdx应用程序并在我的SamsungGalaxyS3(4.1.2)上测试了它,它运行良好。我试图在GalaxyGrand(4.1.2)上测试它但失败了。在logcat中,我发现了以下内容:causedbycom.badlogic.gdx.utils.GdxRuntimeExceptioncouldn'tloadsharedlibrary'gdx'fortarget:Linux,32-bit这只是在更换设备时发生的,所以知道是什么原因吗?!完整的logcat:05-2220:25:01.745:E/AndroidRuntime(12725):FATALEXCEPTION

在 flutter 上测试 shared_preferences

我正在编写一个flutter应用程序,并且在编写测试时遇到了这个问题。此方法应该将数据写入TextFields并点击一个将这些数据保存在SharedPrefs中的按钮:testWidgets('Clickonloginsavesthecredentials',(WidgetTestertester)async{awaittester.pumpWidget(MyApp());awaittester.enterText(find.byKey(Key('phoneInput')),'test');awaittester.enterText(find.byKey(Key('passwordIn

在 flutter 上测试 shared_preferences

我正在编写一个flutter应用程序,并且在编写测试时遇到了这个问题。此方法应该将数据写入TextFields并点击一个将这些数据保存在SharedPrefs中的按钮:testWidgets('Clickonloginsavesthecredentials',(WidgetTestertester)async{awaittester.pumpWidget(MyApp());awaittester.enterText(find.byKey(Key('phoneInput')),'test');awaittester.enterText(find.byKey(Key('passwordIn

android - 我应该使用什么 ImageButton 或 Button?

我有一个具有两种状态(选中和未选中)的按钮。按钮的图像因州而异。我应该使用哪一个?如何设置图像和状态?请提出建议(我是android的新手)。 最佳答案 在drawable文件夹中使用xml配置。不是引用图像作为按钮的背景,而是引用此xml配置(文件名):例如:my_button.xml在layout.xml中使用:通过此配置,您可以影响按钮的外观、按下时、聚焦时等。两种类型的按钮(Button和ImageButton)的方式相同。如果您的按钮不包含文本,请使用ImageButton。

android - 使用 Theme.MaterialComponents.Light.NoActionBar 样式时,设置 Button Background 无效

为了使用Chip和ChipGroup,我设置了ApplicationstyleextendsTheme.MaterialComponents.Light.NoActionBarintmanifests.xml,然后我设置了Button"android:background"属性,但它没有影响!为什么?我能做什么?这是我的风格:@color/primary_material_light@color/header_color48dpportrait@style/AntButton-->@style/AntButton-->-->@color/ffc000-->@color/ffc000@d

android - 如何将Alpha设置为android Button

我有三个按钮,共享相同的背景图像,我想使用Alpha禁用其中一个按钮。但是当我使用下面的代码时:button1.getBackground().setAlpha(45);它正在改变所有三个按钮的背景。但我只需要一个。我们可以通过使用Alpha()来完成吗?或者我们可以使用的其他一些东西,以便按钮看起来处于禁用模式。 最佳答案 您可以使用AlphaAnimation为任何View设置alpha示例代码Buttonbtn=(Button)findViewById(R.id.button);floatalpha=0.45f;AlphaAn

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按钮有不受支持的样式吗?我不确定。如有任何帮助,我们将不胜感激。我做这件事的时间比我想承认的要

安卓 : ListView with Buttons -> OnItemClick do nothing

我的问题来自ListView。没有按钮,ListView的.setOnItemClickListener工作正常。(开始一个Activity)当我将按钮添加到ListView的项目中时,按钮是可点击的,但项目不是更可点击的...我尝试使用myListView.setItemCanFocus(true);但它不起作用... 最佳答案 从Button中删除focusable属性可以解决这个问题。您可以在布局xml文件或java源代码中执行此操作。还有一个提示,如果您使用的是ImageButton而不是Button,则需要在java代码中

android button setPressed after onClick

昨天我注意到可以通过兼容性包将Fragments集成到旧的API级别中,但这对这个问题来说并不是真正必要的。:)我有一个带有OnClickListener的按钮Buttonbutton=(Button)findViewById(R.id.button);button.setOnClickListener(newOnClickListener(){@OverridepublicvoidonClick(Viewv){doSomething();button.setPressed(true);}});因为实际点击时,显示为按下,松开后,按钮状态为未按下,保持该状态。有没有一种简单的方法可以在

安卓约束布局 : Three buttons equally distribute across the width

我有一个包含3个水平按钮的ConstraintLayout。我希望3个按钮具有固定宽度并均匀分布在布局的宽度上。 最佳答案 这是一个可视化示例。选择View右键单击并选择链>创建水平链另见ConstraintLayout:packvschain 关于安卓约束布局:Threebuttonsequallydistributeacrossthewidth,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/qu