public void addPatchImage(ImageView image) {

    LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
    image.setLayoutParams(params);

    LinearLayout wrapper = new LinearLayout(this.getContext());

    wrapper.setPadding(padding, padding, padding, padding);
    wrapper.addView(image);
    quilt.addPatch(wrapper);
  }
  public void setAdapter(Adapter adapter) {
    this.adapter = adapter;
    adapter.registerDataSetObserver(adapterObserver);

    // setViewsFromAdapter(adapter);

    this.removeAllViews();
    for (int i = 0; i < adapter.getCount(); i++) {
      View temp_view = adapter.getView(i, null, null);
      TextView temp_txt = (TextView) temp_view.findViewById(R.id.gridsearch_text);

      quilt.addPatch(temp_view);
    }
  }
 public void refresh() {
   quilt.refresh();
 }
 public void removeQuilt(View view) {
   quilt.removeView(view);
 }
  public void addPatchesOnLayout() {
    for (View view : views) {

      quilt.addPatch(view);
    }
  }
  public void addPatchView2(View view) {

    view.setPadding(padding, padding, padding, padding);
    quilt.addPatch2(view);
  }
 public void addPatchViews(ArrayList<View> views_a) {
   for (View view : views_a) {
     quilt.addPatch(view);
   }
 }