Activity: Android Layout Exercise

In this exercise, you will create four different Android activities, each using a specific type of layout. Follow the instructions below for each activity.

  1. Create four activities in Android:

    • LinearLayoutActivity

    • RelativeLayoutActivity

    • NestedLayoutActivity

    • FinalLayoutActivity

Each activity should contain the following elements:

  1. TextView: "Hello, My name is + Your Name"

  2. TextView: A brief description of yourself in 2-3 sentences.

  3. Button: A clickable button with no specific action required for now.

  4. Footer (TextView): Example text like "Copyright © 2024"

Activity Layout Requirements:


1. LinearLayoutActivity:

  • Use LinearLayout only.

  • No additional design elements, such as margins or padding.

2. RelativeLayoutActivity:

  • Use RelativeLayout only.

  • No additional design elements, such as margins or padding.

3. NestedLayoutActivity:

  • Use a combination of LinearLayout and RelativeLayout to structure the layout.

  • No additional design elements, such as margins or padding.

4. FinalLayoutActivity:

  • Copy and paste the XML or design from NestedLayoutActivity.

  • Apply the following customizations:

    • Text size

    • Margins

    • Padding

    • Background color

    • Text color


Push your code to GitHub:

    • Ensure that you push your code to a GitHub repository.

      • Make sure to include a minimum of meaningful commits. For example, use commit messages like:

        • "Add nested layout"

        • "Update LinearLayoutActivity"

      • Ensure your commit messages are descriptive and useful, providing clarity about the changes made in each commit.

  • Document your code on Medium.com or Hashnode.com:

    • Write an article on either Medium or Hashnode to document your code and explain the steps you followed during the development process.

    • Include a link to your GitHub repository in the article, so others can view and access your code.