The Bedrock Addons app is designed with conditionals to simplify the development experience for new developers.
With the open source project, you can set up conditional statements to simplify your development experience, and to create things (such as UI elements) that have not been introduced into the database by combining multiple database entries.
Example: Updated tags
Updated tags that appear on content appear based on conditional statements instead of in the database to allow developers to have freedom in what they want to add to their tags. There is a basic set of tags that can be utilized for your specific needs.
If statement is what controls the visibility of the code above. It says that if the date that the content was created at is not equal to the time it was last updated, it will show the tag, and set the tag text to updated.
The view is visible by default, so you only need to hide the view. Setting
update.setText to "Updated" is required because sometimes
android:text="Updated" does not display correctly. This is a bug with Android, not the application.