[android-developers] How to set HorizontalScrollView's initial offset?

2009-06-22 Thread zhangxiyuan
Hi, I searched the groups to find a topic about setting horizontal scroll view's offset, but no results. Some topics talked about ScrollView, and they are not expected. Here is my question: I have a HorizontalScrollView, with LinearLayout as its child, the LinearLayout contains a custom view, I

[android-developers] Re: How to set HorizontalScrollView's initial offset?

2009-06-22 Thread zhangxiyuan
in the custom view's onDraw() method, it will be invoked any times when the custom view to be drawn. Is it reasonable? Thanks. On Jun 22, 2:47 pm, zhangxiyuan zhangzho...@gmail.com wrote: Hi, I searched the groups to find a topic about setting horizontal scroll view'soffset, but no results. Some

[android-developers] How to change the AlertDialog's background color?

2009-06-01 Thread zhangxiyuan
Hi, In Android, the AlertDialog's background color is light gray (#646464?), while I want to customize it to other color? I searched the groups and googled it online, and all about this is using style/theme to change that. I tried some solutions, but not succeeded. Anybody can give me a little

[android-developers] ToggleButton - how to implement iPhone-style ToggleButton?

2009-05-31 Thread zhangxiyuan
Hi, I think Android does not provide iPhone style toggle button? Look at the picture below, when I just want to set ON|OFF for some settings, I think the iPhone style and Android style ToggleButton are both OK for me, but I have an application, I want to migrate it from iPhone SDK - Android

[android-developers] How to use a finger to pull the screen to view more data?

2009-05-27 Thread zhangxiyuan
Hi, I got a question about what kind of view should I use in the following case. As it shows below, I want to draw a 2D coordinates, and show a diagram in it(by drawing points and then connecting them from left to right). But I have much more data than the screen size, I wish the user to press

[android-developers] How to use a finger to pull the screen to view more data?

2009-05-27 Thread zhangxiyuan
Hi, I got a question about what kind of view should I use in the following case. As it shows below, I want to draw a 2D coordinates, and show a diagram in it(by drawing points and then connecting them from left to right). But I have much more data than the screen size, I wish the user to press

[android-developers] Any Framework API for accessing battery information?

2009-05-25 Thread zhangxiyuan
Hey, everybody, I wonder if there are battery related APIs available so that my application can simply invoke to obtain battery information such as how much time(exactly) left in the battery life, the ratio of each main service/app consume the battery, etc. I checked the SDK1.5Release1,and

[android-developers] Why there is no BATTERY SERVICE?

2009-05-25 Thread zhangxiyuan
Hi, I checked out the whole android open source project, and found the source code under /frameworks/base/services/java/BatteryService.java as well as the other service classes such as AlarmManagerService, WindowManagerService,... While in the android.content.Context#getSystemService(String

[android-developers] ApiDemos:FingerPaint demo to get painting bounds.

2009-04-22 Thread zhangxiyuan
Hi everybody, I got a question about the Android ApiDemos-Graphics-FingerPaint demo. By using finger touch the screen, I can draw lines, of course, i can use the lines to make up of letters, english or chinese or japanese. Now I wonder if I can get the bounds of what I have drawn. For example,