I need to show a "No data found" message on many screens in my app. For that I created a separate layout with message and image; Now,I'm not sure whether I should include that layout in all other activities' layout or render this layout at runtime? What would be more efficient? Any suggestion is appreciable.
Thanks;
I use a textview with text : "No data found" in all layouts and set VISIBILITY GONE or VISIBLE according to api result. Or you can add view to your main layout if no data found. Like this;
Write this function in a class and call everywhere you want