I have my popup windows with "extends activity". I searched and I knew that I cannot extent twice.
So, How can I put the content in a pop up with the FragmentActivity
?
Edit:
this is the main activity
public class Kulintang extends AppCompatActivity implements OnMenuItemClickListener {
SoundPool mySound;
int aID, bID, cID, dID, eID, fID, gID, hID;
private Button brecord;
private String FILE;//File path
private MediaRecorder record;
......
this is the class i want to pop up when i tap the button
public class play extends FragmentActivity implements ActionBar.TabListener {
ActionBar actionBar;
ViewPager viewPager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.play);
viewPager = (ViewPager) findViewById(R.id.pager);
viewPager.setAdapter(new MyAdapter(getSupportFragmentManager()));
viewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
}
@Override
public void onPageSelected(int position) {
actionBar.setSelectedNavigationItem(position);
}
@Override
public void onPageScrollStateChanged(int state) {
}
});
actionBar = getActionBar();
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
ActionBar.Tab tab1=actionBar.newTab();
tab1.setText("Recorded");
tab1.setTabListener(this);
ActionBar.Tab tab2=actionBar.newTab();
tab2.setText("Songs");
tab2.setTabListener(this);
actionBar.addTab(tab1);
actionBar.addTab(tab2);
}