3

I want to create a photo gallery app for android which has the following functionality,

  • "SET AS WALLPAPER" Option
  • Navigation Buttons (Left - Right)

Its more like a live wallpaper. I need to know if there are any source codes out there to help me create this quickly.

I have knowledge on HTML5 CSS3 and in PHP(if it helps) :)

Useful help will be highly appreciated.

thowzif
  • 103
  • 2
  • 3
  • 12

2 Answers2

4

Check out below Links for the Live wallpaper:

1) PhotoGalleryLive wallpaper
2) Gallery Wallpaper
3) Android-wallpaper-slideshow

GrIsHu
  • 29,068
  • 10
  • 64
  • 102
1

This is how i do image view for my app...

import android.app.Activity;
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Gallery;
import android.widget.ImageView;

public class CertDisplay extends Activity {
    Integer[] pics = {
            R.drawable.cert1,
            R.drawable.cert2,
            R.drawable.cert3,
            R.drawable.cert4,
            R.drawable.cert5
    };
    ImageView imageView;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.certificate);            
        Gallery ga = (Gallery)findViewById(R.id.Gallery01);
        ga.setAdapter(new ImageAdapter(this));
    }

    public class ImageAdapter extends BaseAdapter {

        private Context ctx;
        int imageBackground;

        public ImageAdapter(Context c) {
            ctx = c;
            TypedArray ta = obtainStyledAttributes(R.styleable.Gallery1);
            imageBackground = ta.getResourceId(R.styleable.Gallery1_android_galleryItemBackground, 1);
            ta.recycle();
        }

        @Override
        public int getCount() {

            return pics.length;
        }

        @Override
        public Object getItem(int arg0) {

            return arg0;
        }

        @Override
        public long getItemId(int arg0) {

            return arg0;
        }

        @Override
        public View getView(int arg0, View arg1, ViewGroup arg2) {
            ImageView iv = new ImageView(ctx);
            iv.setImageResource(pics[arg0]);
            iv.setScaleType(ImageView.ScaleType.FIT_XY);
            //iv.setLayoutParams(new Gallery.LayoutParams(750,1020));
            iv.setBackgroundResource(imageBackground);
            return iv;
        }

    }
}
chinna_82
  • 6,353
  • 17
  • 79
  • 134