android:state_pressed无效(android:state_pressed is not working)
我在
res/drawable
有以下XML代码,并将按钮background
设置为此drawable
。 然而,当我按下按钮时,它不会改变color
。 感谢帮助<item android:state_enabled="false" android:drawable="@color/colorAccent"> </item> <item android:state_enabled="true" android:drawable="@color/colorPrimary"> </item> <item android:state_selected="false" android:state_pressed="true" android:drawable="@color/black"> </item>
I have the following XML code in
res/drawable
and I set buttonbackground
to thisdrawable
. However when I pressed the button it is not not changing thecolor
. Thanks for help<item android:state_enabled="false" android:drawable="@color/colorAccent"> </item> <item android:state_enabled="true" android:drawable="@color/colorPrimary"> </item> <item android:state_selected="false" android:state_pressed="true" android:drawable="@color/black"> </item>
原文:https://stackoverflow.com/questions/41389266
更新时间:2022-04-03 19:04
最满意答案
你必须在GlassFish中设置资源,所以它可以连接mysql,只需看看以下链接----> Netbeans帮助
You have to set the Resource in the GlassFish, so it can connect the mysql, Just look at the following link---->Netbeans Help
相关问答
更多-
有什么数据库专业书籍介绍?[2022-05-19]
mysql -
如何创建转储并保存它? 然后在想要恢复时运行它? http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html 编辑: 好吧,既然你说你真的不知道如何实现这一点,那么就更具体了。 必须从命令行运行mysqldumpl才能阅读此链接: http://docs.oracle.com/javase/7/docs/api/java/lang/Runtime.html 你的代码应该是这样的: String yourCommand = "mysqldump -h local ...
-
尝试增加wait_timeout mysql变量: SET wait_timeout=300; Try to increase the wait_timeout mysql variable: SET wait_timeout=300;
-
您想将jar文件部署到许多计算机上。 但首先, 你有两个步骤: 1: 在连接到MySQL数据库服务器之前,必须首先确保MySQL数据库服务器正在您部署的计算机上运行。 2:之后,您需要创建数据库表(您可以运行单个数据库脚本文件来创建数据库)。 这是一个简单的部分。 另请阅读: 如何使用MySQL DB完成Java桌面应用程序后创建安装程序? 和 Java应用程序和MySQL安装在一个包中 you want to deploy your jar file to many machines . but firs ...
-
NetBeans Servlet MySQL(NetBeans Servlet MySQL)[2022-01-14]
您可以通过一些正确的错误检查找到原因。 有很多原因导致它失败。 // establish connection to database conn = DriverManager.getConnection(DATABASE_URL, "jonh86", "ADMIN"); if(conn == null) System.out.println("Could not Connect"); ... -
给我们一些更多的信息: sql表变量 输出错误 查看变量的类型或使用此代码来更好地捕获错误 try { //You code there } catch (SQLException e) { while (e != null) { System.out.println("\n Message: " + e.getMessage()); System.out.println("\n SQLState: " + e.getSQLState()); System. ...
-
这是为java ee应用程序创建的问题。 在java se工作得很好。 在java中需要使用DataSource。 It was problem with creating for java ee application. In java se work well. In java ee need work with DataSource.
-
你必须在GlassFish中设置资源,所以它可以连接mysql,只需看看以下链接----> Netbeans帮助 You have to set the Resource in the GlassFish, so it can connect the mysql, Just look at the following link---->Netbeans Help
-
您应检查您的远程mysql服务是否接受远程连接,方法是检查您的my.cnf中没有设置特定绑定地址和/或跳过网络在您的配置中已注释掉。 此外,即使它与您的问题无关,您应该避免将您的数据库登录名和密码放在像stackoverflow这样的公共论坛上,因为任何人都可以在您解决问题后访问您的数据:) You should check that your remote mysql service accept remote connexion by checking that you don't have a spe ...
-
似乎MySQL端口没有添加到服务器防火墙中,因为你遇到了这个问题。 请在防火墙中添加端口3306并再次检查。 It's seems that MySQL port is not added in server firewall and due to that you are getting this issues. Please add port 3306 in firewall and check again.