[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Question on Tab of the android

Posted on 2013-01-03
3
Medium Priority
?
341 Views
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(R.id.setappidButton);
            rajset.setOnClickListener(new OnClickListener() {

              public void onClick (View v) {

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

In the B class i am having

  EditText appIdStrVal = (EditText) findViewById(R.id.editText1);
                appIdStr = appIdStrVal.getEditableText().toString();
                Log.d("Application ID", appIdStr + "");
          i.putExtra("appIdStr", appIdStr);
0
Comment
Question by:roy_sanu
[X]
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
3 Comments
 
LVL 10

Expert Comment

by:Gregg
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.

Thanks.
0
 

Author Comment

by:roy_sanu
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);
      toast.show();
0
 
LVL 8

Accepted Solution

by:
Santhana earned 2000 total points
ID: 38754328
Hi,
(Try to attache the clean and full code..so 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);
      toast.show();

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.

Regards
Santhana
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
Here, we have shared an easy step by step tutorial on how to download instagram images and videos on PC, Android Mobile and iOS mobile.
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 http://bit.ly/XDcourse.
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: http://www.codetwo.com/excha…

656 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