How to add elements dynamically to Relative Layout?

  • 0
    Hello everyone, I understand a little bit about android development. I set a small task for myself, make an audio player, here's the actual question of how to dynamically (programmatically) add elements to the relative layout to get something like this:

    That is, you need to programmatically change properties, such as: layoutWidth, layoutHeight, background, marginTop, marginStart, parentTop, parentStart, layoutAlignBaseLine, layoutAlignBottom, layoutAlignEndOf.

    Thank you all in advance!
    Android Anonymous, Aug 29, 2019

  • 1 Answers
  • 0

    From your screenshot I can assume that you need a regular list, in your case - an audio list, then RecyclerView
    Sean Robles

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!