在fragment中获取他附着的activity中的变量时间:2023-03-09 16:07:49 final String data=(关联的activity类)getActivity().getData(); getData();自定义的方法