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

  • Home
  • SEARCH
  • 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 4077050
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:30:07+00:00 2026-05-20T17:30:07+00:00

I am developing an android application in which i have various views.When i apply

  • 0

I am developing an android application in which i have various views.When i apply listener on button having background image the acivity does not pass to other activity.Can anyone tell why is not applying event

Here is my code

package com.xib;

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

public class Main extends Activity {
    private Button Next;
    public void onCreate(Bundle savedInstanceState){
     super.onCreate(savedInstanceState);
     setContentView(R.layout.temp);


     Next = (Button)findViewById(R.id.next);
     Next.setOnClickListener(new OnClickListener(){

        @Override
        public void onClick(View v) 
        {

            Intent intent2 = new Intent(Main.this,Main1.class);
            startActivity(intent2);


        }

   });
    }
}

and my xml file is

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:orientation="vertical"
  >



<LinearLayout

  android:layout_width="fill_parent"
  android:layout_height="42px"
  android:orientation="horizontal"
  android:background="@drawable/navigationbar"
  > 

<TextView
    android:id="@+id/back"
    android:text="@string/Back"
    android:textStyle="bold"
    android:textColor="#ffffff"
    android:gravity="center"
    android:background="@drawable/back_btn_blank"
    android:layout_gravity="center_vertical"
    android:layout_marginLeft="5px"
    android:layout_width="70px"
    android:paddingLeft="7px"
    android:layout_height="wrap_content"
/>

<TextView 
    android:textColor="#ffffff"
    android:layout_width="fill_parent" 
    android:layout_height="42px"
    android:layout_marginLeft="50px"
    android:gravity="center_vertical"
    android:text="@string/PAIN_AREA_HEAD"></TextView>

</LinearLayout>
<AbsoluteLayout
  android:layout_width="fill_parent"
  android:layout_height="35px"
  android:orientation="horizontal"
  android:background="@drawable/gray_bar">

<TextView
    android:textColor="#ffffff"
    android:textStyle="bold"
    android:paddingLeft="15px"
    android:paddingTop="7px"
    android:background="@drawable/green_arrow"
    android:layout_width="75px"
    android:layout_height="wrap_content"
    android:layout_x="248px"
    android:layout_y="1px"
android:text="@string/TEMPERATURE"/>
<TextView
    android:textColor="#ffffff"
    android:textStyle="bold"
    android:paddingLeft="17px"
    android:paddingTop="7px"
    android:background="@drawable/green_arrow"
    android:layout_width="75px"
    android:layout_height="wrap_content"
    android:layout_x="185px"
    android:layout_y="1px"

android:text="@string/COLOR"/> 
<TextView
android:textColor="#ffffff"
    android:textStyle="bold"
    android:paddingLeft="17px"
    android:paddingTop="7px"
    android:background="@drawable/green_arrow"
    android:layout_width="75px"
    android:layout_height="wrap_content"
    android:layout_x="123px"
    android:layout_y="1px"
android:text="@string/SHAPE"/>  
<TextView
    android:textColor="#ffffff"
    android:textStyle="bold"
    android:paddingLeft="20px"
    android:paddingTop="7px"
    android:background="@drawable/green_arrow"
    android:layout_width="71px"
    android:layout_height="wrap_content"
    android:layout_x="63px"
    android:layout_y="1px"
android:text="@string/SUD"/>
<TextView
    android:textColor="#ffffff"
    android:textSize="13px"
    android:textStyle="bold"

    android:background="@drawable/green_arrow"
    android:layout_width="75px"
    android:gravity="center"
    android:layout_height="wrap_content"
    android:layout_x="0px"
    android:layout_y="1px"
android:text="@string/AREA"/>

  </AbsoluteLayout>
<LinearLayout
  android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:orientation="vertical"
  android:background="@drawable/background_img">    

<TextView 
    android:textColor="#ff9900"
    android:textSize="15px"
    android:textStyle="bold"
    android:layout_marginTop="7px"
    android:layout_width="290px" 
    android:layout_gravity="center_horizontal"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:text="@string/Temperature"></TextView>
<LinearLayout

    android:layout_width="280px"
    android:layout_height="55px"
    android:layout_gravity="center_horizontal"
    android:layout_marginTop="10px"
    android:background="@drawable/temp_level_bg"
>
<RadioGroup
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
>
<RadioButton
    android:id="@+id/radio1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textColor="#000000"
    android:textStyle="bold"
    android:layout_marginLeft="15px"
    android:layout_marginTop="9px"
    android:paddingLeft="28px"
    android:button="@drawable/radio_theme"
android:text="@string/HOT"/>
<RadioButton
    android:id="@+id/radio2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textColor="#000000"
    android:textStyle="bold"
    android:layout_marginLeft="15px"
    android:layout_marginTop="9px"
    android:paddingLeft="28px"
    android:button="@drawable/radio_theme"
android:text="@string/COLD"/>
</RadioGroup>
</LinearLayout>
<LinearLayout

    android:layout_width="fill_parent"
    android:layout_height="wrap_content"    
    android:layout_marginTop="180px"
    android:orientation="horizontal"
> 
<Button
    android:id="@+id/prev"

    android:textStyle="bold"
    android:layout_width="90px"
    android:layout_height="wrap_content"
    android:background="@drawable/cust_prev_btn"
    android:layout_marginLeft="8px"
    android:paddingLeft="26px"
    android:paddingTop="2px"
android:text="@string/PREVIOUS"/>

<Button
    android:id="@+id/next"
    android:enabled="false"
    android:textStyle="bold"
    android:layout_width="90px"
    android:layout_height="wrap_content"
    android:background="@drawable/cust_next_btn"
    android:layout_marginLeft="122px"
    android:paddingRight="22px"
    android:paddingTop="2px"
android:text="NEXT"/>   </LinearLayout>
  </LinearLayout>
</LinearLayout>

Thanks in advance
Tushar

  • 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-20T17:30:08+00:00Added an answer on May 20, 2026 at 5:30 pm

    Just put and see android:clickable="true" inside your button. Hope it may work. If there any errors, please put the logcat.

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

Sidebar

Related Questions

When developing a new web based application which version of html should you aim
Has anybody had any success with developing for Android platform using Netbeans (5.5+ )
Developing a .NET WinForms application: how can I check if the window is in
Developing a heavily XML-based Java-application, I recently encountered an interesting problem on Ubuntu Linux.
When developing a desktop application in .NET, is it possible to not require the
When developing whether its Web or Desktop at which point should a developer switch
Developing websites are time-consuming. To improve productivity, I would code a prototype to show
Developing a website and just trying to get back into the swing of (clever)
Developing server side code i finally got my eyes X-crossed trying to write -
When developing (works fine live) the pages for our website don't pick up the

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.