naive error

changing android:layout_below="@+id/birth"  to android:layout_below="@id/birth", because at this point it is already declared, which the + implies, it could lead to problems when declaring it again.

java.io.IOException: Unable to open sync connection!

get into Settings->Development->, and try disabling ‘USB debugging’ and enabling the same

ndroid:padding和android:layout_margin的区别

  • padding是站在父view的角度描述问题,它规定它里面的内容必须与这个父view边界的距离。
  • margin则是站在自己的角度描述问题,规定自己和其他(上下左右)的view之间的距离,如果同一级只有一个view,那么它的效果基本上就和padding一样
两张图片,点击一张图片,变成另一张,再点击一次,还原

首先定义一个全局变量 int chang;

然后在监听里面做判断:

layout.setOnClickListener(new OnClickListener() {
public void onClick(View arg0) {
if (item==0) {
imageView.setImageResource(R.drawable.selected);
item=1;
} else{
imageView.setImageResource(R.drawable.pressed);
item=0;
}
}
});


Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

生活在西班牙

自己动手丰衣足食

BlueAsteroid

Just another WordPress.com site

Jing's Blog

Just another WordPress.com site

Start from here......

我的心情魔方

天才遠私廚

希望能做一個分享各種資訊的好地方

语义噪声

西瓜大丸子汤的博客

笑对人生,傲立寰宇

Just another WordPress.com site

Where On Earth Is Waldo?

A Project By Melanie Coles

the Serious Computer Vision Blog

A blog about computer vision and serious stuff

Cauthy's Blog

paper review...

Cornell Computer Vision Seminar Blog

Blog for CS 7670 - Special Topics in Computer Vision

datarazzi

Life through nerd-colored glasses

Luciana Haill

Brainwaves Augmenting Consciousness

槑烎

1,2,∞

Dr Paul Tennent

and the university of nottingham

turn off the lights, please

A bunch of random, thinned and stateless thoughts around the Web

%d bloggers like this: