how to give effects to livewallpaper?

by Hitendrasinh Gohil » Fri, 20 May 2011 13:51:26 GMT

Sponsored Links

can anybody tell me how can we give effects to live wallpaper like in
"city at night" lights on/off etc.


Other Threads

1. Stretch video to full screen in a SurfaceView extension

I have created a widget that is an extension of SurfaceView (very
similar to VideoView -;a=blob;f=core/java/android/widget/;hb=HEAD)
and I am working on a feature to stretch the video fully across the
device screen when certain action is taken. I've looked at onMeasure
function of VideoView and re-wrote it this way:

protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
    if (mStretchVideo) {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
    } else {
        int width = getDefaultSize(mVideoWidth, widthMeasureSpec);
        int height = getDefaultSize(mVideoHeight, heightMeasureSpec);
        if (mVideoWidth > 0 && mVideoHeight > 0) {
            if (mVideoWidth * height > width * mVideoHeight) {
                height = width * mVideoHeight / mVideoWidth;
            } else if (mVideoWidth * height < width * mVideoHeight) {
                width = height * mVideoWidth / mVideoHeight;
        setMeasuredDimension(width, height);

This seems to work fine if I completely stop the video and start
playing again. Now I am trying to force the refresh of this
SurfaceView after setting the stretch flag so that the video gets
stretched while it is playing, but I couldn't figure out how to force
a refresh on SurfaceView. I tried android.view.View.invalidate(),
android.view.View.refreshDrawableState() and calling
android.view.View.measure(int, int) directly with different
combinations but did not get any success.

Any ideas?



2. Getting different Contact number from Contact List and Call Log for same contact


Please help me in solving this problem with my Android Application:

I am writing an android application to search  call log by a
particular contact number , and  contact list by a particular contact

To start, I added a new contact in android emulator. While writing the
contact number for the contact, a dash sign ( - ) automatically gets
inserted between the digits after some interval.
  For, e.g. If I am trying to store 9889880912 , it gets converted to
After saving my contact, I made a call to the contact so that it gets
an entry in call log.

But i found that the contact number is stored in different pattern in
contact list and call log. Suppose I have a contact with number
9889880912. Then, using my code,

If I search my contact book for number 988-988-0911  , I am able to
display the result
But if I am doing the search for contact number 9889880912 , Then no
results are found from the contact list.

Similarly, If I am doing the search in CALL LOG History for
9889880912 , I am able to display the result.

 But if I am searching for number 988-988-0912 in the call log
history, no results are displayed.

How can I search for a number 9889880912 in my contact list to get
result.  I am trying to remove this - problem.

My code for search are :

/*  Search a contact in contact list   */

 Cursor phoneResult = context.getContentResolver().query(
ContactsContract.CommonDataKinds.Phone.CONTENT_URI ,
ContactsContract.CommonDataKinds.Phone.NUMBER + "=?",
                                                       new String[]

                     debugString="at least one contact with phonenumber";


/*  search for a call log by number */

  Cursor callLogResult =
context.getContentResolver().query( callLogURI,
                                                        Calls.NUMBER + "=?",

                                   debugString = "At least one call Log found";

Please guide me to solve my problem.

NIshant Kumar


3. 2d drawing with shapes and drawables.

4. Streaming video from phone to server

5. WebView, webpage gets zooomed automatically when TextBox in it is clicked

6. Programming in Java

7. Updating the Tab icons