Esempio n. 1
0
 public void setImages(String[] pics) {
   adapter.setFiles(pics);
   if (resourceId != -1) {
     ((Gallery) container.$form().findViewById(resourceId)).setAdapter(adapter);
     ((Gallery) container.$form().findViewById(resourceId)).requestLayout();
   } else {
     view.setAdapter(adapter);
     view.requestLayout();
   }
 }
Esempio n. 2
0
 public ImageGallery(ComponentContainer container, String[] picnames, int[] basestyle) {
   super(container);
   view = new Gallery(container.$context());
   adapter = new ImageAdapter(container.$context(), basestyle);
   adapter.setFiles(picnames);
   view.setAdapter(adapter);
   view.setOnItemClickListener(this);
   container.$add(this);
   view.requestLayout();
 }
Esempio n. 3
0
 public void setPicSize(int width, int height) {
   adapter.setWidth(width);
   adapter.setHeight(height);
   if (resourceId != -1) {
     ((Gallery) container.$form().findViewById(resourceId)).setAdapter(adapter);
     ((Gallery) container.$form().findViewById(resourceId)).requestLayout();
   } else {
     view.setAdapter(adapter);
     view.requestLayout();
   }
 }
Esempio n. 4
0
 public ImageGallery(
     ComponentContainer container, String[] picnames, int[] basestyle, int resourceId) {
   super(container, resourceId);
   view = null;
   Gallery view = (Gallery) container.$form().findViewById(resourceId);
   adapter = new ImageAdapter(container.$context(), basestyle);
   adapter.setFiles(picnames);
   view.setAdapter(adapter);
   view.setOnItemClickListener(this);
   view.requestLayout();
 }