Monday, June 6, 2011

如何加Widgets到Andriod平板电脑home screen

Long Method

Before you get started make sure you have space for a new widget on your home screen, if you have many widgets already filling your screen you will need to remove one of those widgets before proceeding. Since many Android phones come with multiple home screens you can always move things around or select a screen to dedicate to widgets.
Start by clicking on the Home key on your device so you can go to the home screen of your Android phone.
Next you'll need to click on the Menu button and you can then select the Add button on the screen. If you have an HTC Desire then it will say Add to Home, here's a screenshot.
Add to Home
After clicking on the Add button you'll then see the Widgets option among other icons. Click on Widgets in order to access all of the widgets currently found on your device.
Add Widgets
Once in the widget screen simply navigate to the widget that you want to place on your homescreen. Typically you will find several already available widgets, plus any you have installed yourself. You can scroll through your widgets if there are numerous options to choose from.
Select Widget
Simply clicking on the widget you want to use will then add that widget to your home screen. Click on your home screen button and if the widget appears you're all set for use.

Short Method

Plus Widget ButtonLong press on any empty space on your homescreen (a long press will last a couple of seconds). You'll then notice the Widgets option just as you would with the longer method. Click on the widget menu then click on the widget you want to install, this will place your widget on your Android home screen.
On HTC phones you can also use the + button at the bottom right to add widgets. You can see it highlighted in this screenshot. The rest of the process is exactly the same.

Working with Widgets

If you want to move a widget then simply hold your finger on it. It will detach with a vibration feedback and you can then move it around to the position you want. If you want to delete it then select it in the same way until it detaches and then drag it to the trash can at the bottom of the screen.
Move or delete widget
The widget in that screenshot is the Power Control widget that you'll find on many HTC Android phones and it's extremely handy for quickly turning data, Wi-Fi or Bluetooth on or off. There are loads of other great Android widgets worth checking out so take advantage and grab the ones that interest you. They are great time savers.

什么是Ispostback?怎么理解?

1.就是判断是否从服务器第一次传来页面,当页面第一次打开时为false,因为不是postback,从第二次开始就是true了.如想在页面上的dropdowmlist中在页面第一次就添加数据,而不是每次都添加,那就再page_load()里用if(!ispostback)

2.控件的值改变以后,如果控件的autopostback=true,就会有一个刷新页面的动作,那个动作就叫ispostback

3.另外可以这么理解,在需要每次页面Load的时候,根据需要把每次都要加载的代码放在IsPostBack中,把只需要加载一次的代码放在if(!IsPostBack)中.每次用户回传服务器任何信息的时候,都会引发isPostBack属性.用来判断此用户是否曾经做过登陆或者其他事件