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 6173469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:34:55+00:00 2026-05-23T23:34:55+00:00

In android, I’m not sure I quite understand the R class. I’m going through

  • 0

In android, I’m not sure I quite understand the R class. I’m going through the sudoku example, and I have this snippet of code:

switch (v.getId()) // the id of the argument passed is evaluated by switch statement
{
    case R.id.about_button: // 
    Intent i = new Intent(this, about.class);
    startActivity(i);
    break;
    // More buttons go here (if any) ...
}

I’m brand new to Java, but from what I gather it looks like it’s taking input (the touch screen being touched on the button) and evaluating the argument. Then the case statement is setup if the about button is recognized, and a new interface screen is created and then navigated to on the phone.

Is this right?

If I got the gist of that correct, why is the deal with the “R” class?

Why is it called to recognize the ID of the button?

I thought the super class (in this project) was the SudokuActivity class.

  • 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-05-23T23:34:56+00:00Added an answer on May 23, 2026 at 11:34 pm

    R.java is the dynamically generated class, created during build process to dynamically identify all assets (from strings to android widgets to layouts), for usage in java classes in Android app. Note this R.java is Android specific (though you may be able to duplicate it for other platforms, its very convenient), so it doesn’t have much to do with Java language constructs. Take a look here, for more details.

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

Sidebar

Related Questions

Android APK-Files are not binaries but byte-code-files. So is it possible to install the
I'm doing some Android development, and I much prefer Visual Studio, but I'll have
I understand the Android OS is based on Linux. Does that mean the G1
I have two threads in an Android application, one is the view thread, and
Android supports an event onLongPress. The question I have is 'how long' (in milliseconds)
Android Code Style Guide defines Android Code Style Rules. To conform to these rules
Android and iOS have a concept of a density independent pixel so your layouts
Android: I am trying the following xAuth example for android share. xAuth Authentication for
Android 2.1 update 1 Eclipse 3.5 I have a problem reading data from my
Android: i am using gps check box in my application, which user check this

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.