---
title: "selector的使用"
author: "Clareshao"
date: "2010-10-29T15:49:01Z"
tags: ["Java", "XML"]
categories: ["移动开发"]
slug: "selector"
draft: false
lastmod: "2010-10-29T15:49:01Z"
id: 797751
url: "https://clareshao.iteye.com/blog/797751"
---

使用selector可以实现在XML中动态改变布局： （1）在res/drawable下定义一个文件advancedbutton.xml \[code="java"] \[/code] （2）在布局文件main.xml中使用selector \[code="java"] 具体示例见附件 \[/code]