вторник, 13 сентября 2011 г.

Christmas Wallpapers

I've published Live WallPapers with Christmas Theme. It shows snow flakes falls down. Actually I made walpapers in last year but couldn't check how it works into real device.It was interesting to make the snow looks like real. If I find some time I will write how to create falling effect.

Add AdMob AdView to PreferenceActivity

Simple solution to add AdMob advert to Live Wallpaper settings screen is create new type which will show AdMob AdView and then include it into PreferenceScreen.

1) Add new type AdmobPreference:
public class AdmobPreference extends Preference
    public AdmobPreference(Context context) {
        super(context, null);

    public AdmobPreference(Context context, AttributeSet attrs) {
        super(context, attrs);

    protected View onCreateView(ViewGroup parent) {
        LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        return inflater.inflate(R.layout.admob_preference, null);
2) Add admob_preference.xml to res/layout:


3) Now you can use your type within PreferenceScreen.