Hello, I started writing an application for Android and I had a question, how to transfer data from one Activity to two at once? I will describe my task more precisely, I have the first MainActivity , by clicking on the button another VremActivity with a legacy from the tabActivity
Here is the code:
public class VremActivity extends TabActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.vrem); // ΠΏΠΎΠ»ΡΡΠ°Π΅ΠΌ TabHost TabHost tabHost = getTabHost(); // ΠΈΠ½ΠΈΡΠΈΠ°Π»ΠΈΠ·Π°ΡΠΈΡ Π±ΡΠ»Π° Π²ΡΠΏΠΎΠ»Π½Π΅Π½Π° Π² getTabHost // ΠΌΠ΅ΡΠΎΠ΄ setup Π²ΡΠ·ΡΠ²Π°ΡΡ Π½Π΅ Π½ΡΠΆΠ½ΠΎ TabHost.TabSpec tabSpec; tabSpec = tabHost.newTabSpec("tag1"); tabSpec.setIndicator("ΠΠΊΠ»Π°Π΄ΠΊΠ° 1"); tabSpec.setContent(new Intent(this, OneActivity.class) ); tabHost.addTab(tabSpec); tabSpec = tabHost.newTabSpec("tag2"); tabSpec.setIndicator("ΠΠΊΠ»Π°Π΄ΠΊΠ° 2"); tabSpec.setContent(new Intent(this, TwoActivity.class)); tabHost.addTab(tabSpec); } } This activit displays two OneActivity ΠΈ TwoActivity in tabs OneActivity ΠΈ TwoActivity So, with the MainActiviry you need to transfer data to OneActivity ΠΈ TwoActivity . Thank you in advance.