Note that there are some explanatory texts on larger screens.

plurals
  1. POgetText from one layout and (setting it) setText in an other layout
    primarykey
    data
    text
    <p>i call this method SolveUpdation (from button- onclickAction Listener) from mainAcitivity with main layout. i use other layout to get value from user and set it as button title in the main layout and that is only instruction that does not works for me</p> <pre><code> private void SolveUpdation() { //this function call is generated from the main Activity with main layout setContentView(R.layout.updateappliance); //this is 2nd layout to get values from user and use them as buttonText in the main layout btnSaveApp = (Button) findViewById(R.id.Bupdatenow); btnSaveApp.setOnClickListener(new OnClickListener() { public void onClick(View v) { // TODO Auto-generated method stub mOutEditText = (EditText) findViewById(R.id.edit_text_1); TextView view1 = (TextView) findViewById(R.id.edit_text_1); final String TitleApp1 = view1.getText().toString(); //the value is read properly here // if (App1.length() &gt; 0) { // byte[] send = App1.getBytes(); // } btnSaveApp.setText(TitleApp1); //this works fine startActivity(new Intent(HomeScreen.this, HomeScreen.class));//this the main activity for main layout setContentView(R.layout.main); //this is the main layout and this instruction works buttonLED1.setText(TitleApp1); //buttonLED1 (a Togglebutton or can be simple) is defined in main layout and this does not works and this is what i am stuck with SaveAppNamesToast(TitleApp1); //this is just to toast the value and it works fine. }}); </code></pre> <p>So plz can any one guide me why this instruction buttonLED1.setText(TitleApp1); does not works ??? Any help will be appreciatable.. thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload