具有FragmentActivity的弹出窗口

时间:2015-10-10 16:50:05

标签: android android-popupwindow

我的弹出式窗口带有"扩展活动"。我搜查了一下,我知道我不能再进行两次。

那么,如何使用FragmentActivity

弹出内容

修改:

这是主要活动

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;
    ......

这是我想点按按钮时要弹出的课程

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);

    }

0 个答案:

没有答案