forked from newubuntu/flexible_UI_Using_Fragments_Android
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnotherActivity.java
More file actions
27 lines (22 loc) · 728 Bytes
/
AnotherActivity.java
File metadata and controls
27 lines (22 loc) · 728 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package slidenerd.vivz;
import android.content.Intent;
import android.os.Bundle;
import android.app.Activity;
import android.util.Log;
import android.view.Menu;
public class AnotherActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_another);
Intent intent=getIntent();
Log.d("VIVZ", " Inside another activity ");
int index=intent.getIntExtra("index",0);
FragmentB f2= (FragmentB) getFragmentManager().findFragmentById(R.id.fragment2);
Log.d("VIVZ", " "+(f2==null));
if(f2!=null)
{
f2.changeData(index);
}
}
}