I wonder if it's possible to make a method in a class, to initialize all my views? 

I tried this but it didn't work:

```
public class MyInitialize extends View{

    public MyInitialize(Context context) {
        super(context);

    }

    public void iniViewByID(View view[], int id[]){

        for(int x=0; x<view.length; x++){

            view[x] = findViewById(id[x]);
        }

    }

```

USAGE: 

```
MyInitialize myInitialize = new MyInitialize(this);
View myViews[] = new View[]{btn,txtview};
int myIDs[] = new int[]{R.id.btn,R.id.txtview};

myInitialize.iniViewByID(myViews,myIDs);

```

But it didn't work for me so I don't know if that's not possible.