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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:49:00+00:00 2026-06-18T10:49:00+00:00

I am having a problem in storing a Edit able Text value in a

  • 0

I am having a problem in storing a Edit able Text value in a string. I just want to store a value that user enter store it in some variable. i used toast just after storing a value to check whether the value is store in it or not and toast doesn’t show any value. i try the following code but didnt find it helpful.

    package com.example.electropollsys;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;



public class CreateAcc extends Activity {
    protected void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);


    requestWindowFeature(Window.FEATURE_NO_TITLE);
     this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,  
             WindowManager.LayoutParams.FLAG_FULLSCREEN);

     setContentView(R.layout.create_acc);

     final Button b = (Button) findViewById(R.id.button3);
     b.setOnClickListener(new View.OnClickListener() {
         public void onClick(View v) {

             Intent i = new Intent(CreateAcc.this, SignIn.class);
            i.addFlags(
                Intent.FLAG_ACTIVITY_CLEAR_TOP |
                Intent.FLAG_ACTIVITY_NEW_TASK);
                startActivity(i);
         }


     });

     final Button a = (Button) findViewById(R.id.button1);
     a.setOnClickListener(new View.OnClickListener() {


            @SuppressLint("ShowToast")
            public void onClick(View v){

                EditText input1= (EditText)findViewById(R.id.fname1); 
                String fname = input1.getEditableText().toString();

                EditText input2= (EditText) findViewById(R.id.lname1); 
                String lname = input2.getEditableText().toString();

                Toast.makeText(CreateAcc.this,"...."+fname+"...." , Toast.LENGTH_LONG);
                Toast.makeText(CreateAcc.this,"...."+lname+"...." , Toast.LENGTH_LONG);

              }
         });
    }
    }
  • 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-06-18T10:49:01+00:00Added an answer on June 18, 2026 at 10:49 am

    Try:

    Toast.makeText(CreateAcc.this,"...."+fname+"...." , Toast.LENGTH_LONG).show();
    Toast.makeText(CreateAcc.this,"...."+lname+"...." , Toast.LENGTH_LONG).show();
    

    Toasts do not show unless the show() method is called. the makeText() method returns a Toast object which you must use to display the toast.

    You normally get a lint warning about this, but you seem to have suppressed it with @SuppressLint("ShowToast").

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

Sidebar

Related Questions

I am having a problem being able to edit a column in a table,
I'm having a problem while updating cell value of the JTable. What i want
I'm having a problem relating to storing a variable within Javascript. I have a
I am having problem to split string in java. it gives java.util.regex.Pattern.error . String
Im having a problem with removing non-utf8 characters from string, which are not displaying
I'm having a problem with getting a Ruby string substitution going. I'm writing a
Hi I am currently having a problem with parsing an Xml string without any
I seem to be having a problem checking if a string exists in my
I'm having a weird problem with the following function, which returns a string with
I'm facing a problem to solve this issue. I'm having a string variable, for

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.