草庐IT

XIB-file-Button

全部标签

android - Material Floating Action Button 导致错误和 xml 崩溃

我迁移到androidx并且我的依赖项是:implementation'androidx.appcompat:appcompat:1.1.0-alpha05'implementation'com.google.android.material:material:1.1.0-alpha06'我使用了FloatingActionButton:但是当我放置FloatingActionButton时,XML崩溃(呈现问题)。即使我使用以下内容:不过这个错误只出现在XML中,不影响程序的执行,对我来说也没有显示设计模式。invalidateCacheandRestart的问题是它暂时解决了问题,

android - 样式不适用于 Button

这是我的按钮XML:这里是按钮的样式XML:#FFFFFFFF16dipbold但是,样式XML对按钮没有影响。如果我跳过样式XML并直接在按钮XML中应用样式,一切都会按预期进行。我错过了什么? 最佳答案 您是否出于特定原因使用parent="@android:style/Widget.Button"?当你想从另一个样式继承时,你只需要指定一个parent。如果删除它会怎样? 关于android-样式不适用于Button,我们在StackOverflow上找到一个类似的问题:

【快速解决】Android Button页面跳转功能

目录让我们直接开始第一步:先建立一个新的activity​编辑 第二步:打开第一个页面的Java文件MainActivity方法一:直接跳转功能如下: 方法二:输入密码才能进行跳转功能如下:需要注意的地方结语让我们直接开始第一步:先建立一个新的activity他会自动生成两个文件一个是MainActivity,一个是activity_main2.xml 第二步:打开第一个页面的Java文件MainActivity在页面中写入跳转功能。方法一:直接跳转功能如下://从这块packagecom.example.myapplication04;importandroidx.activity.resu

go mod tidy报错:zip: not a valid zip file

goget报错:zip:notavalidzipfile具体报错:User@3-WIN10BG0088MINGW64/d/Users/WorkSpace/Go/projects/gin-study$gogetgithub.com/gin-gonic/gingo:downloadinggithub.com/gin-gonic/ginv1.9.1go:github.com/gin-gonic/gin:zip:notavalidzipfileUser@3-WIN10BG0088MINGW64/d/Users/WorkSpace/Go/projects/gin-study$goenv|grepPROX

idea2023启动报错Error opening zip file or JAR manifest missing

起因:因为我的idea2023.2.1破解版经常会出现卡在启动界面的,一直打不开的问题,后在网上搜索,打开idea安装目录下,bin目录下,双击idea.bat(记得打开前用Notepad++d打开该文件,在最后一行添加pause保存退出),可以看到下满这三行英文报错报错问题:ErroropeningzipfileorJARmanifestmissing:D:\ProgramErroroccurredduringinitializationofVMagentlibraryfailedtoinit:instrument解决办法:找到c盘和自定义的idea安装目录下,找到idea64.exe.vm

安卓测试 : 'Multiple dex files' when using 'gradle check connectedCheck'

当我运行基于android模拟器的测试时:gradlewcheckconnectedCheck...它失败了:com.android.dx.util.DexException:MultipledexfilesdefineLorg/hamcrest/Description;这是我的build.gradle文件:buildscript{repositories{mavenCentral()maven{url'https://oss.sonatype.org/content/repositories/snapshots/'}}dependencies{classpath'com.androi

android - 在 Android 应用程序中创建这样的 Button 的最佳实践?

我刚刚开始使用Eclipse和ADT创建Android应用程序。我已经在演示应用程序中获得了基本功能,并且想创建一个看起来像搜索字段的按钮(没有内置搜索功能,我只希望用户按下它并开始新Activity)。我的问题是:创建上述按钮的最佳做法是什么(忽略外部周围的1px深灰色描边)?我已经做到了在activity_main.xml中创建按钮创建一些样式@color/light_grey@color/white创建input_search_background.xml,它具有浅灰色笔划和圆角为状态创建input_search.xml。我不确定如何创建右侧的橙色block。我应该定义一个橙色的

OSError: We couldn‘t connect to ‘https://huggingface.co‘ to load this file

OSError:Wecouldn'tconnectto'https://huggingface.co'toloadthisfile,couldn'tfinditinthecachedfilesanditlookslikeTHUDM/chatglm-6bisnotthepathtoadirectorycontainingafilenamedconfiguration_chatglm.py.Checkoutyourinternetconnectionorseehowtorunthelibraryinofflinemodeat'https://huggingface.co/docs/transfor

从收集视图(XIB文件)中的可重复使用单元格中单击按钮单击

我创建了可重复使用的单元格,其中包含XIB中的按钮以供收藏。我可以更改集合视图中标签和按钮的文本,但我无法点击事件。我尝试了以下选项:一个。这在uicollectionviewcell中:不起作用classcellVC:UICollectionViewCell{@IBOutletweakvarsampleLabel:UILabel!@IBOutletweakvarbuttonClicked:UIButton!@IBActionfuncbuttonTest(_sender:Any){print("dsfsdf111111")}}b。我也尝试了:不起作用funccollectionView(_co

android NDK fatal error : stdio. h : No such file or directory #include <stdio. h>

我正尝试在我的Archlinux中为我的Qtandroid项目构建QPSQL驱动程序,但它经常失败configure:error:Cpreprocessor"/opt/AndroidSDK/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-cpp"failssanitycheck所以我尝试了简单的helloWorld程序:-%/opt/AndroidSDK/ndk-bundle/toolchains/arm-linux-androideabi-4