㈠ android 怎么在点击按钮后更改背景
只需要给Button配置一个Selector背景选择器即可实现。
1.创建mylist_view.xml文件
首先在res目录下新建drawable文件夹,再在新建的drawable文件夹中新建mylist_view.xml,其目录结构为:res/drawable/mylist_view.xml。
2.根据具体需求编辑mylist_view.xml文件
新建mylist_view.xml文件后,在没有添加任何属性时其内部代码结构为:
<?xml version="1.0" encoding="utf-8" ?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
</selector>
3.下面就可以根据项目需求,在其内部定义为自己想要的样式了,主要属性如下:
<?xml version="1.0" encoding="utf-8" ?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 默认时的背景图片-->
<item android:drawable="@drawable/pic1" />
<!-- 没有焦点时的背景图片 -->
<item android:state_window_focused="false" android:drawable="@drawable/pic1" />
<!-- 非触摸模式下获得焦点并单击时的背景图片 -->
<item android:state_focused="true" android:state_pressed="true" android:drawable= "@drawable/pic2" />
<!-- 触摸模式下单击时的背景图片-->
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/pic3" />
<!--选中时的图片背景-->
<item android:state_selected="true" android:drawable="@drawable/pic4" />
<!--获得焦点时的图片背景-->
<item android:state_focused="true" android:drawable="@drawable/pic5" />
</selector>
4.引用mylist_view.xml文件
android:background="@drawable/mylist_view"
㈡ 怎么通过修改Android系统文件,来改变安卓程序的背景图片和系统设置的背景图
首先,取得root权限,然后用re文件管理器进入system\framework,复制framework—res,apk到sd卡,然后把它移动到电脑上,不解压,乜不用改后缀名,直接右键,然后点打开方式,选择winrar,打开后在打开res,在打开drawable—mdpi,这时再把要改成设置菜单背景的图片(尺寸为320-480,图片格式为png)重新命名为gbg后直接用鼠标拖进刚才打开的drawable—mdpi里面的任何一个空白区,注意了,这个时候压缩方式一定要选成储存。然后确定,就可以关掉,把framework—res,apk移动回sd卡,然后再放到system里面,更改权限后(第一列全勾,第二列勾第一个,其他的不管)再移动到framework里面替换,就已经替换好了,不用重新开机, 我已经成功了
㈢ 安卓开发软件主界面背景怎么加
有两种方式
1、引用style:定义好一个style设置
<style name="MyWinStyle">
<item name="android:background">你的背景</item>
</style>然后在Manifest里面的Activity上加上
android:theme="@style/MyWinStyle"2、直接在activity绑定的layout里面的最外层加上
android:background="你的背景"
㈣ 安卓开发怎样实现点击按钮更换所有界面的背景图
button.setBackgroundResource(R.drawable.beijing1); 上面是改变按钮背景的代码 可以做两组图片,分别为button1的选中和为选择状态、button2的选中和为选择状态,让后再button1和button2的点击事件中,对两个按钮的背景进行改变,就可以了
㈤ androidstudio怎么修改软件背景颜色
打开设置>Editor>Colors&Fonts>General>
保存自己的一个主题,原来的主题是不能修改的,只能另存,再进行修改,随便起个名字
选中 default text,右侧 勾选background,在background后面就可以选择颜色
选完颜色,点击choose就可看到下方的预览窗口的效果了,点击确定就可以看到代码窗口背景颜色已经设置好了
㈥ android开发中 改变背景的代码是什么
在java代码中设置
背景资源如果在res drawable下面:
view.setBackgroundResource(R.drawable.img);
背景资源如果是颜色值:
view.setBackgroundColor(R.color.white);
背景资源如果是drawable对象:
view.setBackground(drawable);
在xml中设置
android:backgroud="@drawable/img"
或
android:backgroud="@color/white"
㈦ android系统如何替换背景图片
右击桌面~属性~桌面~背景可先任意一个主题。
如果你需个性主题你可点游览到你文档上传即可。
㈧ 怎样修改安卓系统背景和短信背景悬赏
Android手机系统背景更换,短信界面透明。
工具/原料
re浏览器
电脑端压缩软件(好压orWinRaR)
方法/步骤
下面系统背景更换教程步骤十分简单。当然,前提是手机已经root。下面是详细的步骤,只要认识下面的字都会操作)
1、用re浏览器打开; system/framework,复制SemcGenericUxpRes.apk到SD卡2、将文件放到电脑桌面,最好能备份一份,将后缀.apk改为.zip!3、打开压缩包,将res文件夹拉出来4、系统背景图就在res/drawable-hdpi中5、找到图片semc_ bg.png,这个就是我们需要更换的图片了这步就是机油自由发挥的时候了,随便更改美化,然后再将图片替换上就是了7、将原压缩包的res文件夹删除,将换好图的res重新放入8、将.zip重新改为.apk然后放回SD卡9、用RE浏览器将已修改的xx.apk放到system中,先修改权;限。(原来的权限!)这一步很重要,不要和第十步顺序搞错了!!10、修改完权限后再将xx.apk移到到framework覆盖原文件11、重启~~OK!!注意:第9和第10步一定要注意!!切勿掉乱顺序
下面短信界面透明教程先从原ROM里提取出未编译过的mms.apk
一、反编译Mms.apk二、路径res/drawable/conversation_item_background_read.xml 打开,找到;<item android:state_selected="false"android:drawable="@color/read_bgcolor" />修改为:<item android:state_selected="false"android:drawable="@android:color/transparent" />保存,退出!!!三、路径res/drawable/conversation_item_background_unread.xml 打开,找到<item android:state_selected="false"android:drawable="@color/unread_bgcolor" />修改为:<item android:state_selected="false"android:drawable="@android:color/transparent" />保存,退出四、路径res/layout/compose_message_activity.xml 打开,找到<EditText android:textSize="16.0sp"android:textColorHint="#ff858585"android:id="@id/subject"android:visibility="gone"android:layout_width="fill_parent"android:layout_height="wrap_content" android:layout_marginLeft="3.2999878dip"android:layout_marginTop="5.299988dip"android:layout_marginRight="3.2999878dip" android:hint="@string/subject_hint"android:singleLine="true"android:maxLength="40"android:capitalize="sentences"android:autoText="true" />修改里面android:textColorHint="#ff858585"为:android:textColorHint="#00000000"再找到:<EditText android:textSize="18.0sp"android:textColor="@touchwiz:color/tw_color002"android:textColorHint="#ff858585"android:gravity="top"android:id="@id/embedded_text_editor"android:background="#ffffffff"android:nextFocusRight="@id/send_button"android:layout_width="wrap_content" android:layout_height="fill_parent"android:layout_marginLeft="10.0dip"android:layout_marginTop="12.0dip"android:hint="@string/type_to_compose_text_enter_to_send" android:capitalize="sentences"android:autoText="true"android:layout_toLeftOf="@id/sendbuttons"android:layout_alignParentLeft="true" android:inputType="textCapSentences|textAutoCorrect|textMultiLine"android:imeOptions="actionSend|flagNoEnterAction" />修改里面两段代码:android:textColorHint="#ff858585"修改为android:textColorHint="#00000000"
END
注意事项
手机要root
经验内容仅供参考,
㈨ android studio 怎么设置背景
方法/步骤
1,首先打开软件,看看现在的背景是什么样子,,
2,在菜单栏中的file栏下选择“settings”,并找到外观“appearance”。
3,修改主题“theme”,软件自带三种可选主题。
4,主题一:Darcula,就是当今最流行的背景主题,
5,主题二:Intellij,灰白系列,相比第三个windows主题更好看一些,但个人还是觉得Darcula最好。
6,确定好主题后,选择“restart”重启软件。就可以看到的背景,顿时觉得高大上了有木有。
END
注意事项
大家如果觉得这三款主题都不喜欢,可以去网上搜索别人制作的背景主题,然后安装插件修改主题