So I'm trying to make an event organization app. The user needs to be able to manage multiple events at the same time. So, if he clicks on 'add event', I must be able to dynamically create a new layout folder for that respective event. How do I go about doing so?
Asked
Active
Viewed 133 times
0
-
No, you can't create a layout folder/file programmatically.. .but you can inflate a already built layout based on different user input. – Somesh Kumar Nov 30 '17 at 04:52
-
Thank you! What exactly is the difference between gradle flavors and this though? – Arjun Ram Nov 30 '17 at 09:16
1 Answers
1
It is not possible to "dynamically create a new layout folder for that respective event" but according to your requirement u can generate views dynamically according to your requirement or inflate a layout
(inflate layout) 1>How to inflate one view with a layout
generate view dynamically from code 2>Dynamically add textViews to a linearLayout
Hope this may help you

androholic
- 686
- 6
- 23
-
What if my layout had many different fragments in it such as a camera fragment and so on? – Arjun Ram Nov 30 '17 at 09:31
-
U want to generate a view containing Textview etc multiple time so that u can create multiple events at a single click – androholic Dec 01 '17 at 07:14