Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7996627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:45:18+00:00 2026-06-04T14:45:18+00:00

my app is a social network where users share links and tag them to

  • 0

my app is a social network where users share links and tag them to let the right persons receive it. Basically, the main activity is simply a listview of posts. I use an open protocol parser to get the web objects metadata on server side.

Now I need to display the right layout in each post item depending of the metadata (video, app, web page, …). And of course, layouts must react to user clicks event and call intents.

So my first idea is to have a framelayout for each item where I load a specific fragment in charge of generating the right layout depending of the resource type.

But I’m really not sure loading a fragment inside a listview item is a good practice as the reuse system of views is totally messed up.

I’d just like to know what is the best way to implement this functionality for you guys.

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T14:45:19+00:00Added an answer on June 4, 2026 at 2:45 pm

    This is not really what fragments are designed for. You do not need to use fragments to have ListView rows of differing types — just override getItemViewType() and getViewTypeCount() in your ListAdapter, then be sure to create the right type of row on demand based upon the metadata.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In an app written in PHP (e.g., a social network), let's say that 10
I'm working on a Rails app that implements some social network features as relationships,
I am writing an iPhone app – a client for some social network. The
I'm developing android app. It's some sort of social network. Where user can add
I have a social network type app I have been working on for at
I am working on a social-network type of application on App Engine, and would
I want to build a social network app for Android. But, I don't know
I have a new social-network like web app coming up, and I want a
In my app I want to provide a strong integration with social network and
It says in the app agreement that a competing social network has to get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.