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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:41:08+00:00 2026-05-24T10:41:08+00:00

I am new to android and am getting The type LinearLayoutActivity must implement the

  • 0

I am new to android and am getting The type LinearLayoutActivity must implement the inherited abstract method RadioGroup.OnCheckedChangeListener.onCheckedChanged(RadioGroup, int) for an error. I don’t understand how I made RadioGroup an abstract method. Here is my code, I left a // by where I am getting the error

package com.commonsware.android.linear;

import com.commonsplace.android.skeleton.R;
import com.commonsplace.android.skeleton.R.id;
import com.commonsplace.android.skeleton.R.layout;

import android.app.Activity;
import android.os.Bundle;
import android.widget.LinearLayout;
import android.widget.RadioGroup.OnCheckedChangeListener;
import android.widget.RadioGroup;
import android.widget.EditText;
import android.view.Gravity;
import android.text.TextWatcher;

public class LinearLayoutActivity extends Activity  //I am getting the error for    LinearLayoutActivity
 implements RadioGroup.OnCheckedChangeListener{
RadioGroup orientation;
RadioGroup gravity;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    setContentView(R.layout.main);

    orientation=(RadioGroup)findViewById(R.id.orientation);
    orientation.setOnCheckedChangeListener(this);
    gravity=(RadioGroup)findViewById(R.id.gravity);
    gravity.setOnCheckedChangeListener(this);
}

public void OnCheckedChanged(RadioGroup group, int checkedId){
    switch(checkedId){
    case R.id.horizontal:
    orientation.setOrientation(LinearLayout.HORIZONTAL);
    break;
    case R.id.vertical:
    orientation.setOrientation(LinearLayout.VERTICAL);
    break;
    case R.id.left:
    orientation.setGravity(Gravity.LEFT);
    break;
    case R.id.center:
    orientation.setGravity(Gravity.CENTER);
    break;
    case R.id.right:
        orientation.setGravity(Gravity.RIGHT);
    break;
    }

}

}

  • 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-24T10:41:08+00:00Added an answer on May 24, 2026 at 10:41 am

    The name of the method in your code is wrong. You have:

    public void OnCheckedChanged(RadioGroup group, int checkedId)
    

    You need:

    public void onCheckedChanged(RadioGroup group, int checkedId)
                ^
    

    Java is case sensitive.

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

Sidebar

Related Questions

We have been getting a new error in our Android app since beginning of
I'm getting an error: The method OnClickListener() is undefined for the type View I'm
i'm new at Android world, and i have a doubt, is there any method
I am getting the following error: ERROR: The method killBackgroundProcesses(String) is undefined for the
I am very new in android Development. I am getting a warning when i
I am trying to create a new Product Type. But I am always getting
i'm a new android developper and i'm getting a null pointer exception when i
The new Android 2.1 SDK (version 7) has a new class called SignalStrength: http://developer.android.com/reference/android/telephony/SignalStrength.html
I'm trying to record audio this.recorder = new android.media.MediaRecorder(); this.recorder.setAudioSource(android.media.MediaRecorder.AudioSource.MIC); this.recorder.setOutputFormat(android.media.MediaRecorder.OutputFormat.DEFAULT); this.recorder.setAudioEncoder(android.media.MediaRecorder.AudioEncoder.DEFAULT); this.recorder.setOutputFile(pruebaAudioRecorder.mp4); **this.recorder.prepare();**
I know that eclipse can do this, can Intellij via the new Android support

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.