• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Layout Question

Hello,

I am building a social media app, and for the chat fragment I am using a cardView inside of a recylerView for each “post”. Basically like Twitter.

I need someone to point me in the right direction. I want the user to be able to make a post. The post could be text only, but I want the user to have the ability to add photos.

Here’s the question: I want the user to be able to post up to 4 images in a single post. How do I handle the layout file/files when the user only adds one pic, or two, etc… Do I need four different layouts? Is the a library/plugin that deals with this issue? I added a ROUGH draft of the layouts that are possible. Thanks for the help. I hope it wasn’t too confusing. Please lmk if I can clarify anything. Thank you.
 

Attachments

  • 7CC7453D-410C-4612-B9BC-673BE215662B.jpeg
    7CC7453D-410C-4612-B9BC-673BE215662B.jpeg
    535.4 KB · Views: 122
Hello,

I am building a social media app, and for the chat fragment I am using a cardView inside of a recylerView for each “post”. Basically like Twitter.

I need someone to point me in the right direction. I want the user to be able to make a post. The post could be text only, but I want the user to have the ability to add photos.

Here’s the question: I want the user to be able to post up to 4 images in a single post. How do I handle the layout file/files when the user only adds one pic, or two, etc… Do I need four different layouts? Is the a library/plugin that deals with this issue? I added a ROUGH draft of the layouts that are possible. Thanks for the help. I hope it wasn’t too confusing. Please lmk if I can clarify anything. Thank you.
Twitter does that automatically when you upload four photos, and you can only upload four photos at a time :)
 
Upvote 0
Twitter does that automatically when you upload four photos, and you can only upload four photos at a time :)
Yes, I know this. But, my problem is that I need to know how to approach this on my own and how to make this functionality work for my specific app. Knowing that Twitter does this was just an example for ppl to understand what I’m trying to accomplish. Thank you though.
 
  • Like
Reactions: Milo Williamson
Upvote 0
Yes, I know this. But, my problem is that I need to know how to approach this on my own and how to make this functionality work for my specific app. Knowing that Twitter does this was just an example for ppl to understand what I’m trying to accomplish. Thank you though.
Not a problem, so you are working on an app that has four functions like that hmm... I will be around somewhere... :)
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones