Question on Tab of the android

Posted on 2013-01-03
Last Modified: 2013-01-10
I have a Tab with class A and class B,

In class A i have a text and a button, when i add some value in text and press the button
it should display  the value in the activity  b with the tab, instead it displays only class b, not the tab

Any body can find out what is the issue
            Button rajset = (Button) findViewById(;
            rajset.setOnClickListener(new OnClickListener() {

              public void onClick (View v) {

           Intent i = new Intent(A.this, B.class);
                EditText appIdStrVal = (EditText) findViewById(;
                  String appIdStr = appIdStrVal.getEditableText().toString();
                 Log.d("Application ID", appIdStr + "");
                 i.putExtra("appIdStr", appIdStr);

In the B class i am having

  EditText appIdStrVal = (EditText) findViewById(;
                appIdStr = appIdStrVal.getEditableText().toString();
                Log.d("Application ID", appIdStr + "");
          i.putExtra("appIdStr", appIdStr);
Question by:roy_sanu
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 10

Expert Comment

ID: 38749468
Hi Roy,

Can you please post your code for class B. It appears you pasted the same code that is shown in Class A.


Author Comment

ID: 38749865
Yes I have the class B code, still it is not showing the tab screen , but it shows me only the  class B screen layout.  

      String myApid;
      Intent i = getIntent();
      myApid = i.getStringExtra("appIdStr");
      myApid = appIdStr;
      Log.i(TAG, "getting app id from previous screen - " + myApid);
      Toast toast = Toast.makeText(InterstitialActivity.this, myApid, Toast.LENGTH_SHORT);;

Accepted Solution

Santhana earned 500 total points
ID: 38754328
(Try to attache the clean and full that we can help easily)      

     String myApid;
      Intent i = getIntent();
      myApid = i.getStringExtra("appIdStr");
      myApid = appIdStr;
      Log.i(TAG, "getting app id from previous screen - " + myApid);
      Toast toast = Toast.makeText(InterstitialActivity.this, myApid, Toast.LENGTH_SHORT);;

From your code you are getting the string from the intent and its assigned with the variable "myApid " . But again you are assigning  with the "appIdStr".
myApid = appIdStr;

So please check this.


Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Using Android platform to develop an app for IOS 2 45
spam sms 9 42
Xamarin  build error 4 37
Nexus 5x Boot Loop 8 87
I tend toward trying the newest hardware and software.  Thiss sometimes works out to my benefit, and sometimes not.  Because I downloaded and installed Android 5.x (…
The case of the missing phone talks about the way a small electronic gadget (the mobile phone) has penetrated into our lives and has made us addicted to it.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to:…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question