1. Are you ready for the Galaxy S20? Here is everything we know so far!

Layout Question

Discussion in 'Android Development' started by Wesley Stark, May 13, 2022.

  1. Wesley Stark

    Wesley Stark Lurker
    Thread Starter

    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.
     

    Attached Files:




    1. Download the Forums for Android™ app!


      Download

       
  2. Milo Williamson

    Milo Williamson Android Expert

    Twitter does that automatically when you upload four photos, and you can only upload four photos at a time :)
     
  3. Wesley Stark

    Wesley Stark Lurker
    Thread Starter

    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.
     
    Milo Williamson likes this.
  4. Milo Williamson

    Milo Williamson Android Expert

    Not a problem, so you are working on an app that has four functions like that hmm... I will be around somewhere... :)
     
Loading...
Similar Threads - Layout Question
  1. corvairbob
    Replies:
    4
    Views:
    247
  2. 4EverNoob
    Replies:
    1
    Views:
    367
  3. thequeenscheese
    Replies:
    3
    Views:
    827
  4. workbench
    Replies:
    0
    Views:
    717
  5. App Update
    Replies:
    0
    Views:
    456
  6. KerenSophia
    Replies:
    1
    Views:
    841
  7. Armczbt
    Replies:
    0
    Views:
    1,309
  8. janhrabe
    Replies:
    0
    Views:
    1,924
  9. bjourine stekarfield
    Replies:
    0
    Views:
    1,887
  10. sariDon2
    Replies:
    0
    Views:
    2,104

Share This Page

Loading...