Go Back   Android Forums > Android Development > Application Development
Application Development Dev lounge for our application developers.

Find everything you need for the Galaxy S5 and discuss it in our S5 forum!
Have you seen that OnePlus One's awesome camera?? The forum is over here!

test: Reply
LinkBack Thread Tools
Old July 25th, 2010, 03:13 PM   #1 (permalink)
New Member
Thread Author (OP)
Join Date: Jun 2010
Posts: 5
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to Iguy29
Default Buttons And Tabs

I am working on an app, and i have a strange problem. In my main class (Event) it extends tabactivity, because it needs to initialize the tabs. So in my 2nd class (buttonManager) i have the code for when the buttons are pressed that they will switch the view to the appropriate layout. The buttonManager still has the blurb of code:
public void onCreate(Bundle savedInstanceState) {
i tried removing the @Override, it doesn't work, and i tried moving the code to Event, but it doesn't work, because it extends tabactivity, not activity. I am wondering if it is a problem that my buttons aren't in the main one, or if there is any way for my main class to extend both activity and tab activity.
Here is the code for buttonmanager, the class that handles the buttons if you are interested to see how it looks:
package com.dev.ir.im;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

public class buttonManager extends Activity implements OnClickListener {
       public void onCreate(Bundle savedInstanceState) {

          // Clicklistener setup
          View stretcher = findViewById(R.id.stretchbutton);
          View yoga = findViewById(R.id.yogabutton);
          View arms = findViewById(R.id.armbutton);
          View legs = findViewById(R.id.legworkouts);
          View core = findViewById(R.id.corebutton);
          View other = findViewById(R.id.otherbutton);
          View timer = findViewById(R.id.timerbutton);
    public void onClick(View v) {
        switch (v.getId()) {
          case R.id.timerbutton:
    public void onTimerClick() {
        Intent ti = new Intent(this, chrono.class);
I know that all of the cases aren't coded in yet, but the one that is doesn't work, so i decided not to put anything else in yet until it's fixed.
The chrono class just is the set view code.

Iguy29 is offline  
Reply With Quote
sponsored links
activity, buttons, onclicklistenter, tabactivity, tabs

Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

All times are GMT -5. The time now is 04:58 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.