Android
子非鱼423
这个作者很懒,什么都没留下…
展开
-
ImageView中src和background的区别.
src属性和background属性的区别:在API文档中,ImageView有两个可以设置图片的属性,分别是:src和background.1.background通常指的都是背景,而src只的是内容.2.当使用src填入图片,是按照图片大小直接填充,并不会进行拉伸;而使用background填入图片,则是根据ImageView给定的宽度进行拉伸....原创 2019-03-22 09:22:53 · 137 阅读 · 0 评论 -
Open quote is expected for attribute "android:state_pressed" associated with an element type "item".
佩奇在做项目的时候,遇到一个错误,查看好久都没有发现问题.然后在把句子拿去翻译才发现是丢失了引号.上代码.<?xml version="1.0" encoding="utf-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android" > <item an...原创 2019-03-28 14:01:32 · 275 阅读 · 0 评论 -
android自定义透明、无标题的Dialog主题。
在android开发中,系统提供的主题往往不能满足实际开发中的需求,今天我们就来了解一下透明,无标题的Dialog。首先在res/values目录下建立一个color.xml文件<?xml version="1.0" encoding="utf-8"?><resources> <!-- 透明度 --> <color name="...原创 2019-03-28 16:59:23 · 705 阅读 · 0 评论 -
The method setPositiveButton(int, DialogInterface.OnClickListener) in the type AlertDialog.Builder i
本佩奇刚步入安卓的新人,开发的过程中遇到的问题都记录在自己的博客当中,不喜勿喷。出自CSDN中,链接忘了。在创建Dialog的时候,出现The method setPositiveButton(int, DialogInterface.OnClickListener) in the type AlertDialog.Builder is not applicable for the arg...原创 2019-04-08 18:18:08 · 290 阅读 · 0 评论 -
Android强制让一个按钮获得焦点。
参考至:https://blog.csdn.net/u013173289/article/details/45134085佩奇在开发的时候有个需求是让一个按钮在界面跳转的时候获得焦点,下面进行讲解:主要分为两步:一、在XML布局文件中给按钮设置两个属性:android:focusable="true"android:focusableInTouchMode="true"二、...原创 2019-04-09 11:57:21 · 1902 阅读 · 0 评论