Paging om Tio Ping

by WiwietH » Tue, 09 Feb 2010 16:09:32 GMT


Sponsored Links
 Paket dah sampe.....keren euy smoke grey nya.

Love it

N1..., don't dream it. Have it.

-- 
"



Other Threads

1. getSharedPreferences and static reference to a Context object

Hello.

In my Android application, I have to call the getSharedPreferences in
non-activity classes.

In order to avoid passing a Context object to each constructor of
these classes (and because many of them are classes with only static
methods which don't have a constructor), I have implemented these
steps :

The main activity of my application (which is launched at startup) is
called Dispatcher.

In the onCreate method of this class, I keep a reference to the
created Dispatcher object in a static public variable of the
Dispatcher class which can be accessed from any class in the project.

Here is the squeleton of this class:

public class Dispatcher extends Activity {

    public static Dispatcher ref;

    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        ref = this;
        ...
    }

    ...
}

This class calls this method to start other activities :
startActivityForResult(new Intent(Dispatcher.this,
RegisterScreen.class), S.REG);

The problem is that when I try to use the
Dispatcher.ref.getSharedPreferences(...) method in one of my classes,
on some devices it works well and on other devices, I get a
NullPointerException.

Can you please help me to solve this problem.

Thank you.

Best regards.

Patrick.

-- 

2. Dialog change orientation

Hi,

Does anyone know if it is possible to change the orientation of a
dialog ONLY. So i show a dialog in landscape while the activity
remains in portrait. Anyone know how to do this?

-- 

3. emulator/ host network setup problems

4. horizontalScrollView + TabHost

5. google API with android

6. App comment spam

7. LVL found to be easy to crack