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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:35:07+00:00 2026-05-26T19:35:07+00:00

So, I’m getting this error 11-15 16:55:40.617: E/AndroidRuntime(316): java.lang.IllegalStateException: Could not find a method

  • 0

So, I’m getting this error

11-15 16:55:40.617: E/AndroidRuntime(316): java.lang.IllegalStateException: Could not find a method ingresarBtnClick(View) in the activity class android.view.ContextThemeWrapper for onClick handler on view class android.widget.Button with id 'ingresarButton'

This is my layout xml

<?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" android:weightSum="1" android:id="@+id/Login">
    <TextView android:layout_width="wrap_content" android:id="@+id/textView1" android:textAppearance="?android:attr/textAppearanceLarge" android:text="Número de Lecturista" android:layout_height="wrap_content"></TextView>
    <EditText android:inputType="number" android:layout_height="wrap_content" android:layout_width="match_parent" android:id="@+id/numLecEditText" android:maxLength="4">
        <requestFocus></requestFocus>       
    </EditText>
    <TextView android:layout_width="wrap_content" android:id="@+id/textView2" android:textAppearance="?android:attr/textAppearanceLarge" android:layout_height="wrap_content" android:text="PIN"></TextView>
    <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:inputType="number" android:password="true" android:id="@+id/pinEditText" android:maxLength="4"></EditText>
    <TableRow android:id="@+id/tableRow1" android:layout_width="match_parent" android:layout_height="wrap_content">
        <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Ingresar" android:id="@+id/ingresarButton" android:onClick="ingresarBtnClick"></Button>
        <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Salir" android:id="@+id/salirButton" android:onClick="salirBtnClick"></Button>
        <Button android:id="@+id/opcionesButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Opciones" android:onClick="opcionesBtnClick" ></Button>
    </TableRow>
</LinearLayout>

And this is my code

import android.app.Dialog;
import android.view.View;
import android.widget.EditText;

public class FormaLogin extends Dialog
{
    SisLec sisLec;

    public FormaLogin(SisLec _sisLec)
    {       
        super(_sisLec);     
        sisLec = _sisLec;       
        setTitle("Identificación de Lecturista");
    }

    public void mostrar()
    {
        setContentView(R.layout.login);
        show();
    }

    public void ingresarBtnClick(View view)
    {
        EditText numLecTxt = (EditText) sisLec.findViewById(R.id.numLecEditText);
        EditText pinTxt = (EditText) sisLec.findViewById(R.id.pinEditText);

        if(numLecTxt.getText().length() > 0)
        {
            if(pinTxt.getText().length() > 0)
            {
                if(numLecTxt.getText().equals("1337"))
                {
                    if(pinTxt.getText().equals("8383"))
                    {
                        //sisLec.frmMantenimiento.mostrar();
                    }
                }
                else
                {
                    HiloIdentificacion hiloIden = new HiloIdentificacion();
                    hiloIden.identificacion(numLecTxt.getText().toString(), pinTxt.getText().toString());
                }
            }
            else
                sisLec.mensaje("Debe de ingresar su pin");
        }
        else
            sisLec.mensaje("Debe de ingresar su número de Lecturista");
    }

    public void salirBtnClick(View view)
    {
        sisLec.salir();
    }

    public void opcionesBtnClick(View view)
    {
        // TODO: Agregar método que muestre la forma de Opciones
    }

    private class HiloIdentificacion extends Thread
    {
        private String usuario, pass;

        public synchronized void run()
        {
            try
            {
                sisLec.identificacion(usuario, pass);
            }
            catch(Exception e)
            {
                // TODO: Agregar registro de error
            }                   
        }

        public synchronized void identificacion(String _usuario, String _pass)
        {
            usuario = _usuario;
            pass = _pass;
            run();
        }
    }
}

The method assigned to the button “ingresarButton”, “ingresarBtnClick(View view)” is there, as the Androir documentation suggest http://developer.android.com/guide/topics/ui/ui-events.html but sill I’m getting the error.

Does it has anything to do that i’m showing this layout on a Dialog?

SisLec is my Activity 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-26T19:35:07+00:00Added an answer on May 26, 2026 at 7:35 pm

    android:onClick in the xml routes the event to the method in the activity. But your method is not in the activity, its in your Dialog class. You’ll need to either have your activity forward the call to the instance of the Dialog, or have the dialog code register itself as the onClick listener instead of trying to set it in the layout.

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
Does anyone know how can I replace this 2 symbol below from the string
I need a function that will clean a strings' special characters. I do NOT
I have thousands of HTML files to process using Groovy/Java and I need to

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.