Answer the question
In order to leave comments, you need to log in
How to access fragment methods if there is a reference to View?
Good
there is a class for example
public class ItemConsist extends Fragment {
public int id = 1; //переменная или метод класса, пофиг
public View onCreateView(LayoutInflat....){}
}
ItemConsist itemConsist = new ItemConsist();
layoutArrayItemConsist.addView(itemConsist.onCreateView(inflater, layoutArrayItemConsist, new Bundle()));
int index = layoutArrayItemConsist.getChildCount();
for (int i = 0; index > 0; ++i) {
View view = layoutArrayItemConsist.getChildAt(i);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question