Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9134789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:43:28+00:00 2026-06-17T08:43:28+00:00

Ive been searching the internet for a while now but cant find a good

  • 0

Ive been searching the internet for a while now but cant find a good page for good habit examples in android programming. For examples im interested in things like how to name classes or xml files (what case letters, where to use _) and also in file things like naming variables and fields or edittexts, prefixes and everything like that.

If someone could help me with a link i would be very grateful!1

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T08:43:29+00:00Added an answer on June 17, 2026 at 8:43 am

    Android developers has its answer for this.
    If you need anything elaborated I’ll update my answer from your comments 🙂
    For Classes use Java naming convention:

    • First letter capitalized, no "_" in the class names but start with capitalized letter for each new word ei:
      MyActivity or MySettingsActivity
    • For xml object naming you have some other limitations as in, first letter cannot be capitalized, therefor I suggest your either use the general java naming convention for methods (First letter decapitalized, and then new words capitalized like: buttonQuit or quitButton), if it should be button first or last is up to you, but stick with 1 style. don’t name 1 item: nameTextView (or nameTxtVw) and then something else buttonSubmit (Have the indicators in the same orders).
    • For xml files, use lower case separated with underscore "_".

    Why a lot java files are called Activity in the end. It is to describe in the name that they inherit from from the superclass "Activity". It is a principle that came became big with Android, which uses it a lot, examples if these classes are inherited:
    (super class = end of their heirs name)
    AsyncTask = Task
    Service = Service
    Activity = Activity
    Handler = Handler

    I could go on 🙂

    For xml files, belonging to activities I personally like to call them the name before Activity, so MainActivity’s xml layout would be main.xml

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been searching the whole internet for an answer but I cant find one.
Ive been searching for an answer for this and cant find one, although I
I've been doing some searching on the internet, but I can't seem to find
I know this is a really basic question but I've been searching the internet
I've been searching for this answer all over internet but so far no luck.
I've been searching around but could not find any answers to this. What I'm
I've been searching around but can't find much about this, but would cross-casting from
I've been searching SO and the remaining internet, and I can't find a straight
I've been searching around the internet for an working twitter hashtag rss feed. But
I've been searching the internet for quite some time and didn't find anything useful.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.