Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class DairyInqFragment extends Fragment {
- public static final String TAG = DairyInqFragment.class.getSimpleName();
- final static String LOG_TAG = "DairyInqFragmentLogs";
- ExpandableListView elview;
- View v;
- ArrayList<HashMap<String, Object>> menuItems1;
- ArrayList<ArrayList<HashMap<String, String>>> parent_childs;
- DairyInqExpandAdapter adapter;
- public void setargs(ArrayList<HashMap<String, Object>> menuItems1,
- ArrayList<ArrayList<HashMap<String, String>>> parent_childs) {
- this.menuItems1 = menuItems1;
- this.parent_childs = parent_childs;
- }
- public static DairyInqFragment newInstance(
- ArrayList<HashMap<String, Object>> menuItems1,
- ArrayList<ArrayList<HashMap<String, String>>> parent_childs) {
- DairyInqFragment f = new DairyInqFragment();
- f.setargs(menuItems1, parent_childs);
- return f;
- }
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- v = inflater.inflate(R.layout.dairy_inq_fragment, container, false);
- elview = (ExpandableListView) v.findViewById(R.id.expand_lv);
- TextView txter = (TextView) v.findViewById(R.id.inq_title);
- String language = AppState.getLanguage();
- if (language.equals("ru")) {
- txter.setText(R.string.p_qu_ru);
- } else if (language.equals("en")) {
- txter.setText(R.string.p_qu_en);
- } else if (language.equals("de")) {
- txter.setText(R.string.p_qu_de);
- }
- adapter = new DairyInqExpandAdapter(getActivity(), menuItems1,
- parent_childs);
- elview.setAdapter(adapter);
- return v;
- }
- public void setchanges() {
- adapter = new DairyInqExpandAdapter(getActivity(), menuItems1,
- parent_childs);
- elview = (ExpandableListView) v.findViewById(R.id.expand_lv);
- elview.setAdapter(adapter);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement