We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I am trying to use the example in the Readme and my list is shown empty
(i have a custom adapter)
any suggestions?
CODE:
public class FragmentNewHome extends Fragment{ //views private ViewGroup rootView; //private LinearLayout footer; private Button b1, b2, b3, b4; //private ListView list; private ArrayList<ListItem> data; public AdapterHomeList adapter; @InjectView(R.id.new_home_footer) LinearLayout footer; @InjectView(R.id.new_home_listview) ListView list; public FragmentNewHome(){ } public static FragmentNewHome newInstance() { FragmentNewHome fragment = new FragmentNewHome(); Bundle args = new Bundle(); fragment.setArguments(args); return fragment; } public void onAttach(Activity activity) { super.onAttach(activity); try { } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement interfaces"); } } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = (View) inflater .inflate(R.layout.fragment_new_home_layout, container, false); ButterKnife.inject(this, view); return rootView; } @Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); data = new ArrayList<ListItem>(); data.add(new ListItem("test1")); data.add(new ListItem("test2")); data.add(new ListItem("test3")); adapter = new AdapterHomeList(data, getActivity()); Log.e("test", "adapter: " + (adapter == null ? "null" : "not null")); Log.e("test", "list: " + (list == null ? "null" : "not null")); list.setAdapter(adapter); QuickReturnListViewOnScrollListener scrollListener = new QuickReturnListViewOnScrollListener(QuickReturnType.FOOTER, null, 0, footer, 60); scrollListener.setCanSlideInIdleScrollState(true); list.setOnScrollListener(scrollListener); } @Override public void onDestroyView() { super.onDestroyView(); ButterKnife.reset(this); } }
The text was updated successfully, but these errors were encountered:
@ilandbt What does your layout file fragment_new_home_layout.xml look like?
Sorry, something went wrong.
No branches or pull requests
Hi,
I am trying to use the example in the Readme and my list is shown empty
(i have a custom adapter)
any suggestions?
CODE:
The text was updated successfully, but these errors were encountered: