Alexei
Alexei

Reputation: 347

ListView and TextView inside one fragment

Is it possible to build one fragment with a listview and a textview inside, so i dont need to add a listfragment and and a DetailFragment. Just one fragment. Because I have only space for one fragment in my activity.

Thanks for youranswers

Upvotes: 0

Views: 163

Answers (1)

Stefan de Bruijn
Stefan de Bruijn

Reputation: 6319

You don't need to use a List-Activity/Fragment to be able to show a listview. It simply makes it a bit easier for you with functions like getList();

You can just make any normal Activity/Fragment, give your ListView an ID and just fetch it with findViewById(); like you'd do with any other view.

Upvotes: 1

Related Questions